SpaghettiKart icon indicating copy to clipboard operation
SpaghettiKart copied to clipboard

Save 16 track ghosts at once

Open NewGBAXL opened this issue 3 months ago • 5 comments

Currently, the game loads a single note (save file) from the Controller Pak, which contains data for 2 track ghosts. There is already a system in place limiting only one ghost per track, which is acceptable.

Optimally, the game should instead attempt to load 16 different notes with one track ghost each, so that the same CPak can save all ghosts at once. (This will also allow the user to save half of a standard CPak with one ghost.) When the game normally loads the data from the CPak (I'm still not certain when this is) the metadata for all 16 ghosts will be populated from the existing notes. When you enter Time Trials, the game will check if the ghost for the corresponding track is present (from the metadata) and load it if so. After completing Time Trials, the game will allow you to overwrite your ghost if it is present, and otherwise make a new save if there is space. If there is no space the game will prompt the user to free up some space or send them to the existing CPak management screen.

Right now it's just a 2-slot ghost metadata container, so expanding to 16 and populating/writing from/to single notes should be sufficient to improve it. Also the Controller Pak protocol (& SDK) supports up to 62 banks of 256kb, so increasing it from 1 bank to 8 banks shouldn't be an issue.

NewGBAXL avatar Sep 24 '25 17:09 NewGBAXL

I was thinking to just make them infinte because on pc we can avoid controller pak but still add an option to get "the original feeling"

coco875 avatar Sep 24 '25 18:09 coco875

That's doable, but would require reworking the ghost loading system to allow the user to choose which ghost per track and having a 2D array to store multiples, not sure if that's in scope or not

also are controller paks not saved in the pc port? how does that work

if you're saying stick each ghost as an individual file in a folder that would actually be even better, that seems like a Harkinian feature actually, interpreting libultra calls

NewGBAXL avatar Sep 24 '25 18:09 NewGBAXL

I would prefer if you don't get rid of the controller pak since i used it on Satella

KiritoDv avatar Sep 24 '25 18:09 KiritoDv

I'm not concerned with the controller pak folder thing, I'm just saying its an option people are working on a new system for emulators and save backups to use saves individually without the full 256kb cpak so it would be interesting to see where that goes. If it does get converted there will definitely be tools made to unpack & repack saves. The new format of one ghost per note would not be cross-compatible with the old format unless some extra checks are done, or someone could just make a converter for it as well

NewGBAXL avatar Sep 24 '25 18:09 NewGBAXL

for now controller pak are save as file on pc. Have a vector to store ghost for me mean that we can more freely share ghost without override or weird hack to expend and have no problem about being to small ever. Yes it would require a rework. For me remove control pak api can be better to just more freely do what we want so have unlimited save slot add ghost for internet etc. Don't really see any reason to keep controller pak other then retro compatibility.

coco875 avatar Sep 24 '25 18:09 coco875