Example minimal “freewheeling” app that can be modified without being restarted
Running this repo in isolation won’t be very helpful. If you haven’t yet, first check out the driver app. This repo is a template you can copy to create your own live apps.
Some reference documentation on how to create your own apps.
Invocation
Run this app from the terminal, passing its directory to LÖVE
Hacking
To modify it live without restarting the app each time, download the driver app. An example session might look like this (though the UI of the driver app on the left is improving over time):
To publish your changes:
- delete all files with a numeric prefix from the repo, and then
- move all files with a numeric prefix from the save directory to the repo.
Known issues
-
This approach puts one top-level definition per file, and so obscures the order in which definitions are loaded. In particular, initializing a global table to contain other global definitions will fail if you originally authored the other global definitions after the table.
I never initialize global tables with other definitions. That kind of thing happens in
on.initialize(akin tolove.load; see reference.md) oron.code_change. -
Don’t start the driver app while multiple freewheeling apps are running. If you have a driver app running with one app, shut it down before you switch apps.
Mirrors and Forks
Updates to this repo can be downloaded from:
- https://git.sr.ht/~akkartik/template-live
Further forks are encouraged. If you show me your fork, I’ll link to it here.
- https://git.sr.ht/~akkartik/night.love - an example program