Skip to content

sp00nznet/retroracer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

45 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐ŸŽ๏ธ RetroRacer

A retro-style 3D racing game for the SEGA Dreamcast

Inspired by the golden era of N64 and PS1 racing games

Platform License Built with


๐Ÿ“– About

RetroRacer is a love letter to the arcade racing games of the late 90s. Built from the ground up for the SEGA Dreamcast using KallistiOS, it features procedurally generated tracks, N64-style low-poly graphics, and fast arcade action.

Every race is unique thanks to the procedural track generation system - no two races are ever the same!

โœจ Features

  • ๐ŸŽฎ 4 Game Modes - Something for everyone
  • ๐Ÿ›ฃ๏ธ Procedural Tracks - Infinite variety with randomly generated circuits
  • ๐Ÿค– AI Opponents - Race against up to 7 computer-controlled vehicles
  • ๐Ÿ† Championship Mode - Compete in a 4-race Grand Prix series
  • โฑ๏ธ Time Trials - Perfect your racing line and beat your best times
  • ๐ŸŽจ Retro Aesthetics - Authentic N64-era low-poly graphics

๐ŸŽฎ Game Modes

1. ๐Ÿ‘๏ธ AI Race (Spectator Mode)

Sit back and watch AI drivers compete against each other. Perfect for demos or just enjoying the procedural tracks. Choose from 4 difficulty levels to see different racing strategies.

2. ๐Ÿ Single Track

Jump right into the action! Race a single procedurally generated track against AI opponents. Quick and satisfying gameplay.

3. โฑ๏ธ Time Trial

No opponents, no distractions - just you against the clock. Master the track and shave seconds off your best lap time. Ghost data tracks your personal best.

4. ๐Ÿ† Grand Prix

The ultimate test! Compete in a 4-race championship series. Earn points based on your finishing position across all races. Different tracks each race keep you on your toes.

Points System:

Position 1st 2nd 3rd 4th 5th 6th 7th 8th
Points 10 8 6 5 4 3 2 1

๐Ÿš— Vehicle Classes

Choose your ride! Each vehicle class offers a different driving experience:

Class Top Speed Acceleration Handling Best For
Standard โ˜…โ˜…โ˜…โ˜†โ˜† โ˜…โ˜…โ˜…โ˜†โ˜† โ˜…โ˜…โ˜…โ˜†โ˜† Beginners
Speed โ˜…โ˜…โ˜…โ˜…โ˜… โ˜…โ˜…โ˜…โ˜…โ˜† โ˜…โ˜…โ˜†โ˜†โ˜† Straights
Handling โ˜…โ˜…โ˜†โ˜†โ˜† โ˜…โ˜…โ˜…โ˜†โ˜† โ˜…โ˜…โ˜…โ˜…โ˜… Tight corners
Balanced โ˜…โ˜…โ˜…โ˜…โ˜† โ˜…โ˜…โ˜…โ˜…โ˜† โ˜…โ˜…โ˜…โ˜…โ˜† All-rounders

๐ŸŽฏ Controls

Dreamcast Controller

                    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
                    โ”‚            DREAMCAST                โ”‚
    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
    โ”‚               โ”‚                                     โ”‚               โ”‚
    โ”‚   Analog      โ”‚           โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”               โ”‚    X  Y       โ”‚
    โ”‚   Stick       โ”‚           โ”‚  START  โ”‚               โ”‚               โ”‚
    โ”‚     โ—‹         โ”‚           โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜               โ”‚    A  B       โ”‚
    โ”‚               โ”‚                                     โ”‚               โ”‚
    โ”‚   D-Pad       โ”‚                                     โ”‚               โ”‚
    โ”‚   โ”Œโ”€โ”€โ”€โ”       โ”‚                                     โ”‚               โ”‚
    โ”‚   โ”‚ โ–ฒ โ”‚       โ”‚                                     โ”‚               โ”‚
    โ”‚ โ”Œโ”€โ”ผโ”€โ”€โ”€โ”ผโ”€โ”     โ”‚                                     โ”‚               โ”‚
    โ”‚ โ”‚โ—„โ”‚   โ”‚โ–บโ”‚     โ”‚                                     โ”‚               โ”‚
    โ”‚ โ””โ”€โ”ผโ”€โ”€โ”€โ”ผโ”€โ”˜     โ”‚                                     โ”‚               โ”‚
    โ”‚   โ”‚ โ–ผ โ”‚       โ”‚                                     โ”‚               โ”‚
    โ”‚   โ””โ”€โ”€โ”€โ”˜       โ”‚                                     โ”‚               โ”‚
    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
          โ”‚                                                      โ”‚
     Left Trigger                                          Right Trigger
       (Brake)                                              (Throttle)

Racing Controls

Control Action
Analog Stick / D-Pad โ—„โ–บ Steering
A Button / Right Trigger Accelerate
B Button / Left Trigger Brake
Start Pause Game

