diff options
Diffstat (limited to 'turbo.scm')
-rw-r--r-- | turbo.scm | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/turbo.scm b/turbo.scm new file mode 100644 index 0000000..32661b5 --- /dev/null +++ b/turbo.scm @@ -0,0 +1,15 @@ +(use-modules (chickadee graphics sprite) + (chickadee) + (chickadee graphics viewport)) + +(define red-car (load-image "red_racer.png")) + +(define car-pos-y 0.0) +(define car-speed 4.0) + +(define (draw alpha) + (draw-sprite red-car (vec2 0 car-pos-y)) + (draw-text "Turbo racers!" (vec2 260.0 240.0)) + (set! car-pos-y (+ car-speed car-pos-y)) + (if (> car-pos-y (window-height (current-window))) + (set! car-pos-y 0.0))) |