Game Programming (CGP2015), University of Lincoln · May 2024 · Project page: Geometry Beats

The idea
I wanted my own take on Geometry Wars, with one twist: timing matters. In most twin-stick shooters you just hold fire. In Geometry Beats, shooting in time with the music builds a combo, the combo powers up your gun and multiplies your score, and firing off-beat breaks it. It turns a button-mashing shooter into something closer to a rhythm game.
You’re a small ship in an arena. Shape creatures “swim” out of portals in the four corners and home in on you. You always die in the end. The only question is how high your score gets first.
Built from scratch in C++
No engine this time: just C++ and SDL2 (with SDL_image, SDL_ttf and SDL_mixer for sprites, text and audio). That meant building everything myself: the game loop, collisions, animation, UI and timing.
The decision that paid off most was a small Clock class that everything reads time from. It kept movement and animation consistent across machines, and it made the rhythm system possible: the game always knows exactly where it is in the song, so it can tell whether a shot landed on the beat.
What’s in it
- Movement with acceleration, and a blink that teleports you forward over enemies when you’re boxed in
- Two enemy types built on a shared base class: diamonds chase you directly, while squares only move horizontally or vertically. That small difference is what makes the arena hard, because enemies arrive from every angle
- The combo system: a circle on screen pulses in time with the beat. Keep your shots on it and you fire bigger special projectiles; miss and the game tells you the combo’s gone
- Score goals: reach 500 points and the song keeps going for another 15 seconds
- Sprite animation throughout: enemies squish and pop as they swim, the ship flashes when hit, and there’s a five-frame explosion when you die
- Quality-of-life tools: F11 for borderless fullscreen that keeps the aspect ratio, and F10 to toggle a debug log that reports what the game is doing and how long each step takes in milliseconds
Picking the song
The track is Gravity Killer by Hazan. I chose it because it sits at 120 BPM. Fast enough to feel frantic, slow enough that people can actually hit the beat. It also has the right spacey feel for the setting.
What I’d add next
Power-ups and more enemy types for variety, and a pass on visuals and sound to make hitting the beat feel even better. Since university I’ve gone back to it and got it running in the browser, so you can play it on this site.