Skip to content

About

A portable version of LEGO Racers (1999)

Resources

Contributing

Stars

38 stars

Watchers

3 watching

Forks

Repository files navigation

LEGO Racers, portable

This initiative is a portable version of LEGO Racers (1999) based on the decompilation project. Our primary goal is to transform the codebase to achieve platform independence, thereby enhancing compatibility across various systems while preserving the original game's experience as faithfully as possible.

Please note: this project is primarily dedicated to achieving platform independence without altering the core gameplay or rewriting code for improvement's sake. While those are worthwhile objectives, they are not within the scope of this project.

Status

Platform Status
Windows (x64) CI
macOS (arm64) CI
Linux (x64) CI
Web CI

We are actively working to support more platforms. If you have experience with a particular platform, we encourage you to contribute to racers-portable.

Usage

An existing copy of LEGO Racers is required to use this project.

Place the built LEGORacers executable next to the game's data files (LEGO.JAM, the *.TUN music files, and the intro *.AVI movies), or point it at them with --path <directory>. The original game's command-line arguments (-window, -novideo, -horzres, -vertres, …) are supported, plus:

  • --renderer sdlgpu|opengl3|opengles3 — select the render backend: SDL3 GPU (default; Vulkan/Metal/Direct3D 12), OpenGL 3.3, or OpenGL ES 3.0 / WebGL2. It can also be changed in-game under Options → Video (the game relaunches to apply it).
  • --scale letterbox|stretch — fullscreen scaling: keep the 4:3 aspect ratio with black bars (default) or fill the screen.
  • --resolution native|original — render 3D at the display resolution (default) or at the game's original 640x480, upscaled.
  • --language <index> — seeds the language selection the original stored in the registry.

Alt+Enter toggles fullscreen. The intro movies play from the original Indeo 5 AVIs.

Library substitutions

To achieve our goal of platform independence, we need to replace any Windows-only libraries with platform-independent alternatives. This ensures that our codebase remains versatile and compatible across various systems. The following table serves as an overview of major libraries / subsystems and their chosen replacements.

Library/subsystem Substitution Status
Window, Events SDL3 ✅
Filesystem SDL3, POSIX shims ✅
Threads, Mutexes (Synchronization) SDL3 ✅
Keyboard/Mouse, DirectInput (Input) SDL3 ✅
Joystick/Gamepad + Force Feedback, DirectInput (Input) SDL3 ✅
WinMM (timers), DirectSound (Audio) SDL3, miniaudio ✅
DirectDraw (2D video) SDL3 ✅
Direct3D immediate mode (3D rendering) SDL3 GPU (default; Vulkan/Metal/D3D12), OpenGL 3.3, and OpenGL ES 3.0 / WebGL2 ✅
DirectShow, Indeo 5 (Video playback) In-tree AVI demuxer + Indeo 5 decoder (vendored from FFmpeg n4.4.4, byte-exact against ffmpeg), SDL3 ✅
Windows Registry (Language selection) Command line (--language) ✅

Building

This project uses the CMake build system, which allows for a high degree of versatility regarding compilers and development environments.

cmake -S . -B build -DCMAKE_BUILD_TYPE=RelWithDebInfo
cmake --build build

Contributing

If you're interested in helping or contributing to this project, check out the CONTRIBUTING page.

About

A portable version of LEGO Racers (1999)

Resources

Contributing

Stars

38 stars

Watchers

3 watching

Forks

Releases

Packages

Contributors

Languages