Skip to content

narmesh/cube_dodger

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

2 Commits
ย 
ย 
ย 
ย 

Repository files navigation

๐ŸŸฆ Cube Dodger โ€” 3D Free Movement Runner

Python Ursina Engine License Status

Cube Dodger is a fast-paced 3D endless runner game built in Python using the Ursina Engine. You control a cube on a large platform, dodging dynamically spawning obstacles while managing increasing speed. The challenge? Survive as long as you can and beat your high score!


๐ŸŽฎ Gameplay Features

  • ๐ŸŸฆ Free 3D Movement (Left, Right, Forward, Backward)
  • ๐Ÿ•น๏ธ Dynamic Camera Modes (Follow, Fixed, Orbit, First-Person)
  • ๐Ÿšง Randomized Obstacle Spawning (Low, Tall, Wide)
  • ๐Ÿƒ Auto-Forward Mode Toggle
  • ๐Ÿ† Score & Speed Scaling System
  • ๐Ÿ“Š Real-time Metrics Display (FPS, Speed, Obstacles)

๐Ÿ“ฆ Dependencies

Library Purpose
ursina 3D game engine (main framework)
random Obstacle spawn logic
math Camera orbit & rotation math

Install Dependencies:

pip install ursina

๐Ÿ“‚ Folder Structure

cube_dodger/
โ”œโ”€โ”€ cube_dodger.py      # Main game file (single-file project)
โ””โ”€โ”€ README.md            # Project documentation

โ–ถ๏ธ How to Play

  • Make sure Python 3.8+ is installed.
  • Install required dependencies:
pip install ursina
  • Run the game:
python cube_dodger.py

๐ŸŽฎ Controls

Action Key(s)
Move Left โฌ…๏ธ Left Arrow
Move Right โžก๏ธ Right Arrow
Move Forward โฌ†๏ธ Up Arrow
Move Backward โฌ‡๏ธ Down Arrow
Jump Spacebar
Toggle Auto-Forward V
Cycle Camera Modes C
Adjust Camera Zoom Page Up / Page Down
Restart (on Game Over) R
Quit Game ESC

๐Ÿงฉ Gameplay Logic Breakdown

  • Obstacles spawn from all platform edges and move towards the center.

  • Obstacle Types:

    • Normal Block (Red): Dodge sideways.
    • Low Wall (Orange): Jump over.
    • Tall Wall (Magenta): Must dodge sideways.
    • Wide Block (Yellow): Occupies more space horizontally.
  • Collision with obstacles ends the game.

  • Game Speed increases every few seconds.

  • Camera Modes can be switched on-the-fly.

๐Ÿ“Š On-Screen Metrics

  • FPS Counter
  • Current Game Speed
  • Active Obstacles Count
  • Player Position Coordinates
  • Camera Mode Status

๐Ÿ“ธ Screenshots

image

๐Ÿ‘จโ€๐Ÿ’ป Author

Narmesh Kumar Sah

โญ๏ธ Give it a Star!

If you like this project, don't forget to โญ๏ธ star it on GitHub!

About

My First 3D game

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages