Jump to content
  • Advertisement
Sign in to follow this  
somebodykulj

2D Platform Mario game collision.

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

I have worked with tile collision and that is easy but i want to make some movable objects that my character can jump on??? What kind of collision do i need to use??? i Use SDL by the way.

Share this post


Link to post
Share on other sites
Advertisement
AABB*'s should be just fine for detecting collisions in a mario style game, you might want to pass in some direction vectors for the collision resolution though.

EDIT:
*Axis Aligned Bounding Box, or rectangular collision

Share this post


Link to post
Share on other sites
It is not specific to SDL. If you really wanted to, you could do AABB simulations in the command console... So you really need to try to understand the concept rather than the implementation until you grasp it firmly. If you are having troubles with the concepts, maybe try learning some underlying 3D vector math, try this book: http://www.amazon.com/exec/obidos/tg/detail/-/1584502770

Share this post


Link to post
Share on other sites
I dont have to to read a book i ave a dead line for a game of mine, and all has worked until i had the need to implement moving object collision... sh*t i need some help with this... preferably a SDL example but that is too much to ask for, a good explanation will do.. AND dont give me the N tutorials i dont understand that..

Share this post


Link to post
Share on other sites
Quote:
Original post by somebodykulj
I dont have to to read a book i ave a dead line for a game of mine, and all has worked until i had the need to implement moving object collision... sh*t i need some help with this... preferably a SDL example but that is too much to ask for, a good explanation will do.. AND dont give me the N tutorials i dont understand that..


Well! Why didn't you say so?! I'll just drop everything and try to spoon feed it to you. Here, this site has LOADS of infos.

Seriously, I didn't say you had to read the friggin book, I simply suggested it because if you can't understand a concept such as AABB it is obvious that there are gaps in your learning experience and a common topic that people skip over / don't really pay attention to in the beginning of game programming is the 3D mathematics involved and instead tend to copy + paste tutorials (which is why you want an "SDL" geared AABB tutorial) code in hopes that that will one day make them understand it.

Excuse me for trying to give you advice on how to better yourself and your understanding of core 3D concepts.

Share this post


Link to post
Share on other sites
Why do you come down so hard on me i said it is too much to ask for.. damn I know i have gaps in my knowledge i havent even started learning vectors and trigonometry in school how the hell should i know this sh*t...

Share this post


Link to post
Share on other sites
Nobody is going to give you the code you need. That's not what we're here for. We're here to point you in the right direction. Once we've done that, you're on your own. Besides, if you can't understand AABB collisions you're in over your head on this assignment. [sad]

Share this post


Link to post
Share on other sites
Ladies and gentleman i have been officialy fu*ked, i know AABB collision dont you worry about that, i was thinking about another type of collision that is implemented using vector projections and is used for both squares and all other shapes,it is a special type of colision that in the same function has a responce too... not the typical AABB function. I have writen that same function myself and it has not worked, doo to stuff beyond my controle and that is why i was hoping for some C++ code to see where i screwed up, but no matter now i have thought of a way of making this a little easyer by usign the rectangles center to make a good responce and the AABB system to check the collision.

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!