C++/CMake 2D arcade game skeleton inspired by Bubble Bobble, using:
- SDL2 for windowing, input, and 2D rendering (with a path to migrate to shaders/OpenGL)
- Box2D for physics
- A small engine-style architecture (core/platform/render/physics/scenes)
This repo currently provides a minimal runnable loop and a clean architecture to build on.
- core/
Application: Owns main loop, SDL context, renderer, physics world, scene stack.GameConfig: Window and runtime options.Time: SimpleTimeStepwrapper.Scene/SceneStack: Stack-based state/scene management (menu, game, pause, etc.).
- platform/
SDLContext: RAII wrapper around SDL initialization, window, and renderer.
- render/
Renderer2D: Simple SDL2-based renderer abstraction.- Later: sprite batching, camera, shader/vertex effects (via OpenGL backend).
- physics/
PhysicsWorld: Wraps a Box2Db2Worldand time-stepping.
Game-specific logic (Bubble Bobble rules, player, enemies, levels, bubbles) will live in a future game/ module with dedicated scenes.
- A C++20 compiler
- CMake >= 3.16
- SDL2 development files
- Box2D development files
On Ubuntu (locally):
sudo apt-get install cmake ninja-build libsdl2-dev libbox2d-devcmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Debug
cmake --build build --config Debug --parallelThen run:
./build/bubble_dragonsYou should see an SDL window with a blank screen, ready for scenes and gameplay.
- Add a
game/module with:- Player controller and character physics (Box2D bodies).
- Bubble shooting, popping, and enemy capture mechanics.
- Tile-based levels and enemy AI patterns.
- Introduce an OpenGL-backed renderer for shaders and vertex effects (color pulses, distortions, scanlines).
- Implement asset loading (textures, animations, shaders, sounds).