diff options
author | Gene Pasquet <dev@etenil.net> | 2024-05-22 04:04:43 +0100 |
---|---|---|
committer | Gene Pasquet <dev@etenil.net> | 2024-05-22 04:04:43 +0100 |
commit | 0764f57240efce7996070418000c56131fb22f62 (patch) | |
tree | ed4df9405d3f5d7b48ac82023ef8384d7623419b /turbo.scm | |
parent | 8e9677a752e67a7dce870d7b3fdc694dd3295e4f (diff) |
Add a nicer bitmap font
Diffstat (limited to 'turbo.scm')
-rw-r--r-- | turbo.scm | 22 |
1 files changed, 15 insertions, 7 deletions
@@ -8,6 +8,8 @@ ;;;; Constants and variables +(define the-font (load-bitmap-font "thick_8x8.xml")) + (define lane-height 65) (define lane-length 192) (define road-start-y 80) @@ -184,11 +186,10 @@ (define (draw alpha) (draw-road road-section-position road-start-y road-num-lanes) - (draw-text "Turbo Racers!" - (vec2 260.0 (- (window-height (current-window)) 25))) - - (draw-text (format #f "Speed: ~smph" (* player-speed 5)) - (vec2 450.0 20.0)) + (draw-text "Turbo Racer 3000!" + (vec2 170.0 (- (window-height (current-window)) 25)) + #:font the-font + #:scale (vec2 2 2)) (draw-sprite player-car player-position #:rotation player-rotation) @@ -196,9 +197,16 @@ (if (vehicle-active? veh) (draw-sprite (vehicle-sprite veh) (vehicle-position veh)))) vehicles) - + + (draw-text (format #f "Speed: ~smph" (* player-speed 5)) + (vec2 450.0 20.0) + #:font the-font + #:scale (vec2 2 2)) + (if game-over - (draw-text "GAME OVER" (vec2 260 (/ (window-width (current-window)) 2))))) + (draw-text "GAME OVER" (vec2 260 (/ (window-width (current-window)) 2)) + #:font the-font + #:scale (vec2 2 2)))) (define (key-press key modifiers repeat?) |