Sample questions
Game Loop FundamentalsDifficulty 1
What is the primary purpose of a game loop in a real-time game?
- aTo load all game assets into memory a single time at launch
- bTo process input, update game state, and render output✓
- cTo compile the game's source files immediately before each run
- dTo write the player's saved progress to persistent storage
Explanation:A game loop is the central control structure that keeps running while the game is active, continuously handling input, advancing simulation state, and drawing frames.
Game Loop FundamentalsDifficulty 1
In a typical game loop, what distinguishes the 'update' phase from the 'render' phase?
- aUpdate phase draws screen pixels while render phase advances logic
- bUpdate and render always execute on one identical clock tick
- cUpdate runs only at startup while render executes every frame
- dUpdate advances simulation state; render draws that state✓
Explanation:Separating update (simulation) from render (drawing) is a core structural idea in game loops, even when both run in a single thread.
Game Loop FundamentalsDifficulty 1
What does 'delta time' represent in a game loop?
- aThe real time elapsed since the previous frame✓
- bThe number of objects rendered in the current frame
- cThe total memory used by the game right now
- dThe distance an object moved since the game started
Explanation:Delta time is the elapsed time between the previous and current frame, typically in seconds or milliseconds, used to scale per-frame changes.
Game Loop FundamentalsDifficulty 1
The previous frame finished at timestamp 1000ms and the current frame finished at timestamp 1016ms. What is the delta time for this frame?
Explanation:Delta time is simply the difference between consecutive frame timestamps: 1016ms - 1000ms = 16ms.
Game Loop FundamentalsDifficulty 1
What is meant by 'frame budget' in the context of a game loop?
- aThe maximum disk space the game may use
- bThe time budget to finish update and render✓
- cThe number of frames required before a game can ship
- dThe total draw calls issued during a session
Explanation:Frame budget is the time window per frame (e.g. ~16.6ms for 60fps) within which all update and render work must finish to maintain the target frame rate.
Game Loop FundamentalsDifficulty 1
If a game targets 60 frames per second, approximately how much time (frame budget) is available for each frame?
- aAbout 16.6ms✓
- bAbout 33.3ms
- cAbout 100ms
- dAbout 1ms
Explanation:1000ms / 60 frames ≈ 16.6ms per frame, which is the frame budget for 60fps.