Bootstrap games not running

16 views
Skip to first unread message

Reetu Singh

unread,
Apr 3, 2019, 12:57:26 PM4/3/19
to Bootstrap-Teachers
Hello!
I have been teaching the bootstrap curriculum for two semesters now.
Recently we updated the update-player code in the games.
When I hit run, the game said it was "waiting" for a website.  I believe this is for the images being used.  I am using the robot template to model my game which uses images from bootstrap so I don't know why my game isn't loading.
This just started happening this week.
Is it our school's network?  or am I using an old version of the teachpack?

Thank you so much!

Schanzer (Director)

unread,
Apr 3, 2019, 4:03:34 PM4/3/19
to Bootstrap-Teachers
Hi Reetu - I just tried the game on a few different browsers, and all of the images seem to load fine. It could be a firewall or other connection issue at your school. Do you get the same issue if you try to run the game on your phone, or from a computer outside of school?

The most-recent version of the teachpack is 2015, so I suspect you're up to date. Let us know if you don't get the image loading from a non-school computer?

Reetu Singh

unread,
Apr 4, 2019, 9:15:41 AM4/4/19
to bootstra...@googlegroups.com
Thank you for the quick response.
So I have two wescheme accounts.
When I ran the game on my work email rsa...@theclintonschool.net, the game screen loaded fine.
When I ran the game on my other email rsin...@gmail.com, the game wouldn't load.

I think there is something wrong with my rsin...@gmail.com account....but I don't know how that would relate to my students' games not loading.
I have them next period and I will see if the problem continues.


On Wed, Apr 3, 2019 at 4:03 PM Schanzer (Director) <scha...@bootstrapworld.org> wrote:
Hi Reetu - I just tried the game on a few different browsers, and all of the images seem to load fine. It could be a firewall or other connection issue at your school. Do you get the same issue if you try to run the game on your phone, or from a computer outside of school?

The most-recent version of the teachpack is 2015, so I suspect you're up to date. Let us know if you don't get the image loading from a non-school computer?

--
You received this message because you are subscribed to the Google Groups "Bootstrap-Teachers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bootstrap-disc...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--


Reetu Singh
Join the battle for fighting blood cancers http://pages.teamintraining.org/nyc/halfnyc14/rsingh926

Schanzer (Director)

unread,
Apr 4, 2019, 9:20:22 AM4/4/19
to bootstra...@googlegroups.com
Hi Reetu - When you're logged in using the account that WON'T load, can you copy and paste the link that you're using, so we can see it here? 

Reetu Singh

unread,
Apr 4, 2019, 9:40:00 AM4/4/19
to bootstra...@googlegroups.com
Here you go,

(require bootstrap2015/bootstrap-teachpack)

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; 0. Game title: Write the title of your game here
(define TITLE "My Game")
(define TITLE-COLOR "white")

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Graphics - danger, target, projectile and player images

(define DANGER (triangle 50 "solid" "red"))
(define TARGET (circle 60 "solid" "green"))
(define PLAYER (scale .5 (bitmap/url "http://www.bootstrapworld.org/clipart/Monsters/Robot.png")))


;; here's a screenshot of the game, with the PLAYER at (320, 240),
;; the TARGET at (400 500) and the DANGER at (150, 200)
(define SCREENSHOT (put-image DANGER
                                150 200
                                (put-image TARGET
                                           450 200
                                           (put-image PLAYER
                                                      320 240
                                                      BACKGROUND))))


;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; 1. Making the Danger and the Target Move

; update-danger: Number -> Number
; given the danger's x-coordinate, output the NEXT x

;; write EXAMPLEs for update-danger below this line
; update-danger : Number -> Number
(EXAMPLE (update-danger 10)
  (- 10 50))
(EXAMPLE (update-danger 530)
  (- 530 50))
(define  (update-danger x)
  (- x 50))






; update-target : Number -> Number
; given the target's x-coordinate, output the NEXT x

;; write EXAMPLEs for update-target below this line
; update-target : Number -> Number
(EXAMPLE (update-target 200)
  (+ 200 50))
(EXAMPLE (update-target 100)
  (+ 100 50))
(define  (update-target x)
  (+ x 50))




;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; 2. Making the Danger and the Target Come Back Again: 
;;    We need to know that they're gone!  
;;    Are they on the screen?

; safe-left? : Number -> Boolean
; Is the character visible on the left side of the screen?

; Write an EXAMPLE that makes this true, and one that makes this false:

; safe-left? : Number -> Boolean
(EXAMPLE (safe-left? 50)
  (> 50 -50))
(EXAMPLE (safe-left? 100)
  (> 100 -50))
(define  (safe-left? x) (> x -50))



; safe-right? : Number -> Boolean
; Is the character visible on the right side of the screen?

; Write an EXAMPLE that makes this true, and one that makes this false:

; safe-right? : Number -> Boolean
(EXAMPLE (safe-right? 600)
  (< 600 690))
(EXAMPLE (safe-right? 700)
  (< 700 690))
(define  (safe-right? x) (< x 690))



; onscreen? : Number -> Boolean
; Determines if the coordinate is on the screen

;; EXAMPLEs:

(define (onscreen? x)
 (and (safe-left? x) (safe-right? x)))

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; 3. Get our Player moving!

; update-player : Number String -> Number
; given the player's y-coordinate and a direction, output the NEXT y

; EXAMPLEs:
(EXAMPLE (update-player 320 "up")
  (+ 320 20))
(EXAMPLE (update-player 320 "down")
  (- 320 20))
