No description
  • Rust 94.7%
  • Nix 5.3%
Find a file
Scott eee2a6f136 Patch winit 0.19.5 so the game no longer aborts on modern rustc
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
2026-10-19 07:02:55 -05:00
.claude Add a Nix flake for development and packaging; build on stable Rust 2026-10-19 06:48:09 -05:00
.idea First commit 2020-12-26 10:58:09 +01:00
nix Patch winit 0.19.5 so the game no longer aborts on modern rustc 2026-10-19 07:02:55 -05:00
resources Add a Nix flake for development and packaging; build on stable Rust 2026-10-19 06:48:09 -05:00
src Add a Nix flake for development and packaging; build on stable Rust 2026-10-19 06:48:09 -05:00
vendor/winit-0.19.5 Patch winit 0.19.5 so the game no longer aborts on modern rustc 2026-10-19 07:02:55 -05:00
.gitignore Add a Nix flake for development and packaging; build on stable Rust 2026-10-19 06:48:09 -05:00
Cargo.lock Patch winit 0.19.5 so the game no longer aborts on modern rustc 2026-10-19 07:02:55 -05:00
Cargo.toml Patch winit 0.19.5 so the game no longer aborts on modern rustc 2026-10-19 07:02:55 -05:00
Cell-Graph-Risk.iml just some cleanup 2020-12-26 13:13:57 +01:00
flake.lock Add a Nix flake for development and packaging; build on stable Rust 2026-10-19 06:48:09 -05:00
flake.nix Add a Nix flake for development and packaging; build on stable Rust 2026-10-19 06:48:09 -05:00
README.md Add a Nix flake for development and packaging; build on stable Rust 2026-10-19 06:48:09 -05:00

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.