Hi everybody !

Several monthes, I convert 2d alpha-stage physics engine APE, from Flash ActionScript to Object PAscal.
This engine was initialy wrote by Alec Cove (http://www.cove.org/ape/)

I made first conversion version (many Memory leaks yet !), and then, I'll send a mail to Alec and ask him to add the conversion on his repository, but no response
Therefore, the Ape web site have no more activity during last year. --> perhaps (unfortunaly) neglected ?

On APE site, you'll find Java and c++ conversion too.

I'll release now this code as is, perhaps it could be usefull for somebody ?
I think It could be cool for a 2d casual game.

I'll continue the translation (079 is on site, but I feel this is R&D... so, I prefere wait and see)
when free time occurs ) but feel free to add stuff and show it to us !

quick Features :
- Circles, Rectangles and Wheels particles.
- Spring constraints.
- Groups processing.
- Groups Collision.

The base concept is simple :
On grouping Particles with constraints, you'll build model with a real physical response, then, you register Collision interaction and you'll get a "physical Word"
See examples

Notes :
- In ActionSCript, it is a reasonable fast engine, so, in Pascal, throught Delphi compiler, it is *more* than a reasonable fast.
- I feel the Original ActionScript code very well written : try to keep its Object Model in Pascal version.
- In ActionScript, there is a Garbage Colector. Not such stuff in Delphi (language for big boys ) --> So, there are certainly few (many) memory leaks, cause code is mostly a direct translation.


To do :
- I think the collision treatement is not bestest method --> It should be best to base it on cross line with geometric approach.
--> This will avoid completely the object's cross over behaviour.
- Event's should be spread in code, in order to link easely with a game. But Status can be made too.
- there are a lack of usefull methods to handle easely object.


Here the looks of Pascal Version, in Delphi :



You'll find other inline (flash) examples on Alec's Web site.

Download here Delphi version (Sources and binaries) :
http://www.objectifstudio.com/Delphi...045_Delphi.zip

Have fun !

Vincent Gsell,-
:idea: