iDevGames Forums
Smooth acceleration in every direction. - Printable Version

+- iDevGames Forums (http://www.idevgames.com/forums)
+-- Forum: Development Zone (/forum-3.html)
+--- Forum: Game Programming Fundamentals (/forum-7.html)
+--- Thread: Smooth acceleration in every direction. (/thread-9077.html)



Smooth acceleration in every direction. - Honey Sharma - Jun 20, 2011 05:24 AM

Hi All,
I am making a game in Cocos2D and stuck at really interesting point.After scratching my head for weeks I am here. (ta da..)
I want to implement a tile map plus acceleration (that too in every direction).Something like maze and a ball.The game is in landscape mode.
The actual problem is (here comes the monster) I am not getting a proper way to move my player with acceleration.I want something similar to "Dark Nebula".Yeh something so smooth when it comes to acceleration.Plus it should stop when iPhone is placed on the table, etc.

I really need to implement this as soon as possible.A code snippet will do wonders.

Please help me with this as soon as possible else my freaking deadline Mad will kill me. Cry

Thanks


RE: Smooth acceleration in every direction. - PoseMotion - Aug 16, 2011 01:37 AM

I don't use Cocos2D, but you should be able to create a timer. As long as move = true and timer + 200ms, then speed +0.5, until speed = 10

I hope you understand as that's the easiest way I can put it. Wink