CSC-105

BadgesGame loop

Game loop

I can explain how a game updates and draws itself many times a second, and how input, state, and time fit into that loop.

Why and when

Every real-time game runs a loop: read input, update the world, draw it, and repeat, many times a second. You need it for anything that moves on its own or reacts while the player acts. A turn-based quiz or a story game can often skip a continuous loop.

Concepts

  • What a game loop is for, and when a game needs one
  • Input, update, draw
  • Game state
  • Frames and time

Check opens soon