this post was submitted on 08 Mar 2024
51 points (100.0% liked)

Gaming

30561 readers
27 users here now

From video gaming to card games and stuff in between, if it's gaming you can probably discuss it here!

Please Note: Gaming memes are permitted to be posted on Meme Mondays, but will otherwise be removed in an effort to allow other discussions to take place.

See also Gaming's sister community Tabletop Gaming.


This community's icon was made by Aaron Schneider, under the CC-BY-NC-SA 4.0 license.

founded 2 years ago
MODERATORS
 

This has happened to me more than once

I don't play that many racing games...

you are viewing a single comment's thread
view the rest of the comments
[–] Kache@lemm.ee 3 points 8 months ago* (last edited 8 months ago) (2 children)

You can, once you find a game that runs at 1k fps

[–] SomethingBurger@jlai.lu 9 points 8 months ago (1 children)

Not needed. Trackmania has times in thousandths at 60FPS. Physics run faster than graphics.

[–] Kache@lemm.ee 4 points 8 months ago* (last edited 8 months ago) (1 children)

Oh, interesting

Hell of a frame budget to work by, but I don't know much about game programming

[–] Reil 7 points 8 months ago

If you're a little clever with interpolation, you don't need to run at 1000s of frames per second! You'd just calculate how much time after the last frame it would take to cross the line at the last known speed and position.

[–] rnd 7 points 8 months ago

To be more specific: most often a game would run its physics calculation at the framerate it's designed for, like 30 or 60 fps, and in case it displays with a higher framerate, try and interpolate the graphical data based on the physics calculations. It's possible to make the physics run faster as well, but carelessly adapting things may make things go wrong (a good example is Quake 3, where your jump height changes based on the com_maxfps value).

A racing game that runs its physics at 60 frames per second can, at best, calculate time in 0.016666... second intervals. To have a precise 3-decimal-points clock, a game would need to run its physics calculations at 1000 frames per second.

(It is also worth noting that a game developer can try to interpolate a more precise finish time by looking at the last pre-finish frame position of the vehicle and the first post-finish frame position and calculating at what point "between the frames" the finish line would be crossed, but I don't know how difficult and/or buggy actually implementing that would be.)