Jump to content

  • Log In with Google      Sign In   
  • Create Account

Writing Physics Engine for DirectX 9


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
5 replies to this topic

#1 Medo3337   Members   -  Reputation: 680

Like
0Likes
Like

Posted 23 June 2012 - 02:55 AM

I am trying to create a Physics Engine for 3Ds games by myself, I want to know the basic idea on how Physics engine is created.

I will be load all the meshes from .x file.

Edited by Medo3337, 23 June 2012 - 02:56 AM.


Sponsor:

#2 Asesh   Members   -  Reputation: 268

Like
0Likes
Like

Posted 25 June 2012 - 03:24 AM

First of all I would never do that and neither would any game industry. Use PhysX, it's free. If you really wanna do so then I would recommend "Game Physics 2nd edition by David: http://www.amazon.com/Physics-Second-Edition-David-Eberly/dp/0123749034/ref=pd_sim_b_32

#3 L. Spiro   Crossbones+   -  Reputation: 14262

Like
1Likes
Like

Posted 25 June 2012 - 04:58 AM

The reason you have not gotten much in the way of replies is that you have posted a physics question in a graphics topic.
It isn’t really relevant that your images are in .X format and you are rendering via DirectX, but it is a bad sign as far as the outcome of your project is concerned. Since you aren’t able to distinguish between the different modules of your product, you won’t be able to really make anything until you get a lot more experience.

That doesn’t mean you can’t try, since that is the only way to get experience, but you should move your question to the appropriate topic.


L. Spiro
It is amazing how often people try to be unique, and yet they are always trying to make others be like them. - L. Spiro 2011
I spent most of my life learning the courage it takes to go out and get what I want. Now that I have it, I am not sure exactly what it is that I want. - L. Spiro 2013
I went to my local Subway once to find some guy yelling at the staff. When someone finally came to take my order and asked, “May I help you?”, I replied, “Yeah, I’ll have one asshole to go.”
L. Spiro Engine: http://lspiroengine.com
L. Spiro Engine Forums: http://lspiroengine.com/forums

#4 clb   Members   -  Reputation: 1789

Like
0Likes
Like

Posted 25 June 2012 - 05:11 AM

Alternatives to PhysX include Bullet, Havok, ODE and Newton. Chipmunk and Box2D are popular 2D physics engines.

If you want to learn how to write your own physics engine, I recommend the books Game Physics, 2nd ed., Real-Time Collision Detection, Geometric Tools for Computer Graphics and Game Physics Engine Development. After those, there are several good talks (e.g. from GDC and Siggraph) related to game physics, also google can help with those, see e.g. Game Physics Engines: and Introduction.

When writing a physics engine, I recommend keeping it strongly and strictly separated from DirectX 9. The rendering and physics part should not have any dependencies, since in a few years in the future, you will no longer be using DirectX 9, but want to keep using your physics engine, so it's best to plan for that in advance.

I don't want to patronize, but even though I consider myself an industry veteran, I think if I started writing a physics engine, it would take me well more than a man-year of development effort to create one that I might be mildly satisfied with.

Perhaps you are not looking for a complete 3D game physics engine, but are looking to implement simple physics-like behavior in your game. For that goal, writing your own physics-like logic update code is not that difficult, and can be simpler than integrating with a full-featured implementation.

Also, just for learning purposes, tackling a DIY project for full-blown game physics engines is of course ok, and if you're really looking towards that, good luck on your endeavour!
Me+PC=clb.demon.fi | C++ Math and Geometry library: MathGeoLib, test it live! | C++ Game Networking: kNet | 2D Bin Packing: RectangleBinPack | Use gcc/clang/emcc from VS: vs-tool | Resume+Portfolio | gfxapi, test it live!

#5 Medo3337   Members   -  Reputation: 680

Like
-1Likes
Like

Posted 27 June 2012 - 06:30 AM

What is most used Physics Engine in commercial 3D Games out there (especially, first-person shooter games)?

#6 TiagoCosta   Crossbones+   -  Reputation: 2455

Like
1Likes
Like

Posted 27 June 2012 - 10:06 AM

What is most used Physics Engine in commercial 3D Games out there (especially, first-person shooter games)?


The most used is probably Havok (take a look at this list).

Anyway, you shouldn't write a physics engine for DirectX (especially not for DirectX 9)... A physics engine should (*must*) be graphics API independent! Plus when the next gen of consoles is released no one will use DirectX 9, and you probably won't have finished your engine by then, so you will be developing for a deprecated API.

Edited by TiagoCosta, 27 June 2012 - 10:07 AM.





Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS