diff options
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | Makefile.am | 2 | ||||
-rw-r--r-- | game.scm | 28 | ||||
-rwxr-xr-x | run-game | 3 |
4 files changed, 34 insertions, 0 deletions
@@ -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 |