Users rarely think of the programing intricacies that go on behind the scenes of a game. Canabalt is hardly a complex game—in fact, it was created in just five days—but there is still a huge amount of thought that goes into each aspect.
The creator of Canabalt has written a detailed explanation of the game’s design, including the thought process behind the player and object hitboxes, running and jumping speed, and even the background parallax. For example, every building has an 8 pixel invisible ‘ledge’ that makes the game much more forgiving to the few players who aren’t actually fighter pilots.
That is, the “real size” of the building, or the way the game sees the building, is just a little wider than it looks. This is just another form of forgiveness for the human player who happens to tap the button just a split-second late. We’re giving them the benefit of the doubt here: they wanted to make that jump, they were just the tiniest bit late. Getting rid of those cases, the times where you really feel like you should have made it, can make a world of difference in how “fun” a game feels.
If you want to understand why you keep running into that blasted window, hit the link below for the full technical summary.
Canabalt is now open source, so if you want to get an even deeper look into the game’s code, feel free.