🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

long winded me

Published April 08, 2005
Advertisement
This actually started as a reply to TANSTAAFL's most recent journal entry about that C# Flash tool. It was getting long, though, so I moved it here. He was pondering a bit of a chicken-egg problem with the tool, as its preffered form for art assets is the SWF format, and you need Flash to make SWF. So, Presuming SWF is the sole import type for graphics, you'll still need a tool to make SWF art. Thankfully, most vector art-tools will do SWF. IIRC, the free Creature House Expression will do the job and is quite nice.

If you need animated art (like your 4-5 frame bee in the bee puzzle), the field's more limited. There's that $50 Namo flash knockoff that'll do the trick.

What I'm wondering is how you could deal with what I see as a nicety in Flash, which is that you can attach code to individual bits of animation if you want. For example, in Duck Tiles, when you mouse over a movable object (duck or soap), click-able arrows pop up showing you where you can move. I wanted to make the arrows wiggle back and forth a bit, which I could do either by making a 20-frame animation or by making a 1-frame animation and a little code. I opted for the code.

delta = -1.5;
_rotation = (Math.random()*20) - 10;

onEnterFrame = function()
{
if (Math.abs(_rotation) > 10)
delta *= -1;
_rotation += delta;
}

Another example would be the little bubbles that I put on the screen. If a duck rolls over 'em, they pop. To do this, I made an eleven-frame animation. Frame one is a bubble. Frames 2-10 are a simple expanding popping sequence. Frame 11 contains no graphics but the following line of code.

stop();

So, when I create my bubble, I tell Flash to stop it on frame one, so you see an ordinary bubble. If a duck ever crosses one, I simply do a. . .

bubble[index].gotoAndPlay(2);

This shows the popping sequence, then stops at the empty frame 11. The net effect is that you see a popping bubble, then nothing. The bubble object is still there, but since there's nothing on the frame, it looks like it went away. If the stop() code wasn't there, it'd just start over at frame 1, and you'd see the bubble pop over and over.

I haven't looked very deeply, but since NeoSwiff is structured more like a traditional programming tool and not like an animation tool with programming language grafted on, some stuff like that would be more difficult. If I wanted an 11-frame popping bubble, I'd either have to pop it procedurally (perhaps with a static SWF of a bubble and a static SWF of a "pop" that I grow with code), or I'd make the bubble as I described using a Flash-like tool. And neither solution sets me on fire.

Of course, this is how traditional programming tools like Java have been showing their animations in Web-games since the dawn of time. Even Director, while it does allow you to author multi-frame animations as art assets, only allows code to be added on the root level of your project and not within the assets themselves. It is just a bit of an advantage for Flash that art assets can have code attached to 'em to help 'em be a little smarter.

Looking at the NeoSwiff samples, it appears that they're concentrating more on GUI form-based applications, so I guess it remains to be seen if the tool will properly tweak game developers.
Next Entry Eh?
0 likes 0 comments

Comments

Nobody has left a comment. You can be the first!
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Advertisement