This is my attemt to create a 2d rigid body physics engine in flash. Everyone nowadays makes engines, so I decided to build a motor instead and call that thing **Motor Flash Physics** ;-).

I will document the creating process (let’s see how far I get…) and since physics is a rough and complicated field, Chris (studying physics at the moment!) will hopefully help me when its getting hairy.

A good point to start is gamedev.net, which has tons of material for game development.

There I found a nice C++ tutorial implementing a 2d physics engine by Oliver Renault.

Another gem I found is geometrictools.com and geometryalgorithms.com, both providing solutions and algorithms for geometric problems.

The first implementation shows the ‘seperation axis theorem’ in action – an algorithm to detect when two convex polygons overlap which of course is needed for collision detection and response.

If you are interested how this works, here is a paper describing the principle of the algo. Basically it tries to fit a plane between two polygons. If such a plane exists, both polygons are disjoint and cannot intersect, otherwise an intersection must occur.

Flash Demo (requires Flash Player 8)