Skip to content
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

Fix inconsistent start frame (fixes #37) #90

Merged
merged 1 commit into from
Mar 8, 2021
Merged

Conversation

bzier
Copy link
Owner

@bzier bzier commented Feb 21, 2021

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)
d45a270865b6f46ca722de5ef5df2124

Frame appearing 5% of the time

(80f43bccda1e226815f378c46df219c2)
80f43bccda1e226815f378c46df219c2

The difference between the two frames

diff-d45a-80f4

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)
ead22708155f7a10dec85442b39633f3

The difference between the two (still not what we want)

diff-ead2-80f4

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)
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)
a2499d2c2b189aa591acb2c374dc6184

The difference between the two

diff-58f9-a249

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.

@bzier
Copy link
Owner Author

bzier commented Feb 21, 2021

For what it's worth, this is the diff between the previous 95% start frame (d45a270865b6f46ca722de5ef5df2124), and the mid-game reset frame (58f9f2ac979afcb72cf0892372cdf591). I think a long time ago I may have aligned it as best I could based on the position of Lakitu and the stoplight. This would maybe be fine with a couple frames showing the HUD change. However, it is better to get rid of that variation and the inconsistent 5% frame.
diff-d45a-58f9

@bzier bzier merged commit 8217642 into master Mar 8, 2021
@bzier bzier deleted the fix-start-frame branch March 8, 2021 03:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant