2D Game Dynamics compiled for use with Haxe and AS3. Intended for use with the flash target and optimised for such, apart from a single method will also compile to C++ target from Haxe.

See Project Page

Demoes roughly copy-pasted from project page: (drag objects) (check project source repository too for demo sources where available)


PyramidDemo (11+11 iterations)(A bit deadly lest your computer is up to scratch, though if you are using flash player 10.1 prelease you'll get a higher fps (for me it went from 38 to 50 when everything is active in browser).(As a note of the magnitude of this test, given the number of iterations being performed, when the pyramid is not collapsed, there is (when no sleeping has occured) over 77k contact resolution calculations being done per frame)

PyramidDemo_AS3 (Equivalent test of above, but compiled through FlashCS4 in AS3.

TutorialBasic [TutorialBasic (*source in project wiki)]

OneWayPlatforms one-way platforms using callbacks + impact sounds.

TestConstraints Some fun to be had with using sensors as portals, and pivot joints for a bridge.

LayeredStackDemo dominoe stack with pressure and impact display. Blue = how much pressure object is under, Red = impact strength. Red colour is changed gradually, as otherwise the impact strength being instantaneous is rather hard to see.

TestSoftBody Using constraints + area based pressure forces to create soft bodies, with callbacks used to alleviate issues of forced intersections with too large-time steps. Group callbacks employed to deal with one-way platforms against soft bodies, treating entire soft body as one object for platforms (Stops the issue with shape, or object callbacks, where part of the soft body might collide with platform, whilst part hanging below might remain un-colliding). Exclusion group feature also used in preferance to callbacks for making soft body not self-collide.

TestRagDoll Pairing pivot joints and rotary limit joints for rag dolls, with one way platforms and paired breaking of constraints (one constraint holds reference to the paired constraint in 'data', when it breaks break it's partner too) on shoulders/hips/neck

TestDecomposition Draw any non self-intersecting shape to have it simplified+decomposed by GeomPoly and added to the space as a compound rigid body.

Nape Machine Rotary limit joints + Rotary limit joints with capped bias and force for trap doors + the ball tray, with motors for the wheels. Objects pinned to the stage through their centre of mass with stopMovement (where possible it's obviously better than using a joint which might not be perfect). Trampoline as a non-static un-moveable object with a velocity. OBVIOUS inspiration from chipmunk machine :P

FourFoci Graph PlottingUsing a MultiPinJoint to plot a curve where for each point the sum of the distances to the four foci is constant (like a double ellipse if you will) random focus points used.

Constraint Demo All current constraints demonstrated.

Marching Squares Using GeomPoly::marchingMesh to generate a set of concave polygons passed to Tools::createConcave for use by nape from a scalar function, extension upon the Decomposition Demo so you can still draw in objects with the mouse also.

version #8858, modified 2010-07-02 01:15:42 by dELtaluca