Go Back  Xtreme Visual Basic Talk > Legacy Visual Basic (VB 4/5/6) > Game Programming > DirectX > Different ways to do collision


Reply
 
Thread Tools Display Modes
  #1  
Old 01-11-2004, 09:51 PM
CG03's Avatar
CG03 CG03 is offline
Regular
 
Join Date: Dec 2003
Location: California
Posts: 53
Question Different ways to do collision


I need to start on collision detection and was wondering what kind of different ways I can go about doing it.

Can i do pixel precise collision or do I use complete sprites?

Some recommendations on how to do collision detection would be great. Thnx
__________________
Christopher Greer
Reply With Quote
  #2  
Old 01-12-2004, 01:24 AM
JimCamel's Avatar
JimCamel JimCamel is offline
Mostly Absent

* Expert *
 
Join Date: Jun 2002
Location: Christchurch, New Zealand
Posts: 2,006
Default

Depends what shapes you're using. Rectangular is usually the easiest, and with the IntersectRect api it's usually the fastest too. You could do circular collision detection, where basically you calculate the distance between the two centers of the objects, and if the sum of their "collision area" radius's is greater than the distance, assume a collision. Otherwise the only option left that I can think of is pixel perfect collision detection.
__________________
Sometimes it happens feelings die, Whole years are lost in the blink of an eye
We once had it all but event conspired, Sometimes
Now that it's over, it is through, It gets me everytime I think of you
Sometimes It happens, feelings die, Sometimes
Reply With Quote
  #3  
Old 01-12-2004, 01:26 AM
CG03's Avatar
CG03 CG03 is offline
Regular
 
Join Date: Dec 2003
Location: California
Posts: 53
Default

what if I had a background map and made a collision map for it. how would I go about using that for detection?
__________________
Christopher Greer
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Bytewise collision detection Merri Tech Discussions 0 12-25-2003 08:46 AM
pics collision yhaim Game Programming 6 07-24-2003 07:05 AM
Problem with Pixel perfect collision... I really need help Kamochan DirectX 4 07-22-2003 07:40 AM
I need some expert help. Twan Game Programming 3 03-01-2003 08:02 PM
Possible solution to collision detection. . . MFCTC Game Programming 3 05-13-2002 08:47 AM

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
 
 
-->