Ok if anyone has read my blog then you know i am a beginner at game programming. I am using C++/DirectX. I can now display sprites and move them around, I have also learned how to use direct input to get keyboard and mouse controls. Now i need to figure out collision detection. All my books go like this ... teach c++ ... show how to init directx and display A sprite ... now heres 3D. Which would fine if i wanted to jump right into 3D but I want to play around with simple 2D games a bit first. Anyway none of them have a thing in them about collision in 2D.
What i would like to know is what are some of the easiest ways of implementing basic collision detection.
what does the DIC audience feel would be the easiest way to learn first.
the types of 2D games i was gonna play around with are; a pong clone-this will probably be the first one,
brick breaker clone-i feel this would be a logical step from pong... dealing with a single paddle and still a ball just adding in bricks
Mario clone- this one probably is a bit in the future
thanks for any input
mike
what is the best beginner collision detectioncollision detection for the beginner
Page 1 of 1
2 Replies - 4728 Views - Last Post: 31 July 2010 - 07:13 AM
Replies To: what is the best beginner collision detection
#2
Re: what is the best beginner collision detection
Posted 31 July 2010 - 06:51 AM
#3
Re: what is the best beginner collision detection
Posted 31 July 2010 - 07:13 AM
There's a couple types of collision detection, as said above me, bounding boxes.
However, there are different types of bounding boxes. The first is called "Axis-Aligned Bounding Box" or AABB. These are boxes that follow the x and y axis.
The other is "Object-Aligned Bounding Box", OABB (or sometimes Object-Oriented, OOBB). They are aligned to the shape that you are detecting.
OABBs are a little more complicated for collision detection because they aren't aligned to your X and Y axis.
And the easiest by far is radial/circular collision detection (using distance calculation). If the distance is less than a the combined radius of both the objects, then there's a collision.
Hope that helps.
However, there are different types of bounding boxes. The first is called "Axis-Aligned Bounding Box" or AABB. These are boxes that follow the x and y axis.
The other is "Object-Aligned Bounding Box", OABB (or sometimes Object-Oriented, OOBB). They are aligned to the shape that you are detecting.
OABBs are a little more complicated for collision detection because they aren't aligned to your X and Y axis.
And the easiest by far is radial/circular collision detection (using distance calculation). If the distance is less than a the combined radius of both the objects, then there's a collision.
Hope that helps.
This post has been edited by PixelStation: 31 July 2010 - 07:13 AM
Page 1 of 1
|
|

New Topic/Question
Reply



MultiQuote




|