Home | Blog | Software | Reviews and Features | Forum | Help | Donate | About us
topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • May 26, 2017, 01:42:34 PM
  • Proudly celebrating 10 years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: Collision Detection...  (Read 3021 times)

Codebyte

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 160
    • View Profile
    • Donate to Member
Collision Detection...
« on: July 13, 2008, 07:24:29 PM »
Anyone familiar with a good collision detection algorithm for 2 objects? Im messing around with a networked game atm.. bored, lol

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 37,060
    • View Profile
    • Donate to Member
Re: Collision Detection...
« Reply #1 on: July 13, 2008, 07:32:56 PM »
i would suggest you use a graphics and phsysics library combo with support functions for this kind of thing.

Codebyte

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 160
    • View Profile
    • Donate to Member
Re: Collision Detection...
« Reply #2 on: July 13, 2008, 07:42:40 PM »
know anything good from personal experience?

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 37,060
    • View Profile
    • Donate to Member
Re: Collision Detection...
« Reply #3 on: July 13, 2008, 07:43:40 PM »

f0dder

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 9,066
    • View Profile
    • Donate to Member
Re: Collision Detection...
« Reply #4 on: July 13, 2008, 08:01:53 PM »
Split your world into sectors. Within each sector, start by doing an inexpensive initial test (usually bounding boxes or spheres), and for potential hits, possibly do a more correct (and expensive) test.

How to partition, how to do initial-test, and how to do expensive-test all depend on your game... 2D vs. 3D, data structures you use, etc.

But as mouser said, you might want to grab an existing engine unless you feel like doing your own collision detection for the sheer learning experience :)

Deozaan

  • Charter Member
  • Joined in 2006
  • ***
  • Points: 1
  • Posts: 7,902
    • View Profile
    • Donate to Member
Re: Collision Detection...
« Reply #5 on: July 13, 2008, 09:10:35 PM »
If you're working with 2D Objects, then Torque Game Builder should be a sufficient engine as far as collisions are concerned.

But it might be a little difficult to figure out the networking parts.