Game Loop Interview Questions

4 questions developers actually get asked about game loop — with clear, practical answers you can use to prepare.

Q1. What is a game loop and why does every real-time game need one?

A game loop is a continuous cycle that processes player input, updates the game state (positions, physics, AI), and renders the result to the screen. It runs dozens of times per second. Without it the game would draw one frame and freeze. Every real-time game needs one because the world must keep updating and redrawing even when the player is not pressing anything.

Q2. What is delta time and why is it important?

Delta time is the elapsed time since the last frame. By multiplying movement and physics values by delta time, you make them time-based instead of frame-based. This ensures the game runs at the same speed on fast and slow hardware. Without delta time, a computer running at 120 FPS would move objects twice as fast as one running at 60 FPS.

Q3. What is the difference between a fixed timestep and a variable timestep?

A variable timestep uses the actual elapsed time between frames, so each update step can be a different length. A fixed timestep always advances the simulation by the same amount (for example 1/60th of a second) and accumulates leftover time for the next frame. Fixed timestep is preferred for physics because it makes collisions and forces deterministic. Variable timestep is fine for rendering and non-physics updates.

Q4. What is the "spiral of death" in a game loop?

The spiral of death happens when physics updates take longer than the fixed timestep interval. The accumulated time grows every frame, so the loop tries to run more and more physics steps to catch up, which takes even longer, which accumulates even more time. The fix is to cap the number of physics steps per frame or clamp the accumulated time to a maximum value.

Want the full concept, analogies, and AI prompts for game loop?

Read the full Game Loop block →