WeScheme Project, March 9, 2012, Cardinal Forest Elementary School

WeScheme website

Back to WeScheme Projects

  1. Car in WeScheme

  2. Load the car-right picture. Switch the "move" variable "w" to the x position.

  3. Make the scene longer in the x direction.

  4. Keep the car going until the car's x position is greater than 600, the width of the screen.

    If you would like to copy and paste the starting source code, here it is:

    (define (descend w) (+ w 5))
    
    (define (hits-floor? w) (> w 300))
    
    (define UFO 
        (image-url "http://world.cs.brown.edu/1/clipart/ufo.png"))
    
    (define (draw w)
      (place-image UFO 150 w
                   (empty-scene 300 300)))
    
    ;; The use of big-bang starts the world program.
    (big-bang 0                               ;; initially, let the height be zero.
              (on-tick descend 1/15)    ;; tick every 15 frames a second
              (on-redraw draw)              ;; use render to draw the scene
              (stop-when hits-floor?))  
    

    More pictures to try from Brown U.