A small 2D brick-breaker game implemented as an academic project, focusing on clean object-oriented design and basic game architecture.
- Classic brick-breaker gameplay: ball, paddle, bricks, lives, and win/lose conditions.
- Custom game loop with collision handling, reflection-based ball physics, and simple UI (numeric & graphic hearts).
- Multiple brick behaviors implemented via the Strategy pattern (extra ball/puck, bonus paddle, bonus heart, camera focus, and combinations via a double-strategy).
- Reuse of single strategy instances across all bricks for better memory usage, consistent behavior, and easier maintenance.
- The game manager (
BrickerGameManager) is responsible for adding and removing game objects, keeping object-lifecycle logic centralized. - Collision strategies receive a reference to the game manager and use tags to recognize the main ball, puck balls, and main paddle.
- Additional entities (puck ball, bonus paddle, bonus heart) extend existing game-object classes when there is a clear is-a relationship.
src/bricker/main– game entry point (BrickerGameManager)src/bricker/gameobjects– core game objects (ball, paddle, brick, hearts display, etc.)src/bricker/brick_strategies– collision strategies and the double-strategy logicassets– images and sound files used by the game
This project was originally built and run in IntelliJ IDEA with the academic danogl framework on the classpath.
- Open the project in IntelliJ (or any Java IDE).
- Ensure the
danogllibrary is configured as a dependency. - Run the
BrickerGameManagerclass in thebricker.mainpackage.