Make a game like Lumines with Flash – part 2

In the first part we managed to move and rotate a 2×2 square made (obviously) by 4 bricks.

Now we’ll see how to make them fall when we press SPACE key.

Notice that you move and rotate blocks by tapping arrow keys, but you make them fall by pressing SPACE.

This because timing is essential, and we want to make blocks fall as the player touches the spacebar.

The code does not have anything difficult, I just have to check if there are empty spaces under falling bricks.

No “game over” check at the moment, it will be covered later.

And this is the result… arrow keys to move/rotate and SPACE to drop

Download the source