It snowed here in Boston on Wednesday. Enough that I didn’t make it out of the house. Or at least not out of the driveway with shovel in hand. So, with a day off, I worked on adding features to SWFSheet. From yesterday’s post, I successfully implemented features 1-3. To recap and expand:
1. PNG Sequence Export. Click on the new button “Export PNG Sequence” and a small window will pop up. Here you can enter the prefix to save the files with (“frame_” by default), and browse to a directory to store them.
2. Custom Sprite Sheet Sizes. There’s a new radio button in the size section, called “Custom”. There’s also a button there that will pop up another small window allowing you to set the size of the custom sprite sheet size, up to 4096×4096. Nuff said.
3. MetaData Saving. Click the Save MetaData button and yet another small window will open. This has a group of radio buttons allowing you to choose an export format. The first is the Zwoptex xml/plist format used by cocos2d. Then the Corona format, which should save in a format defined here. There’s a generic XML format I created, and the Sparrow format, which is essentially the same with slightly different names, and a raw text format that is just a comma-delimited, one-frame-per-line text dump of x,y,w,h.
As I write this, a few people are testing the new build, and so far so good. But I’m releasing this as a beta, just as a warning that the new stuff may not be thoroughly tested – particularly the export formats. In fact, they might not be tested at all. So try them out and let me know if you run into any issues and I’ll correct them ASAP.
As for more advanced texture packing, I’ve pretty much decided against doing anything on this. I’ve had a couple of offers to share code or collaborate on packing algorithms, but I think I’m going to decline. For one, there are already some great tools out there that do a good job of this. Zwoptex as I’ve mentioned, and also TexturePacker. It would take a LOT of work on my part to come close to what they do in that regard. They also do stuff like PVR generation, and multiple bitmap formats, dithering, transparency masking, etc. So I’m not going to bother trying to compete with these products, but do something that works well with them.
The other point is that with the new PNG Sequence Export feature, SWFSheet will work in conjunction with these or any other tools wonderfully. Load your sprite, set the frame, number of frames, etc. and export a PNG sequence. Load that into one of these other tools and pack away. This doesn’t belittle the value of SWFSheet at all. Those other tools cannot make sprite sheets from SWFs. And there’s no good way to get image sequences out of Flash, so they complement each other perfectly.
You might be saying to yourself, “but Flash already has an image sequence exporter.” But if you’re saying that, you’ve never actually tried to use it. It’s virtually useless. Yes, it will export a sequence of the frames on the main timeline. But what if you have animations in nested clips? Nope. Animations set up with code on enterFrame events? Nah. Timer-based animation? Tween libraries? Forget about it! SWFSheet will export PNG sequences from all those without a problem. In fact, the more I thought about it, the more I realized that the PNG Sequence Export is really a pretty awesome feature all by itself.
So here for your pleasure, is SWFSheet 1.1 beta. Use it, abuse it, give me feedback.
Very cool. I’ll definitely try it out.
I’m curious as to what your use cases where. This will sound weird, but I like the idea of the app and the back of my brain is saying it’s a pretty useful tool but I can’t think of why or where I’d ever actually use it.
The only thing that comes to mind is exporting a png sequence of a flash animation that I can then import to a DirectX or OpenGL project assuming I wasn’t using Scaleform.
It’d be appreciated if you could share some ideas of what you’d use this tool for.
Thanks!
Here are some use cases: You make an animation in Flash and you want to use it in an iPhone game, an iPad game, and Android game, a Windows Phone 7 game, an XBox game, a native Mac game, a native Windows game, a native Linux game, an HTML5 game, a Java game, etc.
Nice app! Very helpfull. Thanks!
Hey Keith,
Massive thanks for sharing this, it sounds like a great tool with a lot of potential, especially now it can be used along with zwoptex and other packaging tools. I look forward to testing it out properly soon.
I do have a feature request, or just wondered if you thought it was feasible. Although I’m not sure if you can access individual flash layers when you load up an external swf, and alter settings? So this may not be possible.
We have some pretty complex character animations, that need groups of layers rendering out to different sprite sheets, and these are then composed back together in cocos2d at runtime to re-create the fully animated character.
I currently have some jsfl commands to help with the export procedure (turns groups of layers into hidden guides, so they don’t render, & loops through exporting each frame as a sequence), but it still involves alot of steps, and then manual work removing unwanted frames (within certain frame ranges) before being able to package it all up with zwoptex.
So feature ideas/suggestions:
1) Would there be a way to possibly toggle on/off different layers from the app? And even better, be able to save these groupings so re-exports after swf changes could be greatly simplified?
(perhaps if layer info isn’t directly accessible, could certain callbacks/commands be sent from swfsheet to the swf to trigger different modes/loops etc?)
2) Could an option be added to allow for multiple frame ranges. e.g. if I want to export frames 1-10, and also 20-40 to the same sprite sheet. (although as your app can handle AS code in the swf, I suppose this could be scripted into the flash file itself).
I have a big re-export of all character assets coming soon, and had been planning to code something to help that along, but it looks like you’ve done alot of great work on this (I really like the idea of capturing the swf output, so you can use all the flash features, rather than rely on Flashes own dated export routines, that feature alone will be causing me to give a donation once I’ve tested it works on the project).
This almost sounds perfect for my needs, if I can somehow fit those features into the work flow (be it within the app, or pre/post process using other apps/scripts.), that would be amazing!
If you have any ideas/thoughts on this, I’d love to hear them?
Keep up the great work, and thanks very much for the blog posts. Always enjoy reading them π
Cheers,
Phil
Yeah, layers do not exist in a compiled SWF. They are an authoring time paradigm only. Exporting different ranges of frames might be possible, but would be pretty complex. I doubt I’ll go there. One thing I found a lot of people don’t know about is that in Flash, you can right click on a movie clip in the library and choose “Export SWF” to create a SWF of just that movie clip. This can then be loaded into SWFSheet. That might help you.
Wonderful π thanks
Hi Keith
I was wondering about using these images for blitting in Flash, so we can optimize performance for other devices … this worth the efforts ? Tks
I don’t really understand your question. This just creates a sprite sheet, which is a large png. You can use it in Flash or just about any other game framework / device.
Hi Keith, thatΒ΄s what I meant, so I think your app will be really useful π
http://blog.hexagonstar.com/animatedbitmapclass/
Right. the animated bitmap class talked about there is just a sprite sheet with code to animate it. just about every game system has support for that. and since the bitmaps are essentially just tiles of images, the same ones can be used in multiple systems.
fantastic program works great
you should work with VirtualTek
for mugen im the main logo designer for AL Studios
but im an also CEO of AL studios game Design Department
your program is just what i’ve been looking for to make my sprite sheets thanks!!!
Keith,
This is a great tool. A nice feature using this code base would be the ability to create an array of bitmapData frames or sprite sheet at runtime — ie have this code in your game and prerender sprites from your movieclips.
This would allow you to have the lighter weight vectors in you .swf and at runtime it would generate the spritesheet for you to use. This is obviously specific to a flash game, but would dramatically bring down the size of the .swf. So you are trading file size for a prerender process that might take a little bit of time.
Does that make sense ?
max
Image sequence export from CS5 is a little buggy.
We’ve gotten all sorts of mixed results with ActionScript or timeline animations. Ended up writing a SWF to image sequence renderer AIR app for it (and also released it: http://swfrenderer.kurst.co.uk/ ).
Thanks again for the wonderful minimal comps…
A fantastic tool. Thank goodness for brilliant and generous people like Keith who make up for Adobe’s shortcomings.
It will be good thing to add function “crypt pictures” – adding algorithm to shift strings in pictures, change strings positions, etc. and making output xml crypt algorithm. This will secure images from decompiling. Also in as code picteres will be decrypted by xml algorithm. What are you think?
Seems like kind of a fringe feature. Or something best handled with another, separate tool. Not a bad idea, but I don’t think I’d add it to this tool.
The program is very bad, it should automatically calculate the size of the image rather than be prompted. Each time I have to make a spritesheet I have to use the calculator and perform calculations in order to know what size to create the file, the program is very bad, you could at least release the source code to be improved by us. I have to do everything you did to create a program that does exactly the same but will automatically calculate the size to fit exactly the content. Please think about it.
How about you make your own and open source it? Please think about it.
i will, and that will be the end of your program bitch
@ fermmm
You should ask for your money back…
mike
I hate it when free shit isn’t open sourced. GOSH!
Holy moly, spicy guacamole!
@fermmm
It seems that you’ve just become all uppity about having to use software that does all the work for you to assist you with software that does all the work for you.
Thank goodness there will soon be a ready alternative to the monotonous task of having to do specify what the user wants. Phew.
I remember when I was 12…
i am 23 but when i see bullshit like this, a 12 years old kid comes from inside me.
@fermmm
If I was forced to use an application that did all the work for me to assist with specifying what I want rather than need for another application that does all the work for me, I’d be indignant and uppity too.
WordPress, my old friend, if you’ve told me you had an error and couldn’t post my reply and then shown me that you, in fact, did not post the reply after I’ve refreshed twice, why would you then submit aforementioned reply? It seems you’ve done this out of spite. I think we need to have a talk and sort things out.
Dear fermmm (if that is indeed your real name),
I agree with Mike that you may want to ask for a refund. While you’re at it, please try to remember that not only has Keith done more for the Flash Platform than you could ever hope to do just for yourself, but that he has done it to help make things easier for others. And he has done it without asking for anything in return.
Also remember this: If not for SWFSheet (BETA), you’d have to do much more than break out a calculator. And speaking of the fact that it’s in BETA, I’d be willing to bet that Keith would be much more receptive to something like a feature request than to straight up telling him “the program is very bad” because it doesn’t do ONE thing that you would like it to do. Wouldn’t you be more receptive to that? I think so.
Now, please tell Keith thank you for his countless contributions that have helped so many of us along our way. K? K.
You are wrong, you can export all frames in diferent files from flash or from another program and then join them into the spritesheet with another program. If you do that you get the spritesheet more quicker and more easy than picking up the calculator to do a stupid thing. I did not contribute but i can complain if i want. You say this guy contributes to the platform, contribution is make a free source aplication or at last make something that works before asking for donations. When i steal the code and make my own version I’ll give him a lesson of what is contributing.
Wait, so what you’re saying, fermmmmmmm, is that you can do it with 2 or 3 programs plus the calculator? fuurrrmmmm, that’s MORE work, farmmm.
And wait another minute, foorrmmmm. You’re going to steal his code to write your code? But fmruummmm, that’s still using HIS code, fworm.
I can see that you just don’t get it. That’s ok, I was a child once as well.
Oh, one more question, spermmm… can you show us where your current contributions are?
learn to read jason, i’m using only 1 program, no calculator, nothing. My contributions are in cristalab.com
I count at least 2, fern.
“you can export all frames in diferent files from flash or from another program and then join them into the spritesheet with another program”
“from flash or another program” and “join them into the spritesheet with another program”
So, uhh… cristalab.com is YOUR site? I can’t find you on there. Oh, wait. I just decided I don’t care to find you on there anymore.
Quick note (and I think you’ve already been told this): If you don’t like something, just don’t use it. Makes sense, eh? That’s an easy solution, yes? Yes.
One more reminder: If you steal Keith’s code to reuse it, then you must like everything SWFSheet does except for this one feature. Hmm… sounds to me like you actually LIKE SWFSheet and you’re just a bitter mess that you couldn’t do it yourself. If you could, you wouldn’t be thinking about stealing his code, now would you? I think not. Good job, ferb. Keep it up.
I can do it, i will, you need to create a bitmapData for every frame of the loaded swf, then draw them all in another bitmapData , that’s it, i just don’t want to remake a work that has already been done before, thats why i’m stealing this guy’s work.
So in other words, you find his work to be useful and you are going to work from his contributions? Wow! How nice of him to build SWFSheet to get you started, flurbbb! You should give him a big ‘ol “Thank You!”
no man, when you steal something you don’t say “thank you”, you pick it up and go. I would not have to steal if this guy had an open mind to free software and social coding.
At least you admit you’re stealing.
But if you are are going to talk about how bad you think it is, then you shouldn’t use it. That makes you a hypocrite. But I can tell you’re just to young, angry and full of angst to understand that.
I’m done with you, boy. I have more important things to do.
Buh bye, now.
of course i olways did, i’m proud to be stealing something that will be available to everyone, like robin hood did
i will decompile the source of this crap, copy paste and create my free source decent version.
You do that tough guy. We’ll all be waiting.
You are amazing, “fermmm”. Thanks for the chuckle.
I’m seriously looking forward to it. What is your site?
What I enjoy most is your lack of ability at typing grammatically proper sentences with coherent English. Makes me wonder if you can write properly formatted and functional code. Let me ask you know it all 23 year old, do you know it all, or should we all just pretend like you do? You sure seem convinced you do, you know what I’m saying?
i dont speak english, i speak spanish, thats the problem, if I knew more English i would say worse things
@fermmm interesting, I didn’t realize that certifiable idiots could possibly be literate. Kudos kid, you make it look easy.
Stop being a douche – until you contribute you have just about zero right to complain. If you have contributed, I apologize in advance.
fermmm,
Fab news! I have now subscribed to this so I will get updated when you post the link to your code.
I can hardly wait!
fermmm,
I saw that you had left another comment, so I rushed back here thinking that you had decompiled keith’s code and made it much much better.
I am a little disappointed that you haven’t done it yet, but its ok, I don’t mind waiting. After all the best things take a little more care and attention.
Will you be skinning it yourself? – if not, I can help, I have found some really nice clip art that I found lying about on the web. Its glossy and looks a bit like iphone icons.
I’m writing comments because some people defends this guy even if he does the worst crap he ever did and then ask for donations. I don’t have time to decompile it today, but feel free to skin it when i get it ready. I’ll post it here.
@fermmm
The fact that your “name” doesn’t link to anything tells two things:
1- You, sir, are an anonymous coward and as such should be barred from commenting and/or opinions.
2- You are probably a non-contributing zero(*) that thinks he is somehow entitled to judge the work of Mr. Peters.
If you are so un-happy with this tool, don’t use it. If you think you can do better, go for it. But at least learn manners and get an ounce of appreciation. Until then STFU and crawl back into your hole of nothingness.
@Keith, If I may call you Keith. Thank you. And here is the “Thank you” fermmm forgot.
Jerome.
(*) Credit for “non-contributing zero” goes to Louis CK.
1- my name links to lot of contributions in spanish forums because i’m from Argentina, serch fermm in cristalab.com for example.
2-This is the internet and the internet is chaos so if i want i say: “go to suck keith’s midle finger, bitch!” and there is no problem because this is internet.
You don’t know what freedom is, only because i dont like this aplication and the attitude of the guy that made it and because i’m angry you say that my comments should not be allowed.
Fernando from Argentina, your anger is consuming you. You are 23 and should not get that upset about these things, like http://forums.adobe.com/thread/777790
You may need a hobby or a way to channel that anger and turn it into something positive. Maybe fight social injustice. Shouting at people, insulting them and trashing their work is not healthy.
I worry about you, Fernando.
Sincerely,
Jerome.
PS: Keith, this will be my last post on this. I did feel I had to help guide Fernando out of this path of anger and destruction. A bit of an internet intervention, if I may.
lol keith is controling this from behind, don’t worry about me, i’m having fun, i want you to be angry to have fun and i’m practicing english with you guys, i’m not engry, i didnt like the application at all and i will create my own, because i’ts a simple aplication, there is no problem. Keith will you correct this problem in future versions? if you will not, i make my own aplication, because i’ts a realy usefull idea.
@fermmm…
now i know why you are the way you are..cuz you’re mexican and from that part of the world..
case in point:
“…a lazy, feckless, flatulent oaf with a mustache, leaning against a fence asleep, looking at a cactus with a blanket with a hole in the middle on as a coat.”
http://www.nowpublic.com/culture/top-gear-mexico-comments-video-ambassador-demands-apology-2754302.html
pretty much sums up what you’d look like developing you’re own app π
you know i’m not really bigotted and racist but when i read your remarks about someone so vital to the flash community i must defend his honor…
do not get angry I’m playing, i respect this guy, he did a realy nice job, but the application can’t be used and should be free software because it’s the only solution for creating spritesheets.
I don’t use Flash and have no idea what the program does, wether it does it well or poorly, but all I can say is that if you don’t like it, go somewhere else and use something else. Your not obligated to use it, and as many others have already said, if you believe you can do it better then do so.
There is no need to be abusive about anything, especially when its a free service. You are not forced to donate any money here, and Im sure you’d do far better for suggesting a nice feature that you would like, rather than than slating a developer, being abusive and talking about ripping off his code.
My 2 cents.
Don’t worry, there are al jokes, I do not even need to steal the code and I think I have the right to express given that lot of people agree with me, i’m talking for a los of people.
hey fermmm, dude i totally agree with you, not only is this app a piece of shit (i mean, you’re right, using the calculator, what is this? Quebec?) but Keith once touched me in a COMPLETELY INNAPPROPRIATE PLACE (i think it was Amsterdam, people were watching, it was awesome)
you go do your thing, girl, decompile that shit and show Keith what a REAL MAN can do!!!!
So, to summarise, i love you and i think i speak for everyone when i say
@fermmm
Your comments made me so angry I wanted to obliterate them. So I made this video response:
http://www.youtube.com/watch?v=n-8J-hD_g4g (all in good fun. I believe in free speech).
– Randy
hahaha lol i liked it!!
you didn’t destroy 1 comment
He fermmm what’s the link to your website/blog whatever? So we can follow the progress or see the result of your effort?
I have not a blog, i olways use big forums to post my work, I will create a blog to post the spritesheet creator, I’m finishing with it, its working, I’m fixing some bugs with the PNG decoder right now, but i’ts almost done. I will create a blog and post the link here, probably today.
BETTER APLICATION AND OPEN SOURCE:
http://code.google.com/p/swfspritesheet/
15% of the code it’s stolen from this aplication, the rest of the code i made it or comes from other sources.
I’m creating a worldpress account today with more details and screenshots of the aplication, I’ll be posting the link to it here.
neil manuell: if you make a skin for it, send it to me to fermmm@gmail.com and i will upload the skinned version to google code.
hahaha. wow, your version is SO much better. I’m ROFLing. π
You removed most of the features, and what’s left does not work. Yes, you pwned me.
it’s usable and this is not. With my version you get a PNG with the size it needs to be with only 2 clicks
honestly, it doesn’t work at all. it only draws a single frame of my swf.
and the best of all things, it’s open source, this is not, so you can download source code and add the functionality you want it to have, so shut up.
that’s great. if i add enough functionality, it might be almost as good as the original.
it’s already better
we are done here.