Log in
Please log in or register.
Pages: [1]
  Print  
Author Topic: FlashPunk  (Read 1859 times)
knivel
Jr. Member
**
Posts: 67


View Profile WWW
« on: Fri, Dec 4, 2009 »

http://flashpunk.net/

Just saw this posted on gamesetwatch (http://www.gamesetwatch.com/2009/12/fight_msd_shows_off_flashpunk.php). Sounds pretty familiar, eh? I'm curious to check it out when the code is available.
Logged
ChevyRay
Newbie
*
Posts: 31



View Profile WWW
« Reply #1 on: Fri, Dec 4, 2009 »

Heya, I'm the coder.

I wouldn't think of it as a showdown Tongue

(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
« Last Edit: Fri, Dec 4, 2009 by ChevyRay » Logged

lithander
Full Member
***
Posts: 191



View Profile WWW
« Reply #2 on: Fri, Dec 4, 2009 »

Thanks for that in-depth comparision. Very interesting read! What license will you release FlashPunk under?

You mentioned that everyone and his dog are creating flash game engines nowadays. The last time I checked there weren't so many. I tried Flixel, Pushbutton and Flashbang. Anything noteworthy that I missed? (not interested in 3D)
Logged

Simplicity is the ultimate sophistication ~Leonardo Da'Vinci
darthlupi
Full Member
***
Posts: 208


All Smiles


View Profile WWW
« Reply #3 on: Fri, Dec 4, 2009 »

ChevyRay, how dare you show your face around you you you...
...Shrike!

I want to see the code, but I understand the pains of needing/writing documentation. 

The idea of modules is pretty fun.  Makes good sense, and good luck cool guy!
Logged

To take care of that not so fresh feeling: #flixel on irc.freenode.net.

Use your favorite IRC client or  http://webchat.freenode.net/
ChevyRay
Newbie
*
Posts: 31



View Profile WWW
« Reply #4 on: Fri, Dec 4, 2009 »

I wasn't talking about Flash game engines/libraries in particular; just game engines in general, such as McCartin's BQ engine, Ivan has a (apparently rather comprehensive) game engine coming out just this christmas, Alec Holokwa is planning on designing a 2D/3D game engine, I know a fellow who is creating a C++ framework called Sill, Unity and UnrealEngine are now free for independent use (they are 3D though), etc.

It could just be the people I know, though, I suppose folks outside of this loop are killing for things like Flixel. I haven't used PushButton in particular for making a game, but I did plenty of read-throughs of their code while designing FlashPunk, just as I did with Flixel, and countless amounts of AS3 libraries (such as the lovely Polygonal code sets). I probably exaggerated a bit, heh.

I don't have a good know-how when it comes to licensing, but I'm getting suggestions from other folks. PushButton and Flixel both use the MIT license, which is really simple and seems to be what I have my eyes set on, so it'll probably be released under that.

@lupi yo yo bro w the fro. I didn't finish listening to your podcast thing, that was really long, but also amusing at parts. I'm actually sending the code around to a few folks for testing and stuff, so if you're bored or whatever and want to check it out, I could share what I've got with you now. Matt's working with it right now, and giving me suggestions/improvement ideas.

Cheers all, anyways.


EDIT: Yeah, I cleared up a few things, but that's pretty much all I'll say here now. I don't want to be "pimping" my own engine on Adam's forum, as that'd be a pretty douche thing to do. So peace, you guys Smiley
« Last Edit: Fri, Dec 4, 2009 by ChevyRay » Logged

Adam Atomic
Administrator
Hero Member
*****
Posts: 724


hostest w/ the mostest


View Profile WWW
« Reply #5 on: Sun, Dec 6, 2009 »

nah its cool Cheesy I love that there is different stuff out there in different styles.  I think drpetter has HIS own pixel flash engine too, but maybe with a more hardcore/oldschool focus?  it can do all sorts of fancy pixel FX i think, judging by his last couple games.  that guy is a frickin wizard.

but yea, flashpunk sounds rad Cheesy
Logged

ChevyRay
Newbie
*
Posts: 31



View Profile WWW
« Reply #6 on: Sun, Dec 6, 2009 »

Thanks man Cheesy

O: I've never heard of this. I'll have to check it out. I don't use lots of fancy pixel effects and stuff in my games, so I haven't experimented with a lot of that. In fact, FlashPunk doesn't even have an Emitter/Particle class right now, just really low-level sprite objects.

I actually Flx-ified one of my framework's classes already for Hideous, who is using it in his Flixel-made assemblee game. It was basically FlxBackdrop, which is used for repeated-background textures, so you can specify whether you want them to repeat horizontally/vertically, and they can have a scrollfactor/etc. I'll probably clean it up and post it in the Help forums so other folks can use it, etc. It's pretty easy to convert FP code to work in Flixel, so I might do this with a couple useful classes if I get some spare time.

But yeah, quite excited to have this finished. Matt Thorson is currently making the 4th Jumper game in it, and helping me fix it up, locate bugs, and make improvements to the code. Very happy with how it's turning out Smiley hope at least a couple of good games will come out of it (even if they're all mine Tongue).
Logged

Hideous
Newbie
*
Posts: 48


View Profile
« Reply #7 on: Mon, Dec 7, 2009 »

FlxBackdrop is awesome.<3
Logged
Pages: [1]
  Print  
 
Jump to: