Jump to content
  • Advertisement
Sign in to follow this  
NukeCorr

How this kind of collision can be made?

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

How this kind of collision and jumping method is possible and how can it be done? I have tried to do that for 8 hours with no luck. I got half working but the rest was pure cr*p. The red dots shows the ball's jumproute (game has tilemap) EDIT: and their combinations EDIT2: this demonstrates which tiles it should check on every jump Where should I start if I use C++, SDL [Edited by - NukeCorr on September 25, 2007 12:52:21 PM]

Share this post


Link to post
Share on other sites
Advertisement
Well, you first need to set up your collision rules. Example, on the third row, the third picture, when you hit the wall do you want to keep going up until you reach the point of your jump, drop down etc.

Also where do you need help with the collision detection? Do you have trouble detecting them, having trouble with the logic behind it, like what to do and how.

Basically you will need a Check Collision in your animation loop. It will somehow have knowledge of the concerned element of the collision, like your tiles and your and before you do the move, you check if your sprite position + a size offset touch anything that is around him. You can check the whole map at first and then optimize it by only checking with the tiles immediately around you. If you touch anything, you react based on the collision rules I was talking to you at the beginning of the post.

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!