Menu Controls

Control Action
D-Pad โ–ฒโ–ผ Navigate menu
A / Start Select
B Back

Exit Game

Hold A + B + X + Y + Start simultaneously to exit to Dreamcast BIOS.


๐Ÿ—๏ธ Building

Quick Start (Windows)

The easiest way to build on Windows:

# One-time setup (installs Docker Desktop)
scripts\windows\setup.bat

# Build the game
build.bat

Quick Start (Linux/Mac)

Using Docker (no setup required):

./scripts/docker-build.sh

Or install the full toolchain:

./scripts/setup-kos.sh
source scripts/env.sh
./scripts/build.sh

Build Targets

Command Description
build.bat / ./scripts/build.sh Build ELF executable
build.bat cdi Create bootable disc image
build.bat clean Clean build artifacts
build.bat shell Interactive build environment

Requirements

Option A: Docker (Recommended)

  • Docker Desktop (Windows/Mac) or Docker Engine (Linux)
  • No other dependencies needed!

Option B: Full Toolchain

  • KallistiOS SDK
  • SH4 cross-compiler (sh-elf-gcc)
  • ARM cross-compiler (arm-eabi-gcc)

๐Ÿ“ Project Structure

retroracer/
โ”œโ”€โ”€ ๐Ÿ“„ Makefile              # KallistiOS build configuration
โ”œโ”€โ”€ ๐Ÿ“„ build.bat             # Windows build script
โ”œโ”€โ”€ ๐Ÿ“ include/              # Header files
โ”‚   โ”œโ”€โ”€ ai.h                 # AI racing system
โ”‚   โ”œโ”€โ”€ game.h               # Game state management
โ”‚   โ”œโ”€โ”€ input.h              # Controller input
โ”‚   โ”œโ”€โ”€ math3d.h             # 3D math library
โ”‚   โ”œโ”€โ”€ menu.h               # Menu system
โ”‚   โ”œโ”€โ”€ physics.h            # Physics engine
โ”‚   โ”œโ”€โ”€ render.h             # PVR rendering
โ”‚   โ”œโ”€โ”€ track.h              # Track generation
โ”‚   โ””โ”€โ”€ vehicle.h            # Vehicle physics
โ”œโ”€โ”€ ๐Ÿ“ src/                  # Source files
โ”‚   โ”œโ”€โ”€ main.c               # Entry point
โ”‚   โ”œโ”€โ”€ game.c               # Core game logic
โ”‚   โ”œโ”€โ”€ ai.c                 # AI behavior
โ”‚   โ”œโ”€โ”€ input.c              # Input handling
โ”‚   โ”œโ”€โ”€ math3d.c             # Vector/matrix math
โ”‚   โ”œโ”€โ”€ menu.c               # Menu UI
โ”‚   โ”œโ”€โ”€ physics.c            # Collision detection
โ”‚   โ”œโ”€โ”€ render.c             # Graphics rendering
โ”‚   โ”œโ”€โ”€ track.c              # Procedural track generation
โ”‚   โ””โ”€โ”€ vehicle.c            # Vehicle dynamics
โ”œโ”€โ”€ ๐Ÿ“ scripts/
โ”‚   โ”œโ”€โ”€ setup-kos.sh         # KallistiOS installer
โ”‚   โ”œโ”€โ”€ build.sh             # Linux/Mac build script
โ”‚   โ”œโ”€โ”€ docker-build.sh      # Docker build script
โ”‚   โ””โ”€โ”€ ๐Ÿ“ windows/          # Windows-specific scripts
โ””โ”€โ”€ ๐Ÿ“ assets/               # Game assets (models, textures)

๐Ÿ”ง Technical Details

Engine Features

  • Rendering: PowerVR hardware-accelerated 3D graphics
  • Resolution: 640ร—480 @ 60fps target
  • Physics: Arcade-style vehicle dynamics with grip simulation
  • AI: Path-following with overtaking and difficulty scaling
  • Tracks: Procedural generation with straights, curves, and elevation

Procedural Track Generation

Tracks are generated using a seeded random algorithm that creates:

  • Straight sections - Variable length high-speed zones
  • Curves - Left and right turns up to 45ยฐ
  • Hills - Elevation changes for jumps and dips
  • Checkpoints - Lap timing and progress tracking

Each difficulty level affects track complexity:

  • Easy: Gentle curves, mostly flat
  • Medium: Moderate curves, some hills
  • Hard: Sharp turns, significant elevation
  • Expert: Technical circuits with maximum variety

๐Ÿ“œ License

This project is open source. Feel free to learn from it, modify it, and share it!


๐Ÿ™ Credits

  • KallistiOS - Dreamcast development library
  • Inspired by classic racers: Ridge Racer, Daytona USA, Mario Kart 64

Made with โค๏ธ for the Dreamcast community

Keep the dream alive!

About

Dreamcast racing game

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors