Everything, every piece of constantly running code, is always present inside of a loop which does something (ticks) every set amount of time. If something does not need to define a method for calculation or for creating an object from a class or setting things up in a larger library (E.G OpenGL) it will always follow this law.
this amount of time between ticks, or the amount of ticks per second, can be changed. Though not all games use this exact technology, *every* game which renders things in frames-per-second atleast *emulates* this technique to the point where it is effectively doing something big every XYZ amount of time, or CPU cycles.
There’s a few ways, but having internal time is a way to do it. Things like movement and animations are usually timed, a frame could be 100ms and movement is velocity * time. There’s no reason that time is the real time though, the game could have a multiplier to real time such that `game time passed = real time passed * slowdown` and use that for time everywhere. Doing that is minimal effort and gives the slowdown effect.
Latest Answers