Expand description
Pinch Points: a real-time grid routing puzzler.
sim is the headless simulation core and app the Bevy shell around
it. The simulation is deliberately free of any engine types: plain Rust,
integer-only, and deterministic, so it can be unit-tested, replayed, and
driven over the wire. See docs/pinch-points-spec.md.
There is almost no unsafe here and there is not going to be more: the
game is a grid of integers, and the one thing it does with bytes a
stranger wrote is decode them.
The one exception is app::keymap::os, where asking Windows and macOS
what the keys say means calling their keyboard APIs: a dozen lines of
FFI with a reason written over each of them. That module allows itself
what this line denies, which is why it is deny rather than forbid;
an #[allow(unsafe_code)] anywhere else is a change to argue with.
Modules§
- app
- The Bevy shell: windowing, rendering, input, and the fixed-timestep bridge
into the headless simulation. Nothing in
crate::simmay depend on this. - bots
- Bot seats: bots people write, in any language, playing over TCP.
- gif
- A minimal animated-GIF writer: one shared palette, one LZW-compressed frame per call, looping forever.
- highlight
- The highlight reel: the last fifteen seconds of a finished round, zoomed on the castle that decided it, written out as an animated GIF.
- lzw
- GIF-flavoured LZW, both directions.
- share
- Share codes: a beach, a level, or a whole round as one line of text.
- sim
- Headless game simulation. No engine types allowed in this module tree.
- transport
- UDP transport for online lockstep (spec §7.6). Engine-free but IO-bound,
so it lives beside
simrather than inside it; the Bevy shell drives it.