(define  (update-player y key)
  (cond 
    [(update-player y "up") (+ y 20)]
    [(update-player y "down") (- y 20)]
    [else (+ y 0)]))



;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; 4. Collisions: When the player is close enough to the Target
;;    or the Danger, then something should happen!
;;    We need to know what "close enough" means, and we need to
;;    know how far apart things are.

;; If *distances-color* is set to "yellow", then the game will draw
;; a yellow triangle between the player and each character. 
;; That triangle will be labelled with line-length on the legs,
;; and with distance on the hypotenuse. (This works for any valid color)
(define *distances-color* "")

; line-length : Number Number -> Number
; the distance between two points on a number line
;; some examples - notice that we should always return the
;; same answer, no matter what the order of the inputs is!
(EXAMPLE (line-length 20 10) 10)
(EXAMPLE (line-length 10 20) 10)

(define (line-length a b)
  (cond
    [(> a b) (- a b)]
    [else (- b a)]))
  
; distance : Number Number Number Number -> Number
; The distance between two points on screen:
; We have the player's x and y, and a character's x and y.
; How far apart are they?
; EXAMPLEs:

(define (distance px py cx cy)
  0)

; collide? : Number Number Number Number -> Boolean 
; How close is close enough?  
; We have the player's x and y, and a character's x and y.
; We can ask how far apart they are.  Did they collide?
; EXAMPLEs:
(define (collide? px py cx cy)
  false)



; a final secret:
(define mystery (radial-star 5 5 3 "solid" "silver"))
(define (update-mystery x) 
  x)

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; PROVIDED CODE

(define g (make-game TITLE TITLE-COLOR 
                     BACKGROUND 
                     DANGER update-danger
                     TARGET update-target
                     PLAYER update-player
                     mystery update-mystery
                     *distances-color* line-length distance
                     collide? onscreen?))

;; click Run and then type this in the Interactions window to 
;; start the game, or uncomment the next line to start the 
;; game automatically when you click Run:
(play g)

On Thu, Apr 4, 2019 at 9:20 AM Schanzer (Director) <scha...@bootstrapworld.org> wrote:
Hi Reetu - When you're logged in using the account that WON'T load, can you copy and paste the link that you're using? 

--
You received this message because you are subscribed to the Google Groups "Bootstrap-Teachers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bootstrap-disc...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Emmanuel Schanzer

unread,
Apr 4, 2019, 10:49:28 AM4/4/19
to bootstra...@googlegroups.com
Hi Reetu - this looks like the code for the program. I’m asking if you can log in using the problematic email account, pull up the file, and then copy-and-paste the address.

Reetu Singh

unread,
Apr 4, 2019, 11:37:20 AM4/4/19
to bootstra...@googlegroups.com

On Thu, Apr 4, 2019 at 10:49 AM Emmanuel Schanzer <scha...@bootstrapworld.org> wrote:
Hi Reetu - this looks like the code for the program. I’m asking if you can log in using the problematic email account, pull up the file, and then copy-and-paste the address.

--
You received this message because you are subscribed to the Google Groups "Bootstrap-Teachers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bootstrap-disc...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Schanzer (Director)

unread,
Apr 4, 2019, 3:11:56 PM4/4/19
to Bootstrap-Teachers
Ah, that's helpful. Thanks!

In WeScheme, there are shared programs (with publicId=XYZ at the end) and private programs (with pid=XYZ at the end). Shared programs can be loaded by anyone, but private programs can only be loaded by the logged-in-user who created them. If you're getting an "unable to load program" error, it's because you need to be logged in with your other account.

I think what you want is to use a shared program. Once you're logged in and can load the file, click the "Share" button and then allow others to view the source. You'll be presented with an address that you can share with your students, and open from anywhere.

Reetu Singh

unread,
Apr 5, 2019, 10:53:09 AM4/5/19
to bootstra...@googlegroups.com
ok,
I shared a public address with my class, when they hit run, nothing would load...It must be a firewall issue?  It's just weird because just last week all students were able to run their games and see their player, target and danger on their game screen.

--
You received this message because you are subscribed to the Google Groups "Bootstrap-Teachers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bootstrap-disc...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Schanzer (Director)

unread,
Apr 8, 2019, 12:06:29 PM4/8/19
to Bootstrap-Teachers
Does it *not load the file* ("unable to load" error), or does it load the file but not run? I'm going to email you directly, so no need to reply here. 

Reetu Singh

unread,
Apr 16, 2019, 3:30:28 PM4/16/19
to Bootstrap-Teachers
RESOLVED!
found out that my update--player was making an infinite loop
when making my conditions, I used update-player instead of string=?
EXAMPLE (update-player 320 "up")
  (+ 320 20))
(EXAMPLE (update-player 320 "down")
  (- 320 20))
(define  (update-player y key)
  (cond 
    [(string=? key "up") (+ y 20)]
    [(string=? key "down") (- y 20)]
    [else (+ y 0)]))

Thank you

Schanzer (Director)

unread,
Apr 17, 2019, 10:20:18 AM4/17/19
to Bootstrap-Teachers
Glad to hear it!! 

This is a good thing to keep in mind for other teachers as well: infinite loops in code mean that WeScheme will just "keep running". But you can always click the "Stop" button -- in fact, we're one of the only coding platforms in existence that allows you to do this!  Using the stop button is an easy way to figure out whether the problem is in WeScheme (or your network), vs. a bug in your code.

Thanks for bringing this to the fore, Reetu!
Reply all
Reply to author
Forward
0 new messages