i am a game programmer and i use actionscript to do all my collision checking, boundary checking etc...but recently i noticed there are things called "physics engines" that help me concentrate more on game making rather than physics making. so i would like to know more. i heard there are few engines called "box2dflash" and "APE".
closed as off-topic by Byte56♦ Jul 9 '13 at 16:51
This question appears to be off-topic. The users who voted to close gave this specific reason:
There's no such thing as best physics engine. It heavily depends on what you need. Take Box2D as an Example: It is a fully featured 2D Physics Engine, originally developed in C++ and ported to ActionScript. It is great for realistic 2D physics simulation, including gravity, forces, friction, continuous collision detection and much more.
An Engine like Box2D is going to use quite a lot of your CPU cycles, especially when using it in Flash. It is also not trivial to set up and to create appropriate collider-bodies for your Entities.
If you wanted to create a game like Breakout, an Engine like Box2D would be overkill. A game that heavily uses physics for gameplay like Totem-Destroyer, is probably easier to implement when you can make use of a good Physics-Engine though :-)
There are also other implementations like the one provided with the Flixel Game-Engine. It isn't a physics-engine per se, but it contains a solid collision-detection algorithm. The engine also updates entity velocity and gravity.
In most cases, the tools provided by Flixel or similar engines are good enough. Just keep in mind that using a physic engine is going to be CPU intensive and you should choose the implementation that best fits your game.
I think it's a testiment to the engine which is very easy to use, has good documentation, loads of examples (although sometimes in different language) and is very fast.
The only downside is that it is limited to 2d. But this downside is a plus if in fact you are making a 2d game (which most of the time is the case in flash world probably)
As others here have said, Box2D is a pretty full featured physics engine, although it does take a lot of work to get it set up properly.
And as others here have said again Box2D is resource intensive.
Also I can almost tell immediately if a game uses Box2D, because of the way the physics behaves.
So my approach is to make my own small physics engine that looks unique when compared to other games, is easier for me to work with, and easier to wrap my head around.
If you are looking into box2d at all, be sure to check out World Construction Kit. http://www.sideroller.com/wck/
It uses an Alchemy port of Box2d, meaning it is converted from pure C code using Alchemy which really enhances the performance.
If you are authoring your game in the Flash IDE and not in pure as3, it basically makes the Flash IDE into a level editor by adding components for physics based shapes and joints. Definitely at least worth checking out the demo.
If you are using pure as3, the component classes could still come in handy.
If nothing else, playing with the components in the IDE and messing with the demos would be a nice introduction to using a physics engine and an easy way to familiarize yourself with the concepts.
Go with box2d, ape and fisix projects you mentioned are both dead. Box2d for flash has to one of resources and by learning it youre learning something you can take to almost anywhere.
I've made games in Ape it was good but as I said it's a dead project. I've made games in box2d, it's more upfront work but your returns are solid.
To the person who mentioned they could tell a game used box 2d by how it felt. I really doubt that, if anything you could tell it is using some kind of rigid body physics engine but that's about it.
Also check out motor2, another box2d port by a really smart guy.
Sent on iphone