Skip to content

Theodor908/CubeRunner

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CubeRunner

A 3D platformer built with Unity where the player controls a cube running across procedurally generated platforms. The game gets progressively harder as speed increases, and features a risk-based scoring system that rewards risky jumps, edge landings, and combos. A global leaderboard tracks the highest scores using a Node.js backend with PostgreSQL.

How to Play

  • A / D or Left / Right Arrow - Move left/right
  • Space - Jump (double jump available mid-air)
  • Left Ctrl - Crouch (builds up a speed boost while grounded)
  • Mouse Scroll - Zoom camera in/out

Avoid obstacles (rotating blades, falling blocks, walls) and don't fall off the platforms. The further you go, the higher your score.

Requirements

  • Unity 6000.2.7f2 (or compatible)
  • Node.js (for the leaderboard backend)
  • PostgreSQL 15+ (database for scores)

Getting Started

Game (Unity)

  1. Clone this repo
  2. Open the project folder in Unity Hub
  3. Open Assets/Scenes/MainMenu.unity (or whichever scene is set as the start scene)
  4. Hit Play

Leaderboard Backend

The game connects to a REST API at localhost:3000 for score submission and leaderboard fetching. To run the backend:

  1. Set up a PostgreSQL database (the project uses postgres:15-alpine via Docker)
  2. Run the Node.js server:
    cd <backend-directory>
    npm install
    npm start
    
  3. The API will be available at http://localhost:3000/api

The game works without the backend, but leaderboard features won't load.

Project Structure

Assets/
  Scripts/
    Manager/       - GameManager, scoring, leaderboard logic
    Player/        - Player controller, gravity, camera, input
    Platform/      - Platform types (base, speed boost, obstacles)
    Spawner/       - Procedural platform spawning
    Obstacles/     - Obstacle behaviors (rotating, falling, wall)
    UI/            - Score display, endgame screen, main menu

Screenshots

Backend

Backend

Game Start

Game Start Character Select

Gameplay

Gameplay 1 Gameplay 2 Gameplay 3

License

This project is licensed under the MIT License - see LICENSE for details.

About

A 3D endless runner platformer built in Unity with procedural platforms, risk-based scoring, and a global leaderboard.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors