summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--Makefile.am2
-rw-r--r--game.scm28
-rwxr-xr-xrun-game3
4 files changed, 34 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index 8d42d41..089f3be 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,4 @@
+*.go
/Makefile
/Makefile.in
/aclocal.m4
diff --git a/Makefile.am b/Makefile.am
index 08347d6..4f5cd6a 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -21,5 +21,7 @@ SUFFIXES = .scm .go
moddir=$(prefix)/share/guile/site/$(GUILE_EFFECTIVE_VERSION)
godir=$(libdir)/guile/$(GUILE_EFFECTIVE_VERSION)/site-ccache
+SOURCES = game.scm
+
EXTRA_DIST += \
COPYING
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>)))
diff --git a/run-game b/run-game
new file mode 100755
index 0000000..3b2225f
--- /dev/null
+++ b/run-game
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+./pre-inst-env guile game.scm