Learning Library

Game Development Library

Build arcade games: the game loop, game pieces, keys, touching, timers, and keeping score.

  • Frames & Motion

    Movement is a small change every frame: speed, falling, bouncing, and gravity.

  • Score & Lives

    The numbers that make it a game: points going up, lives going down.

  • Waves & Spawning

    Lists of game pieces that grow and shrink: a wall of bricks, a wave of rocks, a stream of gates.

  • Keyboard Input

    React to keys: held down for steering, pressed once for a jump or a zap.

  • Game State

    One variable that says which part of the game is happening: title, playing, paused, or over.

  • Touching & Collisions

    Tell when two game pieces touch, and decide what happens next.

  • Timers & Countdowns

    Count frames to make something happen on a beat, or last a while and then stop.

  • The Game Loop

    The heartbeat of every game: play(), then draw(), about 60 times a second.

  • Game Pieces (Sprites)

    The things in your game, like a basket, a ball, or a brick, that know where they are and how to draw themselves.