I don’t know if I’m explaining this right…
A computer can run logic at some speed based on how powerful the components of it are, so if it can perform the logic of something, for example, movement in a game, how does it know how much should be done based on its power, instead of essentially running in “fast-forward” or conversely in slow motion?
In: 1307
Games do run as fast as the hardware will allow. This is called the “frame rate”
The game engine calculates the time between frame renderings and uses that time to determine how much moving objects should move. Any given moving object will move twice as much per frame at 5 fps compared to 10 fps so that in 1 second the object will have moved the same distance regardless of the frame rate
Fun fact- this can often be exploited to “clip” through walls, if you reduce the frame rate enough the moving objects (like the player character) will move more than the objects width per frame, which might end up on the other side of a wall, bypassing collision checks between the wall and the moving object. This is basically quantum tunnelling in video games
Latest Answers