summaryrefslogtreecommitdiff
path: root/game.scm
diff options
context:
space:
mode:
Diffstat (limited to 'game.scm')
-rw-r--r--game.scm28
1 files changed, 28 insertions, 0 deletions
diff --git a/game.scm b/game.scm
new file mode 100644
index 0000000..baaaa00
--- /dev/null
+++ b/game.scm
@@ -0,0 +1,28 @@
+(use-modules (chickadee graphics texture)
+ (chickadee math vector)
+ (oop goops)
+ (starling asset)
+ (starling gui)
+ (starling kernel)
+ (starling node)
+ (starling node-2d)
+ (starling scene))
+
+(define window-width 1280)
+(define window-height 720)
+(define game-width 640)
+(define game-height 360)
+
+(define-class <game> (<gui-scene>))
+
+(define-method (on-boot (game <game>))
+ (set! (cameras game)
+ (list (make <camera-2d>
+ #:resolution (vec2 game-width game-height)))))
+
+(boot-kernel (make <kernel>
+ #:window-config (make <window-config>
+ #:title "Spring Lisp Game Jam 2021"
+ #:width window-width
+ #:height window-height))
+ (lambda () (make <game>)))