what is the best beginner collision detection

collision detection for the beginner

Page 1 of 1

2 Replies - 6186 Views - Last Post: 31 July 2010 - 07:13 AM Rate Topic: -----

#1 DrZ76  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 21
  • Joined: 20-July 10

what is the best beginner collision detection

Posted 31 July 2010 - 05:31 AM

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

Is This A Good Question/Topic? 0
  • +

Replies To: what is the best beginner collision detection

#2 Salem_c  Icon User is online

  • void main'ers are DOOMED
  • member icon

Reputation: 1708
  • View blog
  • Posts: 3,282
  • Joined: 30-May 10

Re: what is the best beginner collision detection

Posted 31 July 2010 - 06:51 AM

Bounding boxes are as simple as it gets.
http://www.morrowlan...ngbox/index.php
Was This Post Helpful? 0
  • +
  • -

#3 PixelStation  Icon User is offline

  • New D.I.C Head

Reputation: 4
  • View blog
  • Posts: 44
  • Joined: 12-November 09

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.

This post has been edited by PixelStation: 31 July 2010 - 07:13 AM

Was This Post Helpful? 1
  • +
  • -

Page 1 of 1