Flade, opensource 2D physic engine

Today Davide shows to me this link to a new opensource project regarding Flash.
It’s a “free library for simulating 2D physics in Flash using Verlet integration. It currently features particles, stick & angular constraints, wheels, and surfaces composed of line segments. Designed primarily for games with a goal of speed and ease of use”
I immediately downloaded the available “alpha” release and made a first test..

[attachments docid=646 fields=caption,description force_saveas=”1″ logged_users=”0″]

I don’t know if the project is still alive and which is the developement status, but it looks very promising.
…And here the code used for the example above:

var psystem = new ParticleSystem();
psystem.setDamping(1.0);
psystem.setGravity(0.0, 0.4);
// cooefficient of restitution
psystem.setKfr(0.1);
// surface friction for particles
psystem.setFriction(0.5);
// surfaces
var sA = new Surface(new Point(0, 0), new Point(1, 200));
sA.setIsOrientH(false);
psystem.addSurface(sA);
var s0 = new Surface(new Point(1, 200), new Point(100, 200));
psystem.addSurface(s0);
var s2 = new Surface(new Point(220, 170), new Point(300, 200));
psystem.addSurface(s2);
var s3 = new Surface(new Point(300, 200), new Point(400, 150));
psystem.addSurface(s3);
var sB = new Surface(new Point(399, 150), new Point(399, 0));
sB.setIsOrientH(false);
psystem.addSurface(sB);
// circle surface
var circA = new CircleSurface(170, 220, 70);
psystem.addSurface(circA);
var leftX  = 10;
var rightX = 50
var widthX = rightX - leftX;
var midX   = leftX + (widthX / 2);
var topY = 160;
// wheels
var wheelA = psystem.addWheel(leftX, topY, 10);
var wheelB = psystem.addWheel(rightX, topY, 10);
wheelA.coeffSlip = 0.0;
wheelB.coeffSlip = 0.0;
// body
var rectA = psystem.addRectangle(new Vector(midX, topY), widthX, 10);
// wheel struts
var conn1 = psystem.addConstraint(wheelA.wp, rectA.p3);
conn1.setRestLength(5);
var conn2 = psystem.addConstraint(wheelB.wp, rectA.p2);
conn2.setRestLength(5);
var conn1a = psystem.addConstraint(wheelA.wp, rectA.p0);
conn1a.setRestLength(5);
var conn2a = psystem.addConstraint(wheelB.wp, rectA.p1);
conn2a.setRestLength(5);
psystem.paintSurfaces();
this.onEnterFrame = function() {
var keySpeed = 2.0;
if(Key.isDown(Key.LEFT)) {
wheelA.rp.vs = -keySpeed;
wheelB.rp.vs = -keySpeed;
} else if(Key.isDown(Key.RIGHT)) {
wheelA.rp.vs = keySpeed;
wheelB.rp.vs = keySpeed;
} else {
wheelA.rp.vs = 0;
wheelB.rp.vs = 0;
}
if (Key.isDown(Key.UP)) {
if (ang.targetTheta < 2.9) ang.targetTheta += .1;
} else {
if (ang.targetTheta > angDefault) ang.targetTheta -= .1;
}
psystem.timeStep();
psystem.paintWheels();
psystem.paintConstraints();
}

Flash Player 8 Public Beta

Released the Flash Player 8 public beta.
It’s a pre-release version of “the next major release of Flash Player. It is being made available for developers and consumers to test their content to ensure existing content plays back correctly and that there are no compatibility issues.
As usual there’s also the bug reporting form:
http://www.macromedia.com/go/fp_public_beta_feedback

http://www.macromedia.com/../public_beta

SEPY for OSX 10.4

SEPY ActionScript Editor running on TigerWorking on my new mac mini I finally managed to get sepy run for OSX (actually i made an installer for OSX 10.4).
I have fix the major platform related bugs, there are still some issues (such as mainmenu disappearing sometimes, import/export features), but on my first test it seems quite stable. Download it from sourceforge here: http://sourceforge.net/…&release_id=340616

I’ve also put a new testing Windows version here: http://sourceforge.net/project/…&release_id=340550

AMFPHP 1.0 milestone 2 alpha

Today Patrick released a new milestone of amfphp: Chnages in this alpha release:

  • Added new methodTable option (per method) “fastArray” => true|false for fast array serializing on return (will only make a difference for large multidimensional nested voodoo arrays)
  • Added new method Headers::getHeader($key) available from all services, also HeadersFilter.php added
  • Added FrontBase support
  • Added Pear::db support
  • Added CSV-based recordsets support
  • Renamed sql folder to adapters to fit with the CSV recordsets
  • Various bugfixes for PHP4 MethodTable class
  • Major overhaul of service browser, should work much better now
  • New actionscript template system for service browser, see browser/templates/ for examples
  • Added new return type binary that will write the value as a string but without charsetHandling
  • Added new return type raw that will write to the output stream directly (careful)
  • SSL with ie hopefully works now

Some new methods included recently, which you can use in the gateway.php file (for production env): – disableStandalonePlayer() Disables the standalone player by filtering out its User-Agent string – disableServiceDescription() Disable service description from Macromedia’s service browser – disableTrace() Disables remote tracing – disableDebug() Stops debug info from being sent (independant of remote trace setting)

amfphp project page

Flash/Javascript Integration Kit

As just read on the Mike Chambers blog, here the link to the beta release of the Flash/Javascript Integration Kit (How can i miss it?!?)
It works on these browsers/OS:
* Windows IE 6.0
* Windows Firefox 1.0
* Windows Opera 8.0
* Macintosh Opera 8.0
* Macintosh Firefox 1.0
* Safari 1.2.4 and 2.0
* Linux Firefox 1.0.4

and it can be possible to communicate passing complex object data type such as:
* objects
* arrays
* strings
* numbers
* dates
* booleans
* nulls
* undefined

In the installation page there’s also an example of the usage in flash:

import com.macromedia.javascript.JavaScriptProxy; 
var proxy:JavaScriptProxy = new JavaScriptProxy(); 
proxy.call("javaScriptMethodName", "arg1", new Object());

See docs here: http://www.osflash.org and http://weblogs.macromedia.com/flashjavascript/readme.html

http://weblogs.macromedia.com/flashjavascript/