Shape Shooters · 2020 · university project
Shape Shooters - C++ Game Engine
A university project: a multiplayer arcade shooter and the small engine under it, written from scratch in C++ with SFML. My first real lesson in game loops, timing, and why collision detection is never quite finished.
- Layers
- interface, application
- Built with
- C++ · SFML · OOP · UML · Game Development
- Elsewhere
- source on GitHub
- 1Entity · position, velocity, bounding box
- 2Spatial grid · only neighbours get tested
- 3Velocity · integrated every frame with dt
- 4Frame budget · 16.7 ms, measured each loop
- 5Class hierarchy · Entity, then Ship, Enemy, Bullet
The problem
A university project with a wide-open brief and one hard constraint: build a game, but build the engine too, in C++ with SFML and no game framework to lean on.
What I built
A multiplayer arcade shooter in which everything is a geometric shape, and the small engine under it: a game loop with proper timing4, an entity model1 built on object-oriented design patterns, collision detection with bounding boxes2, a scoring and state system, power-ups, and several enemy types5 with their own behaviour. I drew the architecture in UML first and kept the engine separate from the game that runs on it.
What I learned
Game loops teach you about time in a way web work never does: everything happens every sixteen milliseconds, or it does not happen. I learned that collision detection is never quite finished, that a clean entity model pays for itself the moment you add the third enemy type, and that drawing the design before writing it is not bureaucracy.