DonationCoder.com Forum

Other Software => Developer's Corner => Topic started by: Codebyte on July 13, 2008, 07:24 PM

Title: Collision Detection...
Post by: Codebyte on July 13, 2008, 07:24 PM
Anyone familiar with a good collision detection algorithm for 2 objects? Im messing around with a networked game atm.. bored, lol
Title: Re: Collision Detection...
Post by: mouser on July 13, 2008, 07:32 PM
i would suggest you use a graphics and phsysics library combo with support functions for this kind of thing.
Title: Re: Collision Detection...
Post by: Codebyte on July 13, 2008, 07:42 PM
know anything good from personal experience?
Title: Re: Collision Detection...
Post by: mouser on July 13, 2008, 07:43 PM
Check out this thread: https://www.donationcoder.com/forum/index.php?topic=5471.0
Title: Re: Collision Detection...
Post by: f0dder on July 13, 2008, 08:01 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 :)
Title: Re: Collision Detection...
Post by: Deozaan on July 13, 2008, 09:10 PM
If you're working with 2D Objects, then Torque Game Builder (http://www.garagegames.com/products/torque/tgb/) should be a sufficient engine as far as collisions are concerned.

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