Balloon game

Hi all,

I am new to ipad/iphone game development and i have started a simple balloon game. So far i have the background and some text on the simulator.
The game scenario goes like this:
A total of 10 balloons are displayed with each numbered (randomly 1 to 10), and I will use mathematics operation to shoot randomly the balloon numbers ( 3+7) or (2+8)or (7-4) to display at the same time and give the answer. Possible to adjust the level of the game?
A click sound is needed as well.

Is there a code for this kinda mathematical game somewhere?
Or can anyone please guide me on how to go about this???
Your input is really appreciated.
Thanks! [import]uid: 133212 topic_id: 23021 reply_id: 323021[/import]

Hi zankouz!

You can use a module called “director class” for making different levels. Director class let you set up a lot of different screens. You can make a start menu and then different buttons that will take you to different levels. Then you could just make the levels more difficult in their .lua files(you need to create a lua file for each level) :slight_smile:

Here’s a good tutorial on how to use director class :

http://techority.com/2010/11/19/how-to-use-scenesscreens-in-corona/

For the sound, download this sample/tutorial from Techoriy. The tutorial will explain all you need to know about sounds.

http://techority.com/2011/01/22/corona-for-newbies-part-2/

Hope this will help you :slight_smile:
//Philip [import]uid: 119384 topic_id: 23021 reply_id: 92019[/import]

Thank you for the quick reply. I am now following the tutorials to see how far it goes.

What about the math part?

thanks again [import]uid: 133212 topic_id: 23021 reply_id: 92024[/import]

Hmm… I’m not that good of using math in corona but i maybe can help you anyway:)

First off all you need to make 10 different .png files (All of the balloons with numbers 1-10). Then take a look at this:

http://developer.anscamobile.com/content/math-0

I think you should use the random function to “shoot” out ballons in random order.

You will find more info about the math functions in the link;)

And PS: This is just my teotry on how to make this. There might be some better way but i hope this will give you a clue on how to make the function.

PSS: I’m not good at the Math function Xd

//Philip
[import]uid: 119384 topic_id: 23021 reply_id: 92028[/import]

Thank you Philip for the links and suggestion. Good link for the sound as well.

Does anyone have a sample code of this kind of math game?
thanks all in advance ! [import]uid: 133212 topic_id: 23021 reply_id: 92092[/import]

[lua]pick1=math.random(10)
pick2=10-pick1
balloon1=display.newImageRect(pick1 … “_balloon.png”,width,height)
balloon2=display.newImageRect(pick2 … “_balloon.png”,width,height)

balloon1.value=pick1
balloon2.value=pick2[/lua]
Add touch events and when each occurs see if the values add up to 10.

That’s one way.
[import]uid: 10389 topic_id: 23021 reply_id: 92093[/import]

The new question is in the different section. [import]uid: 133212 topic_id: 23021 reply_id: 92154[/import]

A different topic has been created for this.
thx [import]uid: 133212 topic_id: 23021 reply_id: 92163[/import]