I am about to make a bottom-top running game where a chameleon runs up a tree and has to avoid twigs. You can run on different lanes of the tree.
But I'm not moving my character, but the background, so it's all just about perception.
Initially, I only "teleported" my twigs around the tree on left arrow/right arrow. Now I want to animate them so they smoothly turn around the tree.
My question is: Do I use animations, or real movement for the twigs?
My first try were animations. But the disadvantage I see: While the "turn" animation is running, the animated twig is still logically at its starting position, and thus you can still collide with it although it visually is about to turn away.
On the other hand, regarding movement: which behaviour should I give my twigs? They shall turn by 90? to the left or right, depending on which key is pressed and at which position the twig currently is.
"Bullet" would be wrong because I need a curved path. "Car" and "8 direction" doesn't seem to be right either.
This is my current animation implementation:
<img src="http://ramenchan.files.wordpress.com/2012/09/twigs-animation.jpg" border="0">
Very quick and only for debugging, not perfect. The lines
twig Set X to...
twig Set Y to...
twig Rotate 50 degrees...
are currently not synched with the animation. So the animation ends in another state than these 3 lines. I had to correct that, of course.
Here is my capx:
It is just a test project where nothing happens, it's only for testing of the twig rotation.