Tower game
Briefly

The point of this game is to stack as many boxes on top of one another as possible. When you click on the screen, the bouncing box starts to fall. Unless you click in the exact moment when the two boxes are ideally aligned, the part of the box that is sticking out falls off the screen ("debris") and the next box has less room for landing.
[77-79] Create the new box. [82] Animate the debris - it keeps falling until it gets updated again in [61-64]. [83-85] The scrollCounter determines for how many frames the camera should move up.
Read at Slicker
[
|
]