Build 10 classic Flash games and learn game development along the way with this ultra-fast paced game development course.

If you love this blog, this is the book for you.

Buy the book

Get the source code of 12 commercial Flash games, which have been loaded more than 50 million times!

Learn from real world successful examples.

Get it now

Box2D for Flash Games teaches you how to make Flash physics games from scratch with the most advanced features.

Create the new Flash game smashing hit.

Buy the book

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

Rate this post: 1 Star2 Stars3 Stars4 Stars5 Stars (32 votes, average: 4.00 out of 5)
Loading ... Loading ...
Flash Templates provided by Template Monster are pre-made web design products developed using Flash technology.
They can be easily customized to meet the unique requirements of your project.
Be my fan on Facebook and follow me on Twitter! Exclusive content for my Facebook fans and Twitter followers

This post has one comment

  1. Make a game like Lumines with Flash - part 3 : Emanuele Feronato - italian geek and PROgrammer

    on July 15, 2008 at 10:31 am

    [...] part 1 and 2 if you did not [...]