# Separate draw and physics loops

I there a point in updating the physics at a different rate than drawing / taking input? Is it just to exploit parallelism?

I've heard that many engines update the physics at 15FPS but render at 60FPS. What's the point in rendering the same image four times until it changes if it doesn't add fluidity?

• Updating the physics at 15FPS doesn't mean all physics properties. It's probably more like collisions, water flows, and so on. The player is moving its camera a 60 FPS anyway, or else the game feels truly lagging. Commented Jun 6, 2014 at 11:54

Physics literally can't be updated at the same time as drawing in many games, even if the programmer wanted to. Physics in most games is significantly more complicated than just applying velocity and acceleration. You can't simply move an object and then draw the object, since the actual final position of that object is going to require multiple passes over all nearby objects, constraints, etc.

The only way to get meaningful transform data out of physics is to let it step the entire physical simulation.

Usually you want physics to be deterministic, in that if you run your game multiple times the exact same simulation will occur each time. One key factor in implementing determinism is to have a timestep that never changes. The amount of time passed to physics shouldn't be a variable, but a constant.

However, when graphics is being run and things rendered to the screen it may be favorable to run at maximum FPS, or at 60 FPS, or 30 fps, or whatever you like. It's easiest if you let rendering occur at a variable interval, and only update the physics when discrete chunks of time has passed.

This idea doesn't have anything to do with parallelism.

Also, you don't render the same thing 4 times. Usually you interpolate between the lower resolution discrete jumps in physics. Say an object moves from point A to point B over the course of 4 render frames. Each render frame would interpolate from A to B to create a very smooth transition. In this way usually the screen renders about an entire frame behind whatever the actual physics is doing.

you don't render the same game state 4 times but interpolate the state between 2 physics frames

also 15 (visual) FPS just feels laggy you need at least 25ish to feel smooth