The past couple of weeks I've been writing Flash games in Actionscript and using two different frameworks to aid my development, Flixel and FlashPunk. I started using Flixel first since several games I've played have used it and it looked simple to get started with. FlashPunk was something I started using the last week and a half for the Vanished game prototype I shared this week.
Flixel
Flixel has been used for quite a few flash games. Adam 'Atomic' Saltzman created the framework for his own games (Canabalt and Gravity Hook) and has open sourced it for anyone to use.
Pros
- Simple sprite loading, animations, and sound effects.
- Basic physics built-in (velocity, acceleration, friction, etc...)
- The library is well documented and has some excellent tutorials as well as user-created examples.
Cons
- Collisions are basic hit-boxes and I found myself wanting more control for certain games.
- No easy way to deallocate objects on the fly and everything seems to end up in the global scope.
FlashPunk
FlashPunk was created by Chevy Johnston and is probably best known for the "Give Up, Robot" series. It's a little more programmer centric but has some great features missing in Flixel.
Pros
- Complex collisions from hit-boxes to pixel perfect bitmap masks. Best of all you can run predictive collision tests along a moving line.
- There is usually more than one way to accomplish a task and usually it just takes a few lines to do some amazing things.
- The debug console shows hitboxes, a console log, frame rate, and other useful information that will save you time. Flixel has something similar but it is more limited.
Cons
- Basic documentation is lacking in certain areas and the basic tutorials leave you with just enough to get started. I had to dig around to find out that the emit function for emitters had a relative position to it's parent object.
- Physics must either be added through Box2D or by rolling your own.
And the winner is...
Flixel is a little to restrictive and I'm finding a lot more freedom using FlashPunk. The lack of physics was an easy thing to remedy and the pixel perfect collision made adding slopes a breeze. I haven't even scratched the surface of FlashPunk and I already feel it outshines Flixel. The framework feels well thought out and the debug console is a huge time saver.
If you are an artist and not primarily a programmer then I suggest Flixel. It is super easy to get started with and has some really powerful classes. As long as you work within the boundaries of the framework you'll find it refreshingly simple to work with.
Both frameworks are in active development and I'm sure that down the road each one will continue to get better. This comparison is obviously my own opinion and not meant to start a flame war between the two. Hopefully I could provide a clear summary of the two libraries.