Smart City: Neo Guardians
A smart city under threat, built from the game loop up in C and SDL.
A 2D smart-city game built from scratch in C with SDL — a team project spanning animated characters, scrolling maps, collisions, enemies, a minimap and timed riddle mini-games.
Smart City: Neo Guardians
The problem
A smart city needs new guardians. The brief was to make that premise playable without a game engine — which meant building the world, movement, collisions and rules from the systems up.
The approach
Build a compact 2D adventure around a hand-drawn menu, animated sprites and a scrolling city, then layer in enemies, collectibles, lives, a minimap and timed riddles to give the game rhythm.
What I built
- ✱Menu flow with new game, continue, settings, credits and three difficulty levels
- ✱Animated hero and enemy sprites with running, jumping and enemy pursuit
- ✱Scrolling city backgrounds with pixel-mask collision detection
- ✱Score, lives, collectible bonuses and a live minimap
- ✱Timed riddle mini-games with win/lose screens
- ✱Music, sound effects and optional Arduino/serial input
Challenges
Writing collision detection against pixel masks instead of an engine's physics
Keeping animation, scrolling and input stable at a 60 FPS game loop
Coordinating the menu, character, map, minimap and mini-game modules into one build
Integrating serial input from an Arduino alongside the keyboard
What I learned
- ✱How a 2D game is assembled from a loop, sprites, input, timing and state
- ✱Working directly with SDL surfaces and masks instead of an engine
- ✱Organising a larger C project into modules with a Makefile
- ✱Designing game feel when every frame is something you have to draw yourself
Where it landed
A playable 2D game with a complete menu-to-game flow, animated characters, enemies, a minimap and timed mini-games — built as a team project in C and SDL.
What I'd improve next
Controller remapping, more city levels, and a cleaner asset pipeline so new sprites and maps can be added without rebuilding by hand.
Next project
Cloud security — 2026