Develop a Flash game like Cirplosion – AS3 version

After the porting of String Avoider, it’s time to see another old classic ported into AS3: Cirplosion.

I already published the AS2 version with all comments in this post, so it’s time to see what can be done with AS3.

I modified a bit some rules to make the game harder:

* There are some blue orbs running everywhere with a linear motion
* Orbs bounce on stage borders
* You control a red orb moving it with the mouse
* If you click and hold mouse button, your orb start growing
* While growing, you can’t touch stage border or other orbs, or you will return small
* When you release mouse button you are ready to explode
* While you are ready to explode, you can collide with blue orbs but you can’t hit stage borders
* Press again mouse button and you will explode turning transparent all orbs you are touching
* Beware of transparent orbs as they are still deadly
* semi transparent orbs as well as orbs close to explosion will move faster from now on

Will you be able to turn all orbs semi transparent?

This is the main class:

This is Player class

and this is Enemy Class

Download the source code and try to make a decent game out of this prototype.

  • wow. It didn’t took much writing of code in this one :O. And it actually can be used to create many games. Thanks for writing it :)

  • Great example!

    Would you mind updating the ‘explosionRange’ with the player radius at the explosion? It’s static, so the growth doesn’t matter. Don’t know if you’ve planned it that way.

    Cheers

  • James

    Thanks emmanuele i actually tried to convert your AS2 version a while ago.I had a pretty decent version of it to. But to be honest im not sure how to make a game from this, I was hoping converting the AS2 version of it would inspire me ages ago. but unfortunately nope. Any ideas what could come of this?

  • I’m the developer of Cirplosion and I stumbled across this by chance today. Good to see that my 4 year old game is still relevant enough to warrant a tutorial here! I can assure you that the AS2 code is longer and messier ;)

  • Nice tutorial game, great to see it in AS3 :)