I am part way through creating a Doodle Jump clone for iOS using Corona SDK. I'm currently using the physics engine (box 2D). It's not a straight clone, but I need the basic principles in place to progress to the next stage of development.
I have encountered a problem that is prohibiting me to carry on, and I'm wondering whether it's worth re-writing the game using time based animations rather than the physics engine, as it could give me more flexibility.
The problem I'm faced with involves moving the platforms down and the character's height. If you play Doodle Jump and watch how the character behaves you'll see that he doesn't EVER go any higher than a certain point, no matter what height the platform he came off was. The higher he appears to jump is actually the platforms moving down faster. The character also jumps for the same duration every time. If you look at his position on the screen, he may only move up by a few pixels, but he'll appear to be jumping for a lot longer, the same length of time for each jump.
I cannot grasp how this could have been achieved using the physics engine. I am currently moving the platforms down at the same speed as the character moves up - but this doesn't stop him gaining height, and doesn't mean his height on the screen is fixed.
I have an idea how to do it in the physics engine, but it seems VERY complicated for something so simple. It would involve working out a calculation for his current height and then manipulate the gravity and his density so that he always jumps the same height for the same length of time. This would be a trial and error scenario, and to be honest, it's clutching at straws.
My question is, has anyone achieved this behaviour already, know how it has been achieved, or can shed any light on it? Would I be better with the physics engine, or with time-based animation (using timers to manually track the ball's position and use easing libraries to mimic basic physics)?
Here is a link to a YouTube gameplay video of Doodle Jump, hopefully you'll see what I mean - it's a difficult concept to describe in text. http://www.youtube.com/watch?v=kIqG2ICUS-c