Double Dragon Style Movement
In this test game im making, im trying to make it a beat em up style similar to double dragon or battletoads. How do i make this kind of movement possible? because I have no idea. I could do the eight direction movement, but i want the player to be able to jump. How do I do this?
Re: Double Dragon Style Movement
Eight direction is what you'd want. For the jump, all you need to do is make a jumping animation, using a drop shadow at the bottom of the animation would be a good way to add to the appearance of jumping. You wouldn't actually need to do any sort of jumping physics to pull off that affect. Only difficult part would be if you're jumping on top of obstacles/background objects. Jumping over a pit or something is easy though. All you'd have to check for is if walking/stopped animation is playing over pit, kill player (could make an animation for falling into the pit). And jumping playing well then ignore that collision.
You might want to try a custom made eight direction movement perhaps if you aren't having enough control over how you want it to work.
Re: Double Dragon Style Movement
What Shawn said, and if you want to do a custom movement the logic is pretty simple:
Have alterable values XReal, YReal, ZReal
Always
-->Set X position to XReal
-->Set Y position to ZReal+YReal
Then only act on collisions for which the two objects' Z values (depth) are close
Re: Double Dragon Style Movement
thanks guys. If this doesnt work for what Im trying to do i'll post in this thread again.