# 2d beat em up ramps and pits

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

## 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 on other sites

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 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 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 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? ;))

1. 1
Rutin
47
2. 2
3. 3
4. 4
5. 5

• 13
• 10
• 12
• 10
• 13
• ### Forum Statistics

• Total Topics
632994
• Total Posts
3009769
• ### Who's Online (See full list)

There are no registered users currently online

×