A classic Brick Breaker game developed in C++ using SDL2 library with modern graphics, sound effects, and multiple difficulty levels. This project demonstrates advanced game programming concepts including physics simulation, collision detection, event handling, and state management.
- Classic Brick Breaker mechanics with paddle and ball physics
- Collision detection system for ball-paddle and ball-brick interactions
- Dynamic ball physics with realistic bounce angles based on paddle position
- Lives system with game over functionality
- Scoring system with persistent high score tracking
- Multiple difficulty levels: Easy, Medium, Hard
- Special brick types: Normal bricks and indestructible special bricks
- Progressive difficulty with varying brick layouts
- Main Menu with intuitive navigation
- Pause Menu for in-game control
- High Score Display with reset functionality
- Help Section with game instructions
- Level Selection Menu
- Background music with different tracks for menus and gameplay
- Sound effects for ball collisions and game events
- Custom graphics for all game elements (ball, paddle, bricks, backgrounds)
- Smooth animations and visual feedback
- 60 FPS gameplay with precise timing control
- File I/O for high score persistence
- Memory management with proper resource cleanup
- Event-driven architecture for responsive controls
- Modular code structure with separate headers
- C++ - Core game logic and application development
- Modern C++ standards with object-oriented programming principles
- SDL2 - Cross-platform multimedia library for graphics rendering
- SDL2_image - Image loading and texture management
- SDL2_ttf - True Type Font rendering for text display
- SDL2_mixer - Audio playback for music and sound effects
- Visual Studio 2022 - Integrated Development Environment
- MSBuild - Build system and project management
- Git - Version control system
- Custom sprite graphics for game elements
- Audio files (WAV, MP3) for immersive sound experience
- TTF fonts for text rendering
- Arrow Keys or A/D Keys - Move paddle left/right
- P Key - Pause/Resume game
- Mouse - Navigate menus
- ESC Key - Access pause menu
- Break all the normal bricks (colored) to win the level
- Avoid letting the ball fall below the paddle
- Special bricks (doom-style) are indestructible - avoid them!
- Achieve the highest score possible
- Each normal brick destroyed = 5 points
- Track your high score across gaming sessions
- Challenge yourself with different difficulty levels
- Windows 10/11 operating system
- Visual Studio 2019/2022 with C++ development tools
- SDL2 Development Libraries (included in project)
-
Clone the repository:
git clone https://github.com/Clear20-22/FOP_Project.git cd FOP_Project -
Open the project:
- Launch
block/block.slnin Visual Studio - Or open the entire folder in Visual Studio Code
- Launch
-
Build and run:
- Set configuration to Debug or Release
- Set platform to x64
- Press F5 to build and run
All required SDL2 libraries and DLLs are included:
SDL2.dll- Core SDL functionalitySDL2_image.dll- Image loading supportSDL2_ttf.dll- Font renderingSDL2_mixer.dll- Audio playback
FOP_Project/
โโโ block/
โ โโโ main.cpp # Main game logic and entry point
โ โโโ Macros.h # Game constants and configuration
โ โโโ Menu.h # Menu system implementation
โ โโโ Header.h # Additional headers
โ โโโ block.sln # Visual Studio solution file
โ โโโ block.vcxproj # Project configuration
โ โโโ highscore.txt # Persistent high score storage
โ โโโ *.dll # SDL2 runtime libraries
โ โโโ *.ttf # Font files
โ โโโ ball_image_sound/ # Game assets
โ โโโ *.png # Sprite graphics
โ โโโ *.wav, *.mp3 # Audio files
โ โโโ background images
โโโ x64/Debug/ # Compiled executable
โโโ README.md # Project documentation
- Modular design with separate headers for different functionalities
- Function-based approach with clear separation of concerns
- Resource management with proper initialization and cleanup
- Constants file for easy game balancing and configuration
- Game Loop: Main update-render cycle with fixed timestep
- Physics Engine: Custom collision detection and ball physics
- State Management: Menu systems and game state transitions
- Asset Manager: Texture and audio resource loading
- Input Handler: Keyboard and mouse event processing
- Efficient rendering with texture reuse
- Optimized collision detection for game objects
- Memory-conscious resource management
- Frame rate limiting for consistent gameplay
- Ball sprites: Multiple ball designs
- Paddle graphics: Custom paddle texture
- Brick textures: Various brick types and colors
- Background images: Immersive space-themed backgrounds
- UI elements: Menu backgrounds and visual effects
- Background music: Multiple tracks for different game states
- Sound effects: Ball hits, brick breaking, game over sounds
- Audio formats: WAV for effects, MP3 for music
- Vector-based movement with velocity calculations
- Collision response with realistic bounce angles
- Boundary detection for screen edges and game objects
- Mathematical calculations for paddle-based ball direction
- SDL2 renderer for hardware-accelerated graphics
- Texture management for efficient sprite rendering
- Text rendering with TTF font support
- Layered rendering for proper visual hierarchy
- Multi-channel audio with SDL2_mixer
- Background music streaming with loop support
- Sound effect triggers based on game events
- Audio resource management with proper cleanup
- Object-Oriented Programming in C++
- Memory Management and resource handling
- File I/O Operations for data persistence
- Event-Driven Programming for user interaction
- Mathematical Programming for physics calculations
- Game Loop Architecture with update/render cycles
- State Management for different game screens
- Collision Detection algorithms
- Physics Simulation for realistic ball movement
- User Interface Design and navigation systems
- Modular Code Design with header files
- Version Control with Git
- Project Management with Visual Studio
- Documentation and code organization
- Cross-platform Library Integration
- Power-ups: Multi-ball, larger paddle, extra lives
- Level progression: Multiple levels with increasing difficulty
- Particle effects: Visual effects for brick destruction
- Leaderboard system: Online score tracking
- Customizable controls: Key binding options
- Cross-platform support: Linux and macOS compatibility
- Configuration files: External game settings
- Level editor: Custom level creation tools
- Performance profiling: Optimization analysis
- Unit testing: Automated testing framework
Project Type: Game Development | Academic Project
Development Time: [Your timeframe here]
Complexity Level: Intermediate to Advanced
Code Quality: Production-ready with proper documentation
This project is part of an academic portfolio and is available for educational purposes. Please respect intellectual property rights for any third-party assets used.
Based on this project, you can confidently list these skills on your LinkedIn profile:
- C++ Programming
- Game Development
- SDL2 Framework
- Object-Oriented Programming (OOP)
- Memory Management
- Graphics Programming
- Audio Programming
- Physics Simulation
- Collision Detection
- Event-Driven Programming
- Visual Studio
- Git Version Control
- MSBuild
- Debugging & Profiling
- Project Management
- Software Architecture
- Code Organization
- Documentation
- Resource Management
- Performance Optimization
- Cross-platform Development
- Game Loop Design
- State Management
- User Interface (UI) Development
- Asset Management
- Real-time Systems
- Interactive Application Development
This project demonstrates practical application of computer science fundamentals in a real-world gaming context, showcasing both technical proficiency and creative problem-solving abilities.