Find a file
2021-02-01 20:09:15 -05:00
buildtools Added web target cd releases && ../buildtools/love-js/love-js.sh /home/alexjgriffith/Development/love/min-love2d-fennel/releases change-me 0.1.0. 2021-02-01 20:09:15 -05:00
lib Added web target cd releases && ../buildtools/love-js/love-js.sh /home/alexjgriffith/Development/love/min-love2d-fennel/releases change-me 0.1.0. 2021-02-01 20:09:15 -05:00
.gitignore Copy appimage scripts from goo-runner. 2018-11-30 17:39:46 -08:00
conf.lua - Added -n option to AppRun (closes #3) - Bumped love version to 11.3 - Updated Fennel to current master branch b2d2155 2020-04-08 21:56:53 -04:00
license.txt Initial commit. 2018-10-17 21:32:39 -04:00
main.lua Initial commit. 2018-10-17 21:32:39 -04:00
makefile Added web target cd releases && ../buildtools/love-js/love-js.sh /home/alexjgriffith/Development/love/min-love2d-fennel/releases change-me 0.1.0. 2021-02-01 20:09:15 -05:00
mode-intro.fnl Updated minimal love2d fennel setup for the spring lisp game jam. 2019-04-20 21:24:43 -04:00
mode-intro.lua Added web target cd releases && ../buildtools/love-js/love-js.sh /home/alexjgriffith/Development/love/min-love2d-fennel/releases change-me 0.1.0. 2021-02-01 20:09:15 -05:00
readme.org Make fennel.repl accept moduleName argument. 2020-04-01 21:42:57 -07:00
sample.fnl Added web target cd releases && ../buildtools/love-js/love-js.sh /home/alexjgriffith/Development/love/min-love2d-fennel/releases change-me 0.1.0. 2021-02-01 20:09:15 -05:00
sample.lua Added web target cd releases && ../buildtools/love-js/love-js.sh /home/alexjgriffith/Development/love/min-love2d-fennel/releases change-me 0.1.0. 2021-02-01 20:09:15 -05:00
wrap.fnl Fix syntax error and formatting. 2019-09-22 15:38:01 -07:00
wrap.lua Added web target cd releases && ../buildtools/love-js/love-js.sh /home/alexjgriffith/Development/love/min-love2d-fennel/releases change-me 0.1.0. 2021-02-01 20:09:15 -05:00

Minimal Fennel Love2D Setup

In a lead up to the annual Autumn Lisp Game Jam I thought I'd look into Phil Hegelberg's approach to last Aprils Jam, using love2d in concert with fennel. Phil outlines his approach on his blog.

The first step is to see how fennel works as a standalone execution environment, then slowly integrate some of the love2d API.

This repo contains the minimal viable setup to get started with Phil Hegelberg's game design process, plus some additional libraries.

PROJECT=project-name
git clone https://gitlab.com/alexjgriffith/min-love2d-fennel.git $PROJECT
cd $PROJECT
rm -rf .git

Phil's Modal Callbacks (PMC)

Phil Hegelberg's exo-encounter-667 is structured using a modal callback system. Each game state has a mode and each mode has a series of specific callbacks.

If you design your game as a series of states in a very simple state machine, for example start-screen, play and end, with unidirectional progression, you can easily separate the logic for each state into state/mode specific callbacks. As an example, in order to have state dependant rendering that differs between start-screen,play and end you could provide a draw callback for each of those states. Similarly if we need state dependent logic and keyboard input we could provide update and keyboard callbacks. As you iterate you can add and remove callbacks and states/modes as needed with very little friction.

Emacs Setup

Once you install the latest version of fennel-mode, you can run C-u M-x fennel-repl followed by love . to launch a repl.