Build from source
Lamplighter is Tcl and Tk. It runs on ztk, and its tests run on ztcl.
Get the tools
Download ztcl and ztk 1.0.0-beta.8 or later from their releases, and put them on the PATH. The release of each has a SHA256SUMS file. Check the file that you download against it.
Run the game
git clone https://github.com/beetlebugorg/lamplighter
cd lamplighter
ztk main.tcl
The game keeps its save in lamplighter.save in the data folder of the app.
Run the tests
ztcl test # the core: physics, levels, generator, save
ztk --headless --exit-after-frames 2 tests/tk/smoke.tcl # the view and the input, with no window
Make a program or an app
ztk bundle -o lamplighter --allow file,channels main.tcl core ui
ztk bundle --yes --target x86_64-windows -o lamplighter.exe --allow file,channels main.tcl core ui
ztk bundle --yes --target aarch64-linux-android -o lamplighter.apk --id org.beetlebug.lamplighter --allow file,channels main.tcl core ui
--yes downloads the runtime of the target from the ztk release and checks its signature. Make the macOS app on a Mac, so that codesign signs it.
Make the web build
npm pack @beetlebug/ztk@1.0.0-beta.8 # ztk.wasm and ztk.js
ztk bundle --target wasm --runner package/ztk.wasm -o lamplighter.wasm main.tcl core ui
Serve lamplighter.wasm, ztk.js, webgpu.js, and docs/site/play/index.html from one folder.
Make the docs site
ztcl --allow file,channels --tclsh tools/site.tcl _site
tools/shots.sh _site/images