Andet {l Wrote}:Nice lol. On a maybe similar note, the two-digit time at the end of time trials often differs from the three-digit time saved by the ghost replay and put on the high score list, so maybe the two-digit time you see is just an approximation based on the individual lap times? Idk
Good to know! When you say they the two times differ, do you mean rounding the high score number to two-digits, like '01:33:00.127' rounding to '01:33:00.13', or something else unexpected?
(edit: I started writing this before I saw theodorepringle's reply)I did some digging around and it's not as simple as I naively suspected. The times are rounded correctly when converted to text and the kart positions are a bit too complex for me to tackle right now. My most reasonable guess is that the game didn't update my position before finishing.
I can't see any relevant warnings or errors in my stdout logs so I don't think both karts were given the same rank or anything. <-- I think that will only be recorded if DEBUG is enabled!
note to self: finish time for the pictured race was "88.9548" == 1:28:9548 so it has rounded correctly. I appear to be getting ~100 FPS according to the game counter which means 0.01 seconds between frames. Given our shown finish times, it's quite likely we finished in the same frame. Are FPS and ticks related? Some comments (linear_world.cpp, lines 167 and 448) suggests they might be...
if so then a game this close may theoretically see us both cross the line in the same update. updateRacePositions() is called whenever a kart finishes a lap, but before the kart is declared finished.
If m_overall_distance is updated after this function, it could be possible that they game still thinks Kiki has traveled further than me, neither of us has won yet and so therefore she is in 1st place. Then one/both of us are declared finished (and can no longer change position) and the finish time is calculated through interpolation, where mine is in front by <.01s but Kiki's interpolated time almost certainly rounds to .96 while mine rounded down, so I end up .95 and she ends up .96
I am making some big assumptions here but it seems plausible with a <.01s difference finish. A sanity check from a dev would be appreciated!