A fun pygame-based game where you dodge falling red blocks and score points!
This enhanced version includes:
- Welcome screen with game title and instructions
- "Start Game" button to begin playing
- "Quit" button to exit the game
- Clear instructions on how to play
- Smooth player controls using LEFT and RIGHT arrow keys
- Falling red blocks to dodge
- Real-time score tracking
- Visual enhancements:
- Player block with white outline
- Score display with background panel
- Pause hint in the corner
- Press ESC during gameplay to pause
- Semi-transparent overlay over the game
- Options to:
- Resume the game
- Return to main menu
- Displays final score
- Options to:
- Play again (restart the game)
- Return to main menu
-
Run the game:
python3 app.py
-
Controls:
- LEFT ARROW: Move left
- RIGHT ARROW: Move right
- ESC: Pause/Resume game
- MOUSE: Click buttons in menus
-
Objective:
- Dodge the falling red blocks
- Each block that falls off the screen adds to your score
- Game ends when you collide with a block
- Python 3.x
- pygame
Install pygame:
pip install pygameThe game includes four main screens:
- Main Menu - Welcome screen with instructions
- Gameplay - Active game with score and controls
- Pause Menu - Pause overlay with options
- Game Over - Final score and restart options
- ✅ State-based game management (Menu, Playing, Paused, Game Over)
- ✅ Interactive buttons with hover effects
- ✅ Professional-looking UI with multiple colors
- ✅ Smooth transitions between game states
- ✅ Pause functionality
- ✅ Restart capability without closing the game
- ✅ Enhanced visual design with outlines and backgrounds
- ✅ In-game instructions and hints
Enjoy playing! 🎮