Skip to content
PlayOwl

Coding · Grade 9

Game Loops, State and Input

Learners trace the input-update-render game loop frame by frame, make movement fair on every device with delta time and a fixed-timestep accumulator, organise menus, play, pause and game over as a state machine that controls which systems run, and derive pressed, held and released events from raw input, with buffering and remappable controls.

  • 4 lessons
  • About 95 minutes
  • Check what you learned: 8 questions
  • Ways to answer: choose an answer, trace code, match pairs, type a number, put in order and sort into groups
Try it now (no account) One of the five free starter courses Open in PlayOwl

What learners will discover

  • Explain and trace the game loop's input, update and render steps across frames.
  • Use delta time and fixed timesteps so gameplay is the same at any frame rate.
  • Manage game modes with a state machine and decide which systems run in each state.
  • Derive pressed, held and released input events and apply buffering and remapping.

Lessons

  1. The game loop 5 steps2 practiceabout 20 min
  2. Time and frame rate 5 steps3 practiceabout 24 min
  3. Game states 4 steps3 practiceabout 20 min
  4. Reading input well 4 steps3 practiceabout 20 min
  5. Check what you learned 8 questions at the end

Keep exploring

More 9th grade coding

Guide for grown-ups