Marble sound

Non-platform specific questions.

Marble sound

Postby akr » Thu Mar 18, 2010 8:47 am

I am thinking about how to make a marble game on iPhone. Whats the best way to play a "rolling" sound when the marble is rolling?

idea:

Ondraw: if (xvelocity > 0 && yvelocity > 0) playsound("marble_rolling"); hmmm. Will not work because playsound would be called every tick....

Andreas
Co-Developer of GE engine

If u are interrested in new features of apple or android ge engines check the engine support website game-editor.net regulary.
akr
 
Posts: 453
Joined: Thu Feb 25, 2010 7:56 pm
Location: Germany, Ulm
Score: 40 Give a positive score

Re: Marble sound

Postby makslane » Thu Mar 18, 2010 1:41 pm

I think the best way is play the sound with a loop when the ball start the movment
and stop the sound when the balls stop.
Game Editor is an open source game creator software that's wants to pay it's developers to keep evolving.
If you like Game Editor, make a review!
makslane
Site Admin
 
Posts: 3947
Joined: Sat Apr 05, 2003 6:47 pm
Score: 182 Give a positive score

Re: Marble sound

Postby thunderios » Fri Mar 26, 2010 12:30 pm

Does it start rolling when you click a button? Then you can do something like:
On Button Down
Code: Select all
Playsound("Marble_Rolling")
CreateTimer("Event Actor", "RollLength", Time The Marble_Rolling takes);

On Timer Finish
Code: Select all
if (velocities > 0)
{
Playsound("Marble_Rolling")
CreateTimer("Event Actor", "RollLength", Time The Marble_Rolling takes);
}
thunderios
 
Posts: 87
Joined: Thu Jan 31, 2008 1:18 pm
Score: 1 Give a positive score


Return to General

Who is online

Users browsing this forum: No registered users and 1 guest

cron