Kinoko is a reimplementation of Mario Kart Wii's physics engine in C++. This project is a spiritual continuation of stblr/Hanachan. Like Hanachan, the goal of this reimplementation is to reach perfectly accurate ghost replay.
To see the current list of test cases and progress, visit STATUS.md.
Kinoko relies on files from the base game to run, with the same paths relative to the executable. Dolphin is the preferred method of extracting these files.
Generate the ninja file and test case binary:
Execute it:
Run Kinoko:
Currently, Kinoko runs by iterating over a set of test cases defined in testCases.json
.
Test cases use a custom .krkg
file format, which stores relevant in-game memory values to validate accuracy on every frame of a race. This file is generated using a custom version of MKW-SP.
mkw-sp-test
artifact at the bottom of the page.boot.dol
to a folder of your choosing.Default ISO
to the path of your Mario Kart Wii PAL ISO.boot.dol
.[DolphinDir]\User\Wii\title\00010004\524d4345\data
. You should see a new file called test.krkg
.Test cases are defined in testCases.json
in the following format:
rkgPath
is the path to the game's native ghost file for the time trial you want to simulate. krkgPath
points to the krkg file generated in the previous section for this time trial ghost. targetFrame
is the number of frames to attempt sync for this ghost. Kinoko will throw an error if it is larger than the framecount stored in the krkg. If Kinoko reaches targetFrame
while maintaing sync, then the test case will pass.
To update the test binary, be sure to re-run:
While a GUI is not planned for the project at this time, contributors are welcome to add a graphics frontend under three conditions: the license must not change, it does not interfere with the CLI, and most importantly, it must not distribute any in-game assets.
You can link Kinoko to your own project using CMake by linking with the libkinoko
target. For example:
Note that any project using Kinoko's include directories will also require C++23.
The codebase uses C++ for the engine and Python for any external scripts.
Pull requests resolving an issue or element of a tracking issue should reference the issue or item in the description.
Any commits should be formatted using the project's clang-format file.