| docs | ||
| src | ||
| .envrc | ||
| .gitignore | ||
| Cargo.lock | ||
| Cargo.toml | ||
| demo.yabu | ||
| devenv.lock | ||
| devenv.nix | ||
| devenv.yaml | ||
| lisp-game-engine-spec.md | ||
| README.md | ||
Yabu (藪)
A Lisp for collaborative game jams.
Yabu combines a JIT-compiled Lisp with ideas from Unison and Tomorrow Corporation's game tools. Functions are identified by the hash of their content, not their name. Rename a function and nothing breaks, write the same logic twice and it's deduplicated automatically.
The language includes a built-in Entity Component System. Define components with typed fields, write systems that query entities, and spawn things into the world. When you start the game window, Yabu records every frame: inputs, random seeds, timing. Stop the game and you have a complete recording you can replay, scrub through, or share.
Namespaces work like git branches for your code. Fork off to experiment, diff against main to see what changed, merge when you're happy. Definitions sync peer-to-peer—connect to a friend and their functions appear in your REPL.
(defcomponent Position [x :f32 y :f32])
(defcomponent Velocity [dx :f32 dy :f32])
(defsystem move [pos :Position vel :Velocity]
(set! pos.x (+. pos.x vel.dx))
(set! pos.y (+. pos.y vel.dy)))
(spawn [Position {:x 100.0 :y 100.0}
Velocity {:dx 1.0 :dy 0.5}])
Run with cargo run. Type :help for commands.