Sign in to follow this  

Slopes in a 2D tile based platformer

This topic is 3335 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

Hello, Im trying to figure out a good method for adding slopes to a tile based platformer, but I have not found any relevant articles. The only thing I could think of was to define a slope variable for every tile, then somehow mathemagically combine the specified slope angle, the height of the tile, and how far onto the tile the player is, then add that number to the player y. This method seems bug ridden and overly complex, I'm sure there must be an easier way. Thanks

Share this post


Link to post
Share on other sites
Well there's a series of tutorials on making a 2D platformer over here:
http://jnrdev.72dpiarmy.com/

One of the things he does is make slope tiles. You can download and run the demo too. I haven't made anything like this yet but it should be some help.

Share this post


Link to post
Share on other sites

This topic is 3335 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this