Heya, I'm the coder.
I wouldn't think of it as a showdown
(EDIT: okay, there was a now-deleted above me that said something like, "it's showdown time!", to explain the context of this response)I really like Adam, and Flixel and the games coming out of this community (I even pop in to help out in the Help forums occasionally), and FlashPunk wasn't built with competition in mind at all. It was originally inspired by Flixel, which came the closest to offering what I wanted in a Flash library, but built around a few fundamental aspects which didn't suit my programming style or needs.
So I coded it initially for personal use, something I could use to make all my Flash games in and significantly increase my rate of development. When I announced that I'd share the code publicly, just in case anybody wanted to use it, since I wasn't feeling very greedy, I got a bit more of a reaction than I expected.
I'll list some of the key differences between FlashPunk and Flixel:
+ FlxSprite's physics use FlxG.elapsed to move the sprites every frame based on the time passed since the last. FlashPunk does not use this system (although you could implement it yourself if you wanted), instead it uses a fixed-framerate that you choose at the beginning of the game, and it calls extra updates to make up for lost frames, but reduces rendering to a minimum while doing so.
+ FlashPunk does not use layers like FlxLayer for depth-handling, instead, it actually has active z-sorting for all the objects. All Entities have a
depth variable that you can set at any time, and they will be drawing in the order from lowest-depth -> highest-depth. This is made possible because FP actually manages its Entities using linked-lists instead of arrays, so objects can rapidly shift their position in the list because they only keep track of the entity before and after them. Also, because linked-lists loop marginally faster in AS3 than arrays/vectors, an increase is achieved in the update/rendering rate.
+ FlashPunk currently supports rectangle or pixel-perfect (via a mask) collision detection, which is very-very fast. A bit of knowledge is required on knowing how to use FP's collision functions efficiently, though, whereas Flixel allows you to ovveride hitWall/etc. and specify actions upon collision. In FP, entities can check for intersection against a specific other entity, or they can do a batch-check against a collision type. Each entity can specify its own collision
search type, and when you call the
collide function, you can specify which
search type to check intersections against, and the first intersecting entity of that type will be returned. Since you then have a reference to that entity, you can specify on-collision actions or functions for the calling or intersecting entity yourself.
+ FlxSprites, by default, have a single bitmap they are assigned with several images, and you can create animations using arrays to cycle through those images in a particular order. FlashPunk works significantly different in this department. Because of the nature of my programming, I am used to assigning sprites with origin-values, or "hotspots", this basically represents the (0, 0) origin of the sprite, so if a 16x16 sprite has an origin at 8x8, whatever position you place that sprite at, the 16x16 sprite will be centered on that position. Sprites are managed through a SpriteMap class, and each of your game Entities can have as many SpriteMaps as you want. So each animation would be a separate SpriteMap, and a player might have a Jump, Walk, and Idle sprite that it can switch between. Because you can also set "origins" on these sprites, when you draw a sprite rotated, for example, you can specify whether you want to draw that sprite rotated around its center, or rotated around its origin. So basically you are able to natively set a "pivot" point from which you can rotate or scale the sprite.
+ FlashPunk does not have all the cool built-in physics stuff that FlxSprites have right now. I plan on adding "modules" to the library, such as a Platformer module, or a Physics module, that will each have special helper classes for dealing with objects with specific needs/behaviour, but I plan on doing that after getting some feedback on the initial framework and making improvements first. But until I get these built, a good bit of the physics/movement work that FlxSprites in Flixel have already done for you will have to be coded yourself.
+ While FlashPunk will be released with a
build-a-game-in-9-steps beginner tutorial, which assumes as low as no previous AS3 experience, it does not have the community that Flixel has to offer currently, and may never have such. At the moment I am working on a way to optimize the documentation so that it is as accessible and readable as possible, and hope to build a helpful search/FAQ that can answer most basic questions regarding the library, but this is a hard thing, and for the first while people might be required to contact me directly for help until a bit of a community builds and a few more talented developers (such as nitram here) show up.
Yeah, everybody seems to be poopin out engines and libraries these days, so I figured I was no exception. Even though the library offers many similar privileges, it's quite different in fundamental ways and in usage; it's in no way meant as an affront to Flixel or the Flixel community though, so I hope it isn't taken that way at all. <3