No description
- Rust 94.7%
- Nix 5.3%
ggez 0.5 pulls in winit 0.19.5, whose X11 backend creates a PointerState with mem::uninitialized(). PointerState holds a &XConnection, and current rustc panics (non-unwinding, so SIGABRT) when mem::uninitialized() is used on a type that cannot be left uninitialized: attempted to leave type `...::x11::util::input::PointerState<'_>` uninitialized, which is invalid winit 0.19 is unmaintained, so carry a patched copy under vendor/ through [patch.crates-io]. The only change from the published crate is in query_pointer: it now builds the struct with the reference set and the Xlib fields zeroed. CI and repo metadata from the crate are dropped. crane's buildDepsOnly replaces every crate in the source tree with a stub, so the vendored winit is put back in its dummy source with extraDummyScript. X-model: claude-opus-5-5 X-harness: claude-code 2.1.284 (Claude Code) X-session-id: 77e0e472-1c68-4f43-b7b5-77bb467d8de2 |
||
|---|---|---|
| .claude | ||
| .idea | ||
| nix | ||
| resources | ||
| src | ||
| vendor/winit-0.19.5 | ||
| .gitignore | ||
| Cargo.lock | ||
| Cargo.toml | ||
| Cell-Graph-Risk.iml | ||
| flake.lock | ||
| flake.nix | ||
| README.md | ||
Cell-Graph-Risk
A small somewhat risk-like game I've been thinking about for a while now. It is based upon a special physics simulation with elastic graphs at its core. I've implemented it to learn some Rust, using the wonderful ggez.
Gameplay
It's a local mutliplayer strategy game where players create and cut connections between cells and then jump between them and send units across. They battle for domination over the white cells, which are able to create new units.
Cells
- Basic
- able to create new connections and cells
- also able to split
- Wall
- easier to defend
- can form impenetrable walls when connected to other wall cells
- Propulsion
- can burn units to accelerate
- Cancer
- hostile
- slowly produces units
- actively connects to other cells
Controls
| Input | Effect |
|---|---|
| left stick | jump between cells / control cursor for new connections/cells / control propulsion |
| right stick | choose connection |
| A | create a new connection/cell OR burn units for propulsion |
| B | release immediately to cut connection; hold longer to remove cell; hold even longer to abort |
| X | shorten connection |
| Y | lengthen connection |
| LB | start sending units over connection |
| RB | stop sending units over connection |
| LT | increase number of units that have to be stored before additional units are sent to other cells |
| RT | decrease number of units that have to be stored before additional units are sent to other cells |
| digipad-UP | mutate into basic cell OR split |
| digipad-RIGHT | mutate into wall cell |
| digipad-LEFT | mutate into propulsion cell |
| digipad-DOWN | mutate into cancer cell |
| Select | change displayed information |
Press any button to join.
Building with Nix
nix develop # dev shell: cargo, rust-analyzer, clippy, mold, GL/X11/ALSA libs
cargo run --release # the game
nix run # the packaged build
nix flake check # build + clippy + tests
The packaged binary forces XWayland (WINIT_UNIX_BACKEND=x11), because the
winit 0.19 that ggez 0.5 uses predates most Wayland compositors. Set
WINIT_UNIX_BACKEND=wayland to override that.

