Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Collision Detection
Index -> Programming, C++ -> C++ Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Mazer




PostPosted: Sun Aug 29, 2004 8:57 am   Post subject: Collision Detection

Does anybody know of a good collision testing library for C++? One that's simple to use, and platform independant. Oh yes, and fast too. Razz

I would write my own, but that's time consuming. Sure I like to do my own code as much as possible, but as it turns out, I'm not only the programmer on this project. I'm also the graphics artist, music/sound biatch and everything else this game will involve.

Thanks for any help.
Sponsor
Sponsor
Sponsor
sponsor
Dan




PostPosted: Sun Aug 29, 2004 4:18 pm   Post subject: (No subject)

Is this 2d or 3d colsion dection? For 2d you whould think it whould be prity simple to make your own.
Computer Science Canada Help with programming in C, C++, Java, PHP, Ruby, Turing, VB and more!
Mazer




PostPosted: Sun Aug 29, 2004 7:37 pm   Post subject: (No subject)

Of course it would. But it's 3D. No wait... it is 2D! Thanks Dan! It's still gonna suck to write it considering all this other stuff I need to do, but ah well.
Dan




PostPosted: Sun Aug 29, 2004 9:27 pm   Post subject: (No subject)

Well there could be a 2d colsione dection lib out there for c++ but depending on how completexed your progame is you whould probly be agale to make one faster then you could by looking for one, dling it and figering out how to use it.

If you are doing it with OOP, then u just need a method (fuction in c i think?) that can be used to genrecalky check the objects that have x and y values.

like:

isHit(object1, object2)
{
if object1.x and object2.x and object1.y and object2.y values show they are overlaping factering in object1.width and object1.hight and object2.width and object2.hight then

return true

else

return false
}

you could also make the closione fuction in the object so you whould only need to impot the other object witch could make things easyer for the rest of the team. Then all you whould need is some more fuctions using or overloading that one to check more objects or all the objects on the screen.
Computer Science Canada Help with programming in C, C++, Java, PHP, Ruby, Turing, VB and more!
Mazer




PostPosted: Mon Aug 30, 2004 5:30 am   Post subject: (No subject)

These are complex objects though. Collisions will only be happening in two dimensions due to simplicity and design, but I'll be using a mesh for collision tests. Basically, the model will be outlined with faces.
I'd still rather get a library for now, I don't want to be messing around with matrix math right now if I can help it.

I'm a bit confused as to what you mean by this
Hacker Dan wrote:
you could also make the closione fuction in the object so you whould only need to impot the other object witch could make things easyer for the rest of the team.
Dan




PostPosted: Mon Aug 30, 2004 9:36 pm   Post subject: (No subject)

Oh i just mean insted of making another class that dose closione dection you could make a fuction in the class that repsents the object that needs testing.

I thogth u where just ment simple conlsione dection but if you are doing it by the mesh i could see why u whould whont a lib to do it.

My i ask waht you guys are making?
Computer Science Canada Help with programming in C, C++, Java, PHP, Ruby, Turing, VB and more!
Mazer




PostPosted: Tue Aug 31, 2004 7:03 am   Post subject: (No subject)

Hacker Dan wrote:
I thogth u where just ment simple conlsione dection but if you are doing it by the mesh i could see why u whould whont a lib to do it.

Yeah, at first I'll be doing bounding box checks, then once they've overlapped I'll want a library for accurate collision checks. It'd look too funny for a projectile to nearly pass through a target and still make a hit.

Hacker Dan wrote:
My i ask waht you guys are making?

Currently it's just me making the game. I wanted to keep it secret until it's done (or enough done that I could release it). So far only my few beta testers know. But once I get my new computer I'll be going almost pure Linux so I'll need another tester. You up for it?
Dan




PostPosted: Sun Sep 05, 2004 9:17 am   Post subject: (No subject)

Shure, allways nice to see poleops games Wink
Computer Science Canada Help with programming in C, C++, Java, PHP, Ruby, Turing, VB and more!
Sponsor
Sponsor
Sponsor
sponsor
Display posts from previous:   
   Index -> Programming, C++ -> C++ Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 8 Posts ]
Jump to:   


Style:  
Search: