Exercise: Four Games

In JetLag, the camera decides what part of a level is visible at any time, and gravity decides which way things fall (if they fall at all). It's time to see these ideas concretely. In the next four pages, you'll see four small game prototypes, each combining camera and gravity in a different way.

For each one:

  1. Play it first, with no explanation. Try to name, in one sentence, how the camera is set up and what the gravity is doing.
  2. Then look at the code. Each page walks through how the game is built, and points out anything that isn't yet explained by what you just learned.

You won't be able to explain exactly how each one works before reading the code. That's expected. The goal is to start analyzing games, and to use the ideas you've learned to guess how the code makes interesting things happen. See how much you can already guess, just from playing, using only the mental model you've built so far.