Jump to content
  • Advertisement
Sign in to follow this  


This topic is 3488 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

hi guys, i can't for the life of me find anyway of getting collision into my game, does anyone know of a easy library to use, i have had a look at Newton, but all the examples are in open gl and i need to implement it in directx as my graphics pipeline is set up for directx. Please help a list of good collision libraries and/or full source code. Thanks Jamescobras

Share this post

Link to post
Share on other sites

... but all the examples are in open gl and i need to implement it in directx ...

That's not a problem. Because physics libs/engines have not beed designed for just DX or just GL.

You can use any of these engines: Tokamak, Newton or nVidia PhysX. Implementation and simulation are easy to use. But I recommend you to start with Tokamak. Here some examples:

A few things you have to do:
* setup the engine (I mean, engine object and physics simulation parameters, like gravity vector, static/dynamic friction etc.) and collision objects/primitives (mass, friction parameters, density etc.)
* start the simulation (for a time dt)
* get the results. These results are just transformation matrices (i.e. world matrices). Just assign these values to your meshes/objects.
NOTE: nVidia PhysX engine's matrix structure is column-major but DX uses row-major. This may be a problem for you. But transpose can solve this ;)

If you want any sample code, I'll be here; I can post Tokamak and nVidia PhysX sample programs/sources I developed in DX.

Hope this helps.


Share this post

Link to post
Share on other sites
hi i understand tokamak well (well as well as a newbie can) i have been playing with the code but when a slot it into my game code i get this irritating compile error (before this one i had a mega load (21) about external symbols, i checked the included headers and libs (MSVS 2008) and ended up manually including every thing) any way the current error is

error LNK2019: unresolved external symbol __iob referenced in function "public: float __thiscall TConvex::GetBoundRadius(void)" (?GetBoundRadius@TConvex@@QAEMXZ)

i presumed this was a function in one of the math headers so i included the directory in the options and still no joy.

Also i had to ignore LIBC.lib, all of this just doesn't smell right. Any chance of a different engine with full directx source code for beginners.

I have had a brief look at nVidia but i would like something free, i only want simple collide and 'laser' collision but room for expansion would be nice.

Help guys, suggestions, links to tutorials and helpful articles please. I have spent a while googling but havent found anything suitable for beginners, i must be looking in the wrong place.

Help GameDev!


P.S. programci_84/Rohat some simple nVidia source code would be nice, i think i have given up on tokamak really and the documentation is not great.

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!