Case study
Kinoko: reimplementing Mario Kart Wii’s physics engine for exact ghost replay
Re-implements Mario Kart Wii’s physics engine in C++ as a command-line simulator, continuing stblr/Hanachan’s goal of perfectly accurate time-trial ghost replay. Each test case replays a recorded ghost through the engine and compares kart position, rotation, velocities, speed and checkpoint state frame by frame with a trace captured from the original game. It is a behavioural reimplementation of the physics only, not a matching decompilation, and has no graphical frontend.
Requirements & limits
- README describes a C++ reimplementation of Mario Kart Wii’s physics engine aiming at perfectly accurate ghost replay. At the reviewed commit STATUS.md lists 55 time-trial ghost test cases, each marked synchronized for every frame; the latest GitHub release, 0.6 (2025-09-04), adds x86-64 Linux, macOS and Windows binaries of the simulator. Source comments name addresses in the original game, but nothing rebuilds its executable; README points to the separate riidefi/mkw matching decompilation for that.
- Running needs the Race folder (the Common and course archives) from your own Mario Kart Wii disc, placed relative to the executable; the repository ships no game files, and README requires any contributed frontend not to distribute in-game assets. The committed samples are time-trial ghost files (.rkg) with per-frame .krkg reference traces that README says come from a custom vabold/mkw-sp build running the PAL release; such traces are verification data captured from the game, as is common for reconstruction projects.
- README lists g++ 13.1 with C++23, ninja 1.3 and Python 3.6; configure.py generates the ninja build and compiles testCases.json into the binary suite file. CMakeLists.txt also exposes a libkinoko library target for embedding the engine in other C++23 projects. CI builds with GCC 14 on Ubuntu; the program is a command-line host with test and replay modes, and README says no GUI is planned.
- kinoko test compares position, rotation, internal and external velocity, speed, acceleration, soft speed limit, race completion and checkpoint values with every .krkg frame by exact equality and reports the first desynchronized frame; kinoko replay checks whether a ghost finishes with the time in its .rkg header. CI runs the suite with runtime files fetched from a secret-configured URL and checks that STATUS.md is current. These are project-reported results; this collection built and ran nothing.
- LICENSE applies MIT (copyright vabold, 2022–2026) to the project; Mario Kart Wii and its game data keep Nintendo’s rights, and the bundled doxygen-awesome-css theme has its own license file. The reviewed sources establish no AI or REA use, and no runtime reproduction is claimed.
About this entry
- Type
- Case study
- Category
- Independent reconstruction cases
- Relationship
- Independent reconstruction project
- Targets
- Game
Sources reviewed
The description was reviewed against primary sources. This does not establish runtime testing, security auditing or verified compatibility.
Primary sources
- README.md GitHub · vabold/Kinoko · Revision 550c97a
- STATUS.md GitHub · vabold/Kinoko · Revision 550c97a
- docs/KRKG.md GitHub · vabold/Kinoko · Revision 550c97a
- docs/TestCase.md GitHub · vabold/Kinoko · Revision 550c97a
- source/host/KTestSystem.cc GitHub · vabold/Kinoko · Revision 550c97a
- source/game/system/ResourceManager.cc GitHub · vabold/Kinoko · Revision 550c97a
- configure.py GitHub · vabold/Kinoko · Revision 550c97a
- CMakeLists.txt GitHub · vabold/Kinoko · Revision 550c97a
- .github/workflows/build.yml GitHub · vabold/Kinoko · Revision 550c97a
- tools/status_check.py GitHub · vabold/Kinoko · Revision 550c97a
- LICENSE GitHub · vabold/Kinoko · Revision 550c97a
- https://github.com/vabold/Kinoko/releases/tag/0.6
More in Games
- Mario Kart: Double Dash!!: a matching GameCube decompilation of the debug build · Case study
- 3S Decomp: a byte-compared PS2 decompilation of Street Fighter III: 3rd Strike · Case study
- Halo: Combat Evolved: an incremental re-implementation patched into the original Xbox executable · Case study
- Paper Mario: The Thousand-Year Door: an early matching GameCube decompilation · Case study
- 3SX: a native Street Fighter III: 3rd Strike port continuing the PS2 decompilation · Case study
- re4: a byte-identical decompilation of the Resident Evil 4 GameCube debug build · Case study