Skip to content

Chapter 1: What Makes a Game?

Before you build your first game, you need to understand what a game actually is. Not just “something fun on a screen” — we’re going to break it down like a developer.

Every video game, from Pong to Fortnite, is built on four core elements:

The game loop game loop: A continuous cycle that runs every frame: check input → update game state → render graphics. This is the heartbeat of every game. is the heartbeat of your game. It runs constantly, typically 60 times per second, doing three things:

while game_is_running:
handle_input() # What did the player do?
update_state() # What changed in the game world?
render_frame() # Draw the new frame on screen

Input is how the player communicates with your game. This could be:

Input TypeExample
KeyboardWASD to move, Space to jump
MouseClick to shoot, drag to build
TouchTap to jump, swipe to dodge
ControllerJoystick to steer, buttons to attack

The game state game state: All the data that describes what's happening in the game right now: player position, score, health, enemy locations, etc. is everything the computer needs to know about your game at any moment:

  • Where is the player?
  • What’s the score?
  • How much health is left?
  • Where are the enemies?

Rendering Rendering: The process of drawing all game objects onto the screen as pixels. Happens every frame — typically 60 times per second. is the process of turning your game state into pixels pixels: The tiny dots of color that make up everything you see on a screen. A 1080p screen has over 2 million pixels. on screen. Every frame, the game redraws everything based on the current state.

Look at your favorite game and try to identify:

  1. What inputs does it use? (keyboard, mouse, controller?)
  2. What data is in the game state? (score, position, inventory?)
  3. How fast does the game loop run? (Check the FPS counter if it has one!)

  • I understand what a game loop is
  • I can name the four pillars of a game
  • I know the difference between game state and rendering
  • I can identify input types in games I play