Archive for the ‘Double Engine’ Category

Double Engine – contacts and friction

Thursday, October 7th, 2010

I’ve been working on the physics module of the Double Engine for the past week and after lots of trouble, it finally works the way I wanted.
I started by following the contact forces tutorial on My Physics Lab, but the method wasn’t working for me, even the simplified Gauss-Seidel I found here.
Fortunately, I was lucky enough to get help from Scott Lembcke, the author of the Chipmunk Physics Library, who was kind enough to answer all my questions on the TIGsource forums. His answers, together with his paper and the source of Chipmunk, helped me get rid of all my problems and to generally fix my code. Big thanks to you Scott :)

In the video below, you can see how friction (thanks to it the ball can roll around instead of just sliding) and contacts (the objects can now stack without interpenetrating each other) work.

It feels so good to have this working properly. Now that this is finally done, we can begin development of our second game, more info soon!

Double Engine – collision response & texturing

Thursday, April 22nd, 2010

Collision response is finally finished and I think I will concentrate on graphics and GUI instead of physics for now. The main reason for this is Trajectory which I want to port into the engine as soon as possible and the game makes no use of rigid body dynamics.

On the left you can see how collisions are handled now, some simple textures are also included.

Erik Neumann’s site ‘My Physics Lab’ helped me a lot, together with an article by Chris Hecker.

Some might have noticed the much better framerate of this video compared to previous ones, this is due to me getting a new gfx card, so this will be my standard recording quality from now on ;)

Double Engine – collision detection

Monday, April 12th, 2010

The physics part of the Double Engine is being developed, and today I believe to have finished collision detection between polygons of any shape. As you can see on the video each polygon consists of triangles, and all vertices are tested against an edge of another polygon to see if they are colliding with it.

In this example a vertex of one polygon (the circular one) collides with an edge of the other one (the triangle). Red point is the colliding vertex (and thus the point of collision) and the red line is the edge that collides with this vertex.

Disregard the collision response, it’s there just to show that detection works, it’s not supposed to be realistic yet. Realistic collision response will be the next step and I plan on having a complete rigid body physics engine.

© 2010 Double Dude Studio