Play in the browser
The original C++ compiled to WebAssembly with Emscripten. Nothing loads until you press a button, and only one game runs at a time.
Abstract
A real-time 2D graphical game built in C++ with the SDL2 graphics library. The player pilots a ship, dodging and shooting waves of viruses that chase across the screen. The project explores game-loop architecture, sprite rendering, collision detection, bullets, power-ups, and clean object-oriented design following SOLID principles.
Tech
Written in modern C++ (C++17) using SDL2 and SDL2_gfx for rendering. Uses a class hierarchy of Units (Player, Virus, Bullet, Powerup) driven by a fixed-timestep game loop, with a lightweight SDL wrapper for window and draw management.
Gameplay
Cursor keys move the ship; press 's' to shoot. Viruses spawn and hunt the player, splitting and multiplying. Collect power-ups to change bullet types and survive as long as possible.