Skip to content

buaiml/doodle_jump

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Doodle Jump

A Python implementation of the classic Doodle Jump game built with Pygame. Features both human-playable and AI training modes with optimized performance.

Features

  • 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

Setup

Prerequisites

  • Python 3.13+

Installing Python 3.13

macOS

# Using Homebrew
brew install python@3.13

# Or download from python.org
# Visit https://www.python.org/downloads/

Ubuntu/Debian

# 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

Windows

# Download installer from https://www.python.org/downloads/
# Or using winget
winget install Python.Python.3.13

Verify Installation

python3.13 --version
# Should show: Python 3.13.x

Installation

  1. Clone the repository:
git clone <repository-url>
cd doodle_jump
  1. Install Poetry (if not already installed):
curl -sSL https://install.python-poetry.org | python3 -
  1. Install dependencies:
poetry install

How to Play

Controls

  • Arrow Keys / A/D: Move left and right
  • Spacebar: Shoot bullets (to destroy enemies)
  • R: Restart game (when game over)

Gameplay

  • 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)

Scoring

  • Gain points by reaching higher altitudes
  • Earn bonus points (50) for destroying enemies
  • Try to achieve the highest score possible!

Running the Game

Human Play Mode

poetry run python main.py

Headless/Training Mode

from 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 training

Project Structure

  • game.py: Main game engine and physics
  • controller.py: Controller interface for AI/human input
  • main.py: Entry point for human gameplay
  • assets/: Game sprites and graphics
  • pyproject.toml: Poetry configuration

Development

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

Contributing

Feel free to submit issues and pull requests to improve the game!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages