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.