Fix inconsistent start frame (fixes #37) #90
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
See #37. When starting up the emulator for the first time, after navigating the menus and cycling through the HUD views, we occasionally land on two different frames. The first frame has about a 95% chance of appearing, and the other about 5%. The frames look different between the rice and glide64 plugins, but both experience this difference.
(images below are from the glide64 plugin)
Frame appearing 95% of the time (oops, was supposed to be after the HUD view is changed)
(md5 of the img bytes:
d45a270865b6f46ca722de5ef5df2124
)Frame appearing 5% of the time
(
80f43bccda1e226815f378c46df219c2
)The difference between the two frames
Fix attempt 1:
I attempted to resolve this by waiting 1 more frame to see if it would be consistent. However, it resulted in a new frame appearing 95% of the time, but the exact same 5% frame (
80f43bccda1e226815f378c46df219c2
).The new 95% frame (looks better)
(
ead22708155f7a10dec85442b39633f3
)The difference between the two (still not what we want)
Fix attempt 2
Rather than trying to get the exact timing right on startup, which could be difficult (or maybe impossible), I decided to just do a "mid-game" reset right after startup. This is just letting the race start, pausing, and starting a new race. After testing, I found that it was giving the same frame 100% of the time. Great.
The new 100% frame (this should work)
(
58f9f2ac979afcb72cf0892372cdf591
)Testing resets
After ensuring the first frame was consistent after startup, needed to check subsequent calls to reset. After testing, I found that there was a split of two different frames, with 70% matching the startup frame (
58f9f2ac979afcb72cf0892372cdf591
) and 30% a different frame.Frame appearing 30% of the time
(
a2499d2c2b189aa591acb2c374dc6184
)The difference between the two
This is acceptable. The border around the character icon on the progress tracking HUD blinks two different shades of a yellow-ish color. This seems to be random. In the past, I've seen variations in the exhaust coming from Mario's kart. Here I'm not seeing that, so it appears that this is as consistent as we can get. The blinking color shouldn't affect anything too significantly (or if it does, the model probably isn't going to perform well anyway 😆 ). Certainly a less significant impact than the previous difference in starting frames.