AS3 2D Physics Engine FOAM Demos and Sources For Semi-Realistic Physics, Euler + RK4 Comparison
Drew Cummin’s FOAM is a great flash as3 2d physics package that can be integrated quickly and get started with realistic physics in 2d flash apps and games. I have been playing with this since FOAM’s release last week and putting together some tests to show, comparing with APE and really looking forward to polygonal labs Motor Physics to add there.
Three excellent physics engines (FOAM, APE and Motor Physics) for flash in AS3 already. Basically at flash9 player/avm2 market saturation (it is now available to develop on in over 94% of market) is showing the power of the ES4/Javascript2 based Actionscript3 language and how it is inspiring developers to new levels of interest/inspiration. Then again haXe can target them all but I digress.
FOAM was recently released but the author Drew Cummins is showing very good support for the toolkit and released a plethora of goodins to support this great kit, bug fixes, samples, docs and some realistic physics demos as well as in depth walkthrough of creating a force generator and comparison of the Euler and RK4 equations used in that process and their differences (Euler being less correct due to the factors of the platform and intervals and environment, RK4 more correct but more expensive to run)
If you are developing realistic physics in flash games or apps this toolkit is a great source of inspiration.
- Demo showing semi-realistic physics and the results of the Euler and RK4 Solver in an orbit scenario
- Excellent post describing the IForceGenerator interface to make a GravitationalForceGenerator class used in the demo
- Code sample orbit of realistic physics (AS3)
- Code sample of GravitationalForceGenerator class (AS3)
- Euler class in FOAM
- RK4 class in FOAM
- FOAM AS3 2d physics engine source at Google Code
- Perpetual Fall
- Zero G Toy Chest
Tags: ACTIONSCRIPT, AS3, foam, PHYSICS

