PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

APE Engine 0.45a Pocket Frog Port

Hi friends of PM !

I'm working on a port of great APE Physics 2d Engine (from Alec Cove) for our loved pocketfrog...

I think the port is completed; the windows version works pretty well...
I tried then the ARM version, and strange things happen :D
(collisions problems, solids overlap other solids etc..)

I'd like to share my work with PFrog community so if someone maybe interested for his projects, maybe can help me in order to fix the pocketpc version.

I'm pretty sure all problems came from double type numbers round problems on ARM version or similar..
Surely there is a numbers calculation difference from PC and PPC version...
But i worked a lot on this port and i lost all my energies 8O

In short, i post here all my work...if someone is interested / has time / wanna help...

In the zip you can find full sources of the port with VS.Net 2003 project and evc++3 project, it should work with plain pocketfrog and pockethal.

All suggestions are welcome ;)

Good luck 8)
Best regards to all!

Port sources:
http://www.feejo.com/miscfiles/ape_pfrog.zip

Ape action script original version screenshot:
http://www.feejo.com/miscfiles/ape_as.jpg

Ape action script live demos:
http://www.cove.org/ape/demo1.htm
http://www.cove.org/ape/demo2.htm

APE PocketFrog port screenshot:
http://www.feejo.com/miscfiles/apefrog.jpg

Port windows exe demo:
http://www.feejo.com/miscfiles/ape_pfrog_demo.zip

Port windows exe demo large version, same size as original:
http://www.feejo.com/miscfiles/ape_pfrog_windows_large.zip

note: also this one is done with pocketfrog,a patched version of pocketfrog that allow to use custom windows sizes (on Windows). I really no need to post the patched pocketfrog sources, i posted the demo just to show the porting is working correctly on windows :D
Note also that in my sources the screen coordinates and sizes of the demo objects are divided by 2, i did this just for demo purposes, in order to fit the Car demo in pocketpc's screen
Wow this is really cool stuff!

Edit:

See it live here:

http://www.cove.org/ape/demo1.htm
http://www.cove.org/ape/demo2.htm
You're using the integer routine abs on floats, which converts them to ints losing all precision.

I changed 10 occurrences of abs to fabs and that fixed the problem. They are in the following sources:
CollisionDetector.cpp
SpringConstraint.cpp
RectangleParticle.cpp

I'm surprised this runs as fast as it does considering the amount of floating point math. Convert this to fixed point and it will run really fast.

I've attached the fixed ARM build.

Dan East
Attachments:
APE_Demo_ARM.zip (48 KB)
Wow!! 8O

Great!! Tonight i will check at home and i'llchange all abs calls....
I made the port as-is from action script, without further optimizations; but be sure i will try to optimize it after i'm sure all code works!

Thanks!!!
Hi,

Is there any updates on the status of this port? I would be very happy to integrate this amazing port into my PPL project.

EvilMaio, if you are interested, I could use some help in the next few weeks to implement it.
The port is completed ;)

The sources are the same i posted first time, just replace all "abs" calls with "fabs", as suggested by Dan.

You can do all replacement in .cpp files by yourself if you like (just find&replace; :D) or i can post a zip tonight when i back home ;)

Regards!
It would be very appreciated if it is not too much work for you.

Do I need your permission to include this port in my product?
Of course, but please give credits to its original author Alec Cove ;)
Of course I will that is the least I could do! :)

Thank you, I will put your name too, since the integration will be based on yours.