CTR-RS
Crash Team Racing (1999), rebuilt in Rust for online play.
About
ctr-rs is an online-focused reimplementation of Crash Team Racing (PS1, 1999), written in Rust.
What's here
- Exact, reference-checked physics Kart physics and collision follow the original tick for tick. We check them against the C decompilation, ctr-native. The weapons, crates and the level's objects follow the original closely.
- Truly native performance, frame rates and aspect ratios The original look has a charm of its own, but the reimplementation has no need for PGXP or other (awesome) emulator hacks, since it has full-precision vertices and a real depth buffer.
- Cross-platform It runs and builds on any system that Rust builds on, and in the browser too.
- Hassle-free online play No patched ROMs, emulator builds or launchers required.
- Peer-to-peer networking Players are directly connected to each other over QUIC, using iroh.
- No network setup No port forwarding, DMZ or dedicated servers. Connections punch through NAT automatically, and fall back to a relay when they can't.
- 30 Hz simulation, high-FPS rendering The game state advances at the original's 30 ticks a second, independent of the rendering frame rate.
- Custom tracks Drag and drop an
.xdelta(from e.g. CTR Custom Tracks) onto the client window, and play it with your friends right away.
Not planned
- Adventure mode
- Time trial
- Relic race
- Battle mode
How to play
You provide your own legally obtained disc image of Crash Team Racing (USA).
In the browser: press start and drop the .bin on
the page. The image is read on your computer and is never uploaded. Needs a keyboard and a
browser with WebGL2; the first load is a big download.
Natively: a build from the
releases asks for the image the first
time it starts. The macOS build is not signed, so allow it in System Settings → Privacy
& Security ("Open Anyway"), or run
xattr -dr com.apple.quarantine ctr-rs.app. On Linux, make the
.AppImage executable (chmod +x) and run it.
From source: the client asks for the image with a file dialog the first time; or
point CTR_BIN at it, or put it at assets/ctr-u.bin.
cargo run -p client
] and [ switch the level, . and ,
switch the racer, and Enter opens the in-game console for /
commands and chat.
Prior work
This project stands on the work of the CTR community, and absolutely could not exist without it.
- ctr-native A native PC port of the game built on the decompilation. Our first reference for how the game behaves, and the oracle our physics tests compare against.
- CTR-ModSDK The decompilation, symbols and headers that came out of it, which we use for the layouts of the game's data and for what ctr-native lacks.
- CTR-Tools The community whose years of reverse engineering of the game's formats and code made both of those possible.
- PsyCross And REDRIVER2,
whose GTE (the PS1's geometry coprocessor) implementation is ported in
crates/gte.
ctr-rs is a Rust port that works from these projects. It is not a fork of any of them.
Notice
ctr-rs is an independent fan project, not affiliated with or endorsed by Sony Interactive Entertainment, Activision Publishing, Naughty Dog or any other rights holder. It ships no game content: no art, models, textures, sounds, music, levels or disc contents. You provide your own legally obtained copy of the game, and everything is read from it at runtime. Custom tracks are not shipped either: you import them yourself from patches you have obtained.
Crash Team Racing was developed by Naughty Dog and published by Sony Computer Entertainment. Crash Bandicoot and Crash Team Racing are trademarks of Activision Publishing, Inc. PlayStation is a trademark of Sony Interactive Entertainment Inc.
Our own code is licensed under the
GNU General Public License,
version 3, the license of ctr-native and CTR-ModSDK, the projects it is ported from. crates/gte is also
derived from MIT-licensed code; see
THIRD_PARTY_NOTICES.md.
LLM-based tooling was heavily used in the construction of this project.