Have fun and help me to get to 1,000,000 downloads!

“Hundreds” Flash game prototype using Box2D

Emanuele Feronato Actionscript 3, Box2D, Flash, Game design

Did you play iOS Hundreds game? It’s basically the remake of Hundreds Flash game which wasn’t made with Box2D as far as I can see from the way it handles collisions, so we are going to improve it with the power of Box2D.

The aim of the game is simple: make the ball numbers increase to reach a hundred by touching it with the mouse. Do not grow balls when they touch each other.

In this first step, the game features are:

* There are a number of circles moving at a constant speed and colliding each other
* You can make a circle grow by touching it with the mouse

The prototype uses concepts we have already seen in other games, check the Filler Box2D prototype to make Box2D bodies move at a constant speed and the new Way of an Idea prototype to detect bodies under the mouse.

Here is the code:

In this prototype there is a limit to circle growth because I still have to check for collisions and I don’t want circles to get bigger than the screen. This is the result:

Move the mouse over a circle to make it grow.

Download the source code.

Next time, the complete prototype with the count to 100 and the collision management.

From null to full HTML5 cross platform game

I will take you by hand from the bare bones of JavaScript programming through the creation of a full cross platform HTML5 game, with detailed explainations and source code.

If you don't know where to start, then From null to full HTML5 cross platform game is the book for you.

Comments 5

  1. Pingback: “Hundreds” Flash game prototype using Box2D – Emanuele Feronato « eaflash

  2. Rennan

    Hi Emanuele, how are you? I have a question for you. I´m trying to build a pool game and your tutorials helped me a lot to figure out somethings. But, How can I simulate a view from the top? Like in a pool table. Regards,

Leave a Reply

Your email address will not be published. Required fields are marked *