A Python implementation of the classic Doodle Jump game built with Pygame. Features both human-playable and AI training modes with optimized performance.
- Classic Doodle Jump gameplay with jumping physics and platform mechanics
- Multiple platform types: Green (normal), Blue (moving), Red (breaking), White (super jump)
- Enemy system with shooting mechanics
- Progressive difficulty with different zones and challenges
- AI/ML training support with headless mode and game state API
- High-performance rendering with asset loading and fallback graphics
- Python 3.13+
# Using Homebrew
brew install python@3.13
# Or download from python.org
# Visit https://www.python.org/downloads/# Add deadsnakes PPA for newer Python versions
sudo apt update
sudo apt install software-properties-common
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt update
sudo apt install python3.13 python3.13-pip python3.13-venv# Download installer from https://www.python.org/downloads/
# Or using winget
winget install Python.Python.3.13python3.13 --version
# Should show: Python 3.13.x- Clone the repository:
git clone <repository-url>
cd doodle_jump- Install Poetry (if not already installed):
curl -sSL https://install.python-poetry.org | python3 -- Install dependencies:
poetry install- Arrow Keys / A/D: Move left and right
- Spacebar: Shoot bullets (to destroy enemies)
- R: Restart game (when game over)
- Jump on platforms to climb higher
- Avoid falling off the screen
- Shoot red enemies to earn bonus points
- Different platform types:
- Green: Normal platforms
- Blue: Moving platforms
- Red: Breaking platforms (disappear after use)
- White: Super jump platforms (higher bounce)
- Gain points by reaching higher altitudes
- Earn bonus points (50) for destroying enemies
- Try to achieve the highest score possible!
poetry run python main.pyfrom game import DoodleJumpGame
from controller import Controller
# Create headless game for AI training
game = DoodleJumpGame(headless=True)
controller = YourAIController() # Implement your AI controller
# Training loop
while not game.is_game_over:
state = game.step(controller)
# Use state for ML traininggame.py: Main game engine and physicscontroller.py: Controller interface for AI/human inputmain.py: Entry point for human gameplayassets/: Game sprites and graphicspyproject.toml: Poetry configuration
The game is designed to be ML-friendly with:
- Headless mode for fast training (100x+ speed)
- Normalized game state API
- Configurable game parameters
- Efficient object pooling and culling
Feel free to submit issues and pull requests to improve the game!