D
DLPB_
Guest
Working with NFITC1 to make these 2 games (Submarine should be dead easy), use frame based timers, and get rid of timegettime altogether. Problem with the timers as they are is that they work in realtime. If you get any changes in frame rate in play, it doesn't affect the timer, leading to unfair times.
There are 4 main ways to address the snowboard timer:
1. Change the calculation to use floating point addition for the counter (+16.66667)
2. Make it so the millisecond display is actually a frame counter (I have done this below to some extent)
3. Instead of conventional time, make the timer based entirely on frame count with 5 digits.
4. Add on 16, 16, 18 in repeating pattern. I decided to go with this one in the end.
NFITC1 was just in the process of explaining how number 3 would work...
This is where I am with number 2.
{============SNOWBOARD CHANGE
{in play time format
9568A0 = 00 00 1A 00 00 1B 00 00 00
{time format
9568B0 = 1F 1F 1A 1F 1F 1B 1F 1F 00
{best format
9568D0 = 2D 2D 27 2D 2D 22 2D 2D 00
{Increment by 1
72D11D = BA 01 00 00 00 90
{time calcs
72D4D8 = B9 3C 00 00 00
72D495 = B9 10 0E 00 00
72D4C6 = 6B C9 3C 90 90 90
72D50B = 6B C9 3C 90 90 90
72D51E = 6B C9 3C 90 90 90
{write to 1st/2nd digit
72D458 = 88 4A 06
72D473 = 88 50 07
{============
There are 4 main ways to address the snowboard timer:
1. Change the calculation to use floating point addition for the counter (+16.66667)
2. Make it so the millisecond display is actually a frame counter (I have done this below to some extent)
3. Instead of conventional time, make the timer based entirely on frame count with 5 digits.
4. Add on 16, 16, 18 in repeating pattern. I decided to go with this one in the end.
NFITC1 was just in the process of explaining how number 3 would work...
This is where I am with number 2.
{============SNOWBOARD CHANGE
{in play time format
9568A0 = 00 00 1A 00 00 1B 00 00 00
{time format
9568B0 = 1F 1F 1A 1F 1F 1B 1F 1F 00
{best format
9568D0 = 2D 2D 27 2D 2D 22 2D 2D 00
{Increment by 1
72D11D = BA 01 00 00 00 90
{time calcs
72D4D8 = B9 3C 00 00 00
72D495 = B9 10 0E 00 00
72D4C6 = 6B C9 3C 90 90 90
72D50B = 6B C9 3C 90 90 90
72D51E = 6B C9 3C 90 90 90
{write to 1st/2nd digit
72D458 = 88 4A 06
72D473 = 88 50 07
{============
Last edited: