Credit: Chris Piech
Write a game where the user can use the mouse to move a ball. A path animates coming down the screen and if the ball hits a barrier the game ends.
The general approach we recommend you follow is:
You can either generate all the rectangles before the user starts playing (meaning the path will eventually end), or you can add them just when they need to become visible (meaning the path can continue forever). In both cases, you should store the rectangles you need to animate in a list, and then every frame move those rectangles down, and then make sure that list is still up to date.
You can also experiment with different variations. For instance, in the screenshot above, all the path blocks are the same size. You could experiment with them having random widths (left / first image), or have more than one block added at a time (right / second image), or other variations. Design up whatever you'd like!
You could also implement an alternative game where the user must dodge randomly created dropping blocks.