-
Notifications
You must be signed in to change notification settings - Fork 559
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Time trial decimals should be stored robustly #1030
Comments
Since VVVVVV 2.3, time trial best times are stored not just with the number of seconds, but also the number of frames. However, there was no room to display it with the old design of the time trials screen. Now there is, so it can easily be displayed now with a small change! Unset frames are stored as -1, which fits perfectly into the frames argument of help.format_time(), because in that case the amount of centiseconds is not shown. It should be noted that opening VVVVVV 2.2 will instantly wipe your frames records, as described by TerryCavanagh#1030. But many people will likely never open 2.2 anymore.
Since VVVVVV 2.3, time trial best times are stored not just with the number of seconds, but also the number of frames. However, there was no room to display it with the old design of the time trials screen. Now there is, so it can easily be displayed now with a small change! Unset frames are stored as -1, which fits perfectly into the frames argument of help.format_time(), because in that case the amount of centiseconds is not shown. It should be noted that opening VVVVVV 2.2 will instantly wipe your frames records, as described by #1030. But many people will likely never open 2.2 anymore.
So, thinking more about this, I'm not sure if there's an elegant way to solve this, so it may not be worth it. Thoughts? Ever since Putting it in I guess the problem goes away if everyone is careful to never ever open 2.2 anymore for even one second, if they want to keep their time trial records complete, or back them up manually every time. But people may not know that, and it's kind of an annoying thing to lose - it's not just a setting you can change back, it's your records you probably don't remember exactly. |
We could migrate records to another brand new file, but that still has the same problem of mismatching seconds/frames records if you go and set a new record in 2.2. Then we would have to implement some sort of system that somehow purges the frames if you've set a new record in 2.2? But that's literally cache invalidation and I don't want to do that. |
Since VVVVVV 2.3, time trial best times include not just the number of seconds, but also the number of frames. However, this hasn't worked out for me for some reason - my save file contains
<bestframes>-1,-1,-1,-1,-1,-1,</bestframes>
despite having definitely beaten my records in 2.3+.Reading back an old discussion on Discord about potentially adding decimals to the time trials menu, I suspect it has always been working correctly (?) but since this data is only stored in
unlock.vvv
and notsettings.vvv
, opening an older version of VVVVVV even once instantly makes you lose your frames records. I can't confirm if it actually works properly other than that - I thought it had always been broken, but maybe 2.2 overwritingunlock.vvv
is the sole cause of problems here.(There's also another reason why I felt it was broken: if the best frames is set to -1 (the initial value), then it's only ever updated if you beat your record in seconds territory. In other words,
-1
is counted as a better time than.00
, and you can't beat your old time within the same second and have it be recorded. But I think I changed my mind on that being a bug. Yes,.99
(or actually.96
) is the only safe thing to say about a time that was stored without frames - but on the other hand, you cannot be sure that the player beat their time until they beat it in whole seconds (because they might've had.00
). So, if the frames are known we could display them, while for -1 times we could simply show it without decimals like before, until the player has definitely beaten it by beating the seconds.)So in my opinion, we need to make sure that this is stored robustly against 2.2 and older deleting it (by putting it in
settings.vvv
?) before 2.4 comes out.The text was updated successfully, but these errors were encountered: