Create a Flash game like PixelField – part 3

This is the 3rd step of the creation of this awesome game.

In this step, I created a full playable game with 3 levels.

Level generation is made through a function and a switch that renders the proper level.

Full source code commented as usual, be sure to read part 2 before jumping into this one.

Now, it’s all about level design and adjusting parameters to create your own PixelField game.

This is the AS2 version, but if the game gets a good feedback (comments and votes) I’ll release the AS3 version too.

And here it is the result:

Download the source code and show me your own PixelField game.

  • I’m making things up and I never played Pixel Field before but maybe the player could start with only one satelite and everytime he “eats” a diamond, he gets a new one.

    “Snake-stylish”

    The satelite distance could also augment as the player collects diamonds.

  • Doggy

    Hey can you show us how to make it so we dont have to click? That would be awsome!

  • @ Doggy.
    To get it to always follow the mouse. Simply place the code inside onMouseDown function:

    big_square._x = _root._xmouse;
    big_square._y = _root._ymouse;

    into the onEnterFrame function.

    Looks really nice. Although I’m not very good at this game. I couldn’t for the life of me get the yellow square on the bottom left in the second level.

  • lvl 2 is too hard:))), great source. I use your idea of 100 rounds to make invitation to Blog Open (South East Europe Blog festival) 2008 in Serbia, Bor. Thanks Emanuele you sre great.

  • I originally made the game couple years ago with Flash5 and the code looked pretty much same, except I created all the levels as separate frames inside movie clip and so didnt have any map related stuff.

    Current version with Perfect Pi Pack however is AS3 and I used bitmaps to store levels. So each level is small bitmap, to create level I check the pixels in it, one color is for the pickable diamonds are other colors are for wall pieces. Only things that must be added manually are moving walls, they have paths in the form of array of coordinates.