Jump to content

  • Log In with Google      Sign In   
  • Create Account


Ladder Collision and Implementation in Platformers


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
2 replies to this topic

#1 coderNull   Members   -  Reputation: 103

Like
0Likes
Like

Posted 12 July 2013 - 09:14 PM

Hi guys, I just have a quick question about how to implement ladders into my new platformer game that uses a tile map system. How would the collision work out? I know it has something to do with the collision class because if a ladder would negate the platform collision rules, I just don't know how to get it started. Any help would be greatly appreciated, thanks. 



Sponsor:

#2 MarekKnows.com   Members   -  Reputation: 436

Like
0Likes
Like

Posted 13 July 2013 - 05:52 AM

How are you doing collision detection with your platforms?


---
Free C++, OpenGL, and Game Development Video Tutorials @
www.MarekKnows.com
Play my free games: Ghost Toast, Zing, Jewel Thief


#3 BrentChua   Crossbones+   -  Reputation: 1066

Like
0Likes
Like

Posted 14 July 2013 - 11:39 AM

Let's say you have two code paths; one for the normal jump behavior, and the other one for the ladder climbing behavior. Your tiles could have a type that represent what type of object it is; i.e wall, water, spike, ladder. When you player hits the "jump" button, you can check the current tile you're player is in, rect-to-rect intersection test, then check that rectangle's type. If its a ladder, then perform the ladder climbing behavior. If there is no tile that exists, or a non-ladder tile, then you can perform the normal jump code path behavior. 






Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS