Replays! For use as an attract mode, or as an in-game ghost player a la Forza and so on.
Max time for score attack is 100 seconds, or 5,000 PAL frames. (If you take longer than that: tough.) The player movement updates at 25 Hz, so max 2,500 frames of player info to store off.
What can happen in a given frame? The player sprite address can change by +0, +8, -8, +320 or -320. And there's 3 different player sprites: facing, left, or right. (The left/right "anim" can be fudged.) So that's 5*3=15 cases! It might actually fit in 4 bits!
2500*4/8=1250.0, round up to 1280, meaning 30 bytes left over for any metadata including level hash or frame count or whatever.
1280 bytes per level = 5120 bytes per level set, which is ok. Idealy need to have a file per level set ideally so it fits into the DFS catalogue limit (various options here, but it'd be nice to use OSFILE as it is simple and FS-agnostic).
If doing any kind of replay caching: 3 x 5120=15360, so 3 level sets'-worth per sideways RAM bank.
Replays! For use as an attract mode, or as an in-game ghost player a la Forza and so on.
Max time for score attack is 100 seconds, or 5,000 PAL frames. (If you take longer than that: tough.) The player movement updates at 25 Hz, so max 2,500 frames of player info to store off.
What can happen in a given frame? The player sprite address can change by +0, +8, -8, +320 or -320. And there's 3 different player sprites: facing, left, or right. (The left/right "anim" can be fudged.) So that's 5*3=15 cases! It might actually fit in 4 bits!
2500*4/8=1250.0, round up to 1280, meaning 30 bytes left over for any metadata including level hash or frame count or whatever.
1280 bytes per level = 5120 bytes per level set, which is ok. Idealy need to have a file per level set ideally so it fits into the DFS catalogue limit (various options here, but it'd be nice to use OSFILE as it is simple and FS-agnostic).
If doing any kind of replay caching: 3 x 5120=15360, so 3 level sets'-worth per sideways RAM bank.