Jump to content
  • Advertisement
Sign in to follow this  
EvilNando

2d beat em up ramps and pits

This topic is 2856 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Im about to start a beat em up project and I was wondering how I could make pits that players must jump in order to progress and how can I implement ramps that can go up and down to add a little verticality to my levels

thanks

Share this post


Link to post
Share on other sites
Advertisement
You'll need to give us more information.

1. Are you asking about creating the graphics for these things, or are you asking about the logic involved?

2. What tools and/or programming language(s) are you using to create your game?

3. If you're asking about the logic involved, what do you already understand how to do? Is it the physics you're having trouble with, or are you proceedurally generating your levels and don't know how to add these things, or is this an AI problem? Be more specific about what you need help with here...

[smile]

Share this post


Link to post
Share on other sites
I was thining on pure game logic here


I understand that sidescrollers are just 2d platformers but with an aditional Y value that indicates where you are currently standing



then if you are at Y lets say 20 and you jump you should make your jump arc normally as in aside scroller but you should land back again at y=20 position


this concept works perfectly only if your level has straight terrain and you dont have pitfalls


In castle crashers there are times where u hit a ramp like stairs or mountains and characters have no problem traversing those even while jumpinp


So I was wondering how could I get around this concept and find a clean solution to implement this into my game

Share this post


Link to post
Share on other sites
You could implement a height map for your terrain, so that for each section of x you have a corresponding height for the ground. Then when the player is at x, you set his height according to the height map, this will work for ramps too. When the player jumps you can apply the normal parabolic curve to his jump, or simply an up and down movement if he is not moving when he jumps. You will need to check for collisions whenever the player jump or moves.

Hope that helps.

Share this post


Link to post
Share on other sites
rather than a parabolic curve you could consider simple gravity. Give each player a mass value depending on its weight (for example if you have a heavy character like E. Honda on street fighter 2, this would be less able to jump further obviously), then when you jump apply these gravity calculations based on their weight and strength. This has the added advantage of making players develop different playing styles for each character they can choose and also allows for things like changing direction mid-jump, and even using the weight of a character as an attacking characteristic (it would hurt to have someone heavy land on you, right? ;))

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!