Jump to content

April 2017 »


Recent Entries

Recent Comments

Latest Visitors

- - - - -

Simple Particle Physics

C# Physics Particle Physics DirectX 11 SlimDX
4: Adsense

As I mentioned last time, I’m going to move on from fiddling with my Terrain class for a little while, and start working on some physics code instead. I bought a copy of Ian Millington’s Game Physics Engine Development some months ago and skimmed through it, but was too busy with other things to really get into the accompanying source code. Now, I do have some free cycles, so I’m planning on working through the examples from the book as my next set of posts.

Once again, the original source code is in C++, rather than C# as I’ll be using. Millington’s code also uses OpenGL and GLUT, rather than DirectX. Consequently, these aren’t going to be such straight ports like I did with most of Frank Luna’s examples; I’ll be porting the core physics code, and then for the examples, I’m just going to have to make something up that showcases the same features.

In any case, we’ll start off with the simple particle physics of Chapters 3 & 4, and build a demo that simulates the ballistics of firing some different types of projectiles. You can find my source for this example on my GitHub page, at https://github.com/ericrrichards/dx11.git.

Here you can see the four projectile types: 1.) a pistol-type round, 2.) a large artillery shell, 3) a fireball, 4.) a bolt from a railgun or energy weapon

Read more »

Jan 18 2014 07:14 PM

I think I looked through that book and didn't find anything useful for rotational physics, or else it was all mathematical theory. I read something about needing an "integrator" for a physics engine. Does that mean your engine needs to solve calculus problems?

Jan 18 2014 08:15 PM

I am unsure how useful this book will turn out to be; at the least I hope to get a good sense of the concepts underlying other physics engines, so if I end up using something else, at least I'll know what they're talking about.


Technically, figuring out the position of a particle from the velocity or acceleration involves calculating one or two integrals...  I really don't understand the FUD around calculus, but then again, I never took a college calculus class; anytime you try to learn math without using it practically, it seems like it is 100x harder to get your head around...

Note: GameDev.net moderates comments.