Compare commits

..

No commits in common. "b7adfd4846c0d8b98c00967c605a2f66ea7c13d3" and "be0c8d122e649f4e2bb7b28f2068803bcd594967" have entirely different histories.

16 changed files with 19 additions and 210 deletions

2
.envrc Normal file
View file

@ -0,0 +1,2 @@
use guix

19
.gitignore vendored
View file

@ -1,10 +1,9 @@
*.go # ---> Scheme
/Makefile *.ss~
/Makefile.in *.ss#*
/aclocal.m4 .#*.ss
/autom4te.cache/
/build-aux/ *.scm~
/config.log *.scm#*
/config.status .#*.scm
/configure
/pre-inst-env

View file

@ -1,29 +0,0 @@
GOBJECTS = $(SOURCES:%.scm=%.go)
nobase_mod_DATA = $(SOURCES)
nobase_go_DATA = $(GOBJECTS)
# Make sure source files are installed first, so that the mtime of
# installed compiled files is greater than that of installed source
# files. See
# <http://lists.gnu.org/archive/html/guile-devel/2010-07/msg00125.html>
# for details.
guile_install_go_files = install-nobase_goDATA
$(guile_install_go_files): install-nobase_modDATA
CLEANFILES = $(GOBJECTS)
GUILE_WARNINGS = -Wunbound-variable -Warity-mismatch -Wformat
SUFFIXES = .scm .go
.scm.go:
$(AM_V_GEN)$(top_builddir)/pre-inst-env $(GUILE_TOOLS) compile $(GUILE_WARNINGS) -o "$@" "$<"
moddir=$(prefix)/share/guile/site/$(GUILE_EFFECTIVE_VERSION)
godir=$(libdir)/guile/$(GUILE_EFFECTIVE_VERSION)/site-ccache
SOURCES = \
game/main.scm
EXTRA_DIST = \
$(SOURCES) \
assets/images/chickadee.png \
COPYING \
README.md

View file

@ -1,63 +1,3 @@
# Chickadee Game Template # bloatrunner
This repository provides a template to use as a starting point for Small loderunner clone for the 2024 game jam
making a new game using
[Chickadee](https://dthompson.us/projects/chickadee.html)! It
includes all the autotools boilerplate so you don't have to worry
about that nonsense too much.
## Using Guix
We *highly recommend* using [Guix](https://guix.gnu.org/) to manage
your development environment. Once Guix is installed, getting all of
the dependencies you need to develop is *easy*. Just run `guix shell`
from the root directory of this repository and you'll be good to go!
## Building from source
Assuming Guile and Chickadee are installed on your system, a fresh
project can be built like so:
```
./boostrap.sh
./configure
make -j$(nproc)
```
After the build system is initialized, only `make` needs to be run to
recompile the Scheme modules.
Note: On hosted guix the configure script might find the host guile version
instead of the guix provided one. This can lead to incompatible bytecode errors.
To force to use a consistent guile use
```
./configure GUILE=$(which guile)
```
to ensure the right version is configured.
## Running the game
To run the game from the source checkout, use the `pre-inst-env` wrapper script:
```
./pre-inst-env run-game
```
## REPL-driven development
After the game is launched, a Guile REPL server will be running on
port 37146. We recommend using the
[Geiser](https://geiser.nongnu.org/) Emacs extension for connecting to
it using `M-x connect-to-guile`. Once Geiser connects to the REPL,
the game can be modified while it runs!
## Bundling
If you are setup to produce redistributable bundles of Chickadee games
(see
https://dthompson.us/manuals/chickadee/Invoking-chickadee-bundle.html),
then you can use `chickadee bundle` to produce binary release bundles.
This is admittedly an area where things really do not "just work" as
they should, so do reach out for help if you need it.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 755 B

View file

Before

Width:  |  Height:  |  Size: 36 KiB

After

Width:  |  Height:  |  Size: 36 KiB

View file

Before

Width:  |  Height:  |  Size: 4.7 KiB

After

Width:  |  Height:  |  Size: 4.7 KiB

View file

Before

Width:  |  Height:  |  Size: 59 KiB

After

Width:  |  Height:  |  Size: 59 KiB

View file

@ -1,3 +0,0 @@
#!/bin/sh
exec autoreconf -vif

View file

@ -1,4 +0,0 @@
'((asset-directories . ("assets/images"))
(bundle-name . "chickadee-game-template-0.1.0-x86_64")
(code . "game/main.scm")
(launcher-name . "chickadee-game-template"))

View file

@ -1,18 +0,0 @@
dnl -*- Autoconf -*-
AC_INIT(chickadee-game-template, 0.1.0)
AC_CONFIG_SRCDIR(game)
AC_CONFIG_AUX_DIR([build-aux])
AM_INIT_AUTOMAKE([foreign -Woverride -Wno-portability])
AM_SILENT_RULES([yes])
AC_CONFIG_FILES([Makefile])
AC_CONFIG_FILES([pre-inst-env], [chmod +x pre-inst-env])
AC_CONFIG_FILES([scripts/run-game], [chmod +x scripts/run-game])
GUILE_PKG([3.0])
GUILE_PROGS
GUILE_MODULE_REQUIRED([chickadee])
AC_OUTPUT

View file

@ -1,38 +0,0 @@
;;; Licensed under the Apache License, Version 2.0 (the "License");
;;; you may not use this file except in compliance with the License.
;;; You may obtain a copy of the License at
;;;
;;; http://www.apache.org/licenses/LICENSE-2.0
;;;
;;; Unless required by applicable law or agreed to in writing, software
;;; distributed under the License is distributed on an "AS IS" BASIS,
;;; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
;;; See the License for the specific language governing permissions and
;;; limitations under the License.
(define-module (game main)
#:use-module (chickadee)
#:use-module (chickadee math vector)
#:use-module (chickadee graphics sprite)
#:use-module (chickadee graphics texture)
#:use-module (system repl coop-server)
#:export (launch-game))
(define sprite-position (vec2 256.0 176.0))
(define sprite-texture #f)
(define repl #f)
(define (load)
(set! sprite-texture (load-image "assets/images/chickadee.png"))
(set! repl (spawn-coop-repl-server)))
(define (update _dt)
(poll-coop-repl-server repl))
(define (draw _alpha)
(draw-sprite sprite-texture sprite-position))
(define (launch-game args)
(run-game #:load load
#:update update
#:draw draw))

View file

@ -1,29 +0,0 @@
(use-modules (guix packages)
((guix licenses) #:prefix license:)
(guix download)
(guix git)
(guix build-system gnu)
(guix utils)
(gnu packages)
(gnu packages autotools)
(gnu packages guile)
(gnu packages game-development)
(gnu packages pkg-config))
(package
(name "chickadee-game-template")
(version "0.1.0-git")
(source (git-checkout (url (dirname (current-filename)))))
(build-system gnu-build-system)
(arguments
'(#:make-flags '("GUILE_AUTO_COMPILE=0")))
(native-inputs
(list autoconf automake pkg-config))
(inputs
(list guile-3.0))
(propagated-inputs
(list guile-chickadee))
(synopsis "Chickadee game template")
(description "This is an example package for a Chickadee game.")
(home-page "https://dthompson.us/projects/chickadee.html")
(license license:asl2.0))

6
manifest.scm Normal file
View file

@ -0,0 +1,6 @@
;; What follows is a "manifest" equivalent to the command line you gave.
;; You can store it in a file that you may then pass to any 'guix' command
;; that accepts a '--manifest' (or '-m') option.
(specifications->manifest
(list "guile-chickadee"))

View file

@ -1,10 +0,0 @@
#!/bin/sh
abs_top_srcdir="`cd "@abs_top_srcdir@" > /dev/null; pwd`"
abs_top_builddir="`cd "@abs_top_builddir@" > /dev/null; pwd`"
export GUILE_LOAD_COMPILED_PATH="$abs_top_builddir${GUILE_LOAD_COMPILED_PATH:+:}$GUILE_LOAD_COMPILED_PATH"
export GUILE_LOAD_PATH="$abs_top_builddir:$abs_top_srcdir${GUILE_LOAD_PATH:+:}:$GUILE_LOAD_PATH"
export PATH="$abs_top_builddir/scripts:$PATH"
exec "$@"

View file

@ -1,7 +0,0 @@
#!@GUILE@ \
--no-auto-compile -e main -s
!#
(use-modules (game main))
(define* (main #:optional (args (command-line)))
(launch-game args))