|
|
|
|
|
by andvari_bekho
251 days ago
|
|
The API saves all races, now just your best one Yes, selecting 1000 and then cherry-picking would be a great idea in theory, but ghost data is quite heavy (around 300–400 KB per ghost). We are already compressing it as much as possible: saving only about 10 frames per second and interpolating the rest, reducing decimals to a minimum, and storing rotation only on the Y axis. We also keep only the ghosts of cars that complete a race in under 4 minutes to avoid excessively large files. Because of this, loading 1000 ghosts and then picking a suitable set of 7 close to your skill level would make the process too slow. Currently, we have a maximum load time of 10 seconds for the ghosts, and we are aiming to ensure the game works smoothly even on slow connections. |
|
For example instead of storing, x1, x2, x3, x4, x5, you can store x1, x2-x1, x3-x2, x4-x3, x5-x4 Using few decimals it may compress better with the standard algorithms.
Assuming almost constant speed, you may guess x3 from x2 and x1 and x3=~ 2*x2-x1, so instead of x3, x4, ... you store x3-2\x2+x1, x4-2\x3+x2, and compress it.
For a car, I'd assume constant acceleration and if I didn't make a mistake, x4=~ 3x3-3x2+x1, so you store x4-3x3+x2-x1 and compress the sequence.