summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Thompson <dthompson@vistahigherlearning.com>2021-04-17 14:12:31 -0400
committerDavid Thompson <dthompson@vistahigherlearning.com>2021-04-17 14:12:31 -0400
commit0917967a4f11ea9dfd49154dc538b8223163c5d9 (patch)
tree50cc5e299cc3e9bfb14d2fda7f21815bd86f2365
parent8de38cdc53b8bc1ce7d6e5bca1b00ada93e0f967 (diff)
More scaffolding.
-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