Ninjix was our final Computer Laboratory project: a complete tower-defense game written in
C for MINIX 3, without a game framework. The codebase acts as a small event-driven engine layered over the course’s hardware work.
The game normalizes hardware interrupts into app events, runs gameplay at 60 Hz, renders through a back buffer, and manages towers, eight enemy types, projectiles, waves, upgrades, targeting modes, menus, overlays, and reusable sprite resources. We also built developer tooling for PNG-to-XPM conversion, Doxygen/Graphviz documentation, and section-level profiling with FlameGraph output.
Serial multiplayer
The multiplayer mode links two machines over COM1 at 115200 bps. One player attacks by spending elixir to spawn enemies; the other defends by placing and upgrading towers. A custom binary protocol handles discovery, role negotiation, gameplay events, pause synchronization, and restart decisions.