Hi - I’m working on building a Mighty Fin style game (see link below), which combines some of the one-touch physics of Tiny Wings or Jetpack Joyride game but adds an element of bouyancy to the main character when he is under water.
http://launchingpadgames.com/games/mighty-fin/
I’d like to use the Corona Tiny Wings demo game template and Barrel Joyride game template and combine them with the water bouyancy sample code. http://developer.anscamobile.com/code/water-buoyancy-example
Before I get going on playing around with combining the templates, I was wondering if anyone here had any advice on how to best proceed or had already tried to do this and had some pointers. Any help would be greatly appreciated.
I did find the comment below (posted on the bouyancy sample code page) helpful, as Might Fin does definitely have accelerated speed when jumping from deeper in the water. Thanks!
"I was playing with your code and changed line 184 to
local buoyancyForce = (box.mass * gy) * ((box.y-(liquid.y-liquid.height/2))/(liquid.height/1.2))
Why? Because I wanted the Boxes to have a bigger speed when they are deeper in the water (change the 1.2 to 4 and you’ll see some torpedos jumping out of the water
)" [import]uid: 135391 topic_id: 23477 reply_id: 323477[/import]
[import]uid: 52491 topic_id: 23477 reply_id: 94226[/import]