Look at them go! Stupid primates.
Click ‘Spawn Platforms’ for a new layout, or play with the Platform and APE count steppers!
I finally found some time to play around with the AS3 physics engine, APE; something I have been meaning to do for a while now.
This is a pretty simple demo, and by no means pushes APE’s capabilities; however it should help introduce you to the API, as well as explaining how to create custom Classes which subclass the Group class in APE. This is a very useful method, as it means that you can build, for example, Classes for bridges, bone structures, Pinball style paddles (as I have done here) and use these to create scenes. Essentially, this is just a particle engine with bouncing particles and collision detection.
Though APE seems to lend itself very well to game development, I am no game developer. However, I do find the possibilities that APE holds very exciting. Here, I have used some basic artwork and added physics and collisions to it, something that could add a dimension to interactive experiments and even website interfaces. For example, it is extremely easy to use custom Sprites or MovieClips as ‘particles’ with collision, so interface buttons or images can become elements in a scene with their own mass, friction and elasticity! Cool.
I use FlashDevelop for Actionscript editing nowadays (which I highly recommend), so have included the project file in the source code. You will also find the Platform Class in there, which will show you how to build your own groups of objects using the APE API. The document Class will show you the basics of creating particles, assigning custom sprites to them and giving them properties which are used when they interact with the environment.
If I have a moment, I will go back and add more functionality, but I hope this demo will at least give an outline as to the potential of APE from a more artistic than mathematical point of view. If you want to know more, you can read the docs here, and download the APE engine here, but be sure to visit the creator’s site and send them some fanmail.
Have fun with it, but go easy on the Gorillas; they’re very irritable…Download: Playing with APEs