vabold / Kinoko

A reimplementation of Mario Kart Wii's physics engine in C++
MIT License
46 stars 10 forks source link

Prepare the next test case on another thread #146

Open vabold opened 2 months ago

vabold commented 2 months ago

Implementation should happen in GameScene::initScene. A task should start on another thread that takes the next test case, reads it for relevant information, and stores it in an accessible place for RaceScene::configure to later read.

RaceConfig should introduce a second scenario, such that RaceConfig::initRace simply copies from one scenario to the other. This is analogous to the base game's menu scenario, but we will likely refer to it as the "next" scenario.

ResourceManager should introduce the CourseCache. However, instead of it simply holding the compressed course archive, it should instead hold the decompressed archive. This allows the archive to be mounted with very little overhead on the main thread. Implementation will be similar to the base game - if the course cache's state is ready, and the course IDs match, simply load the scene archive from the cache.