Jump to content
  • entries
    1212
  • comments
    1738
  • views
    1144958

long winded me

Sign in to follow this  
johnhattan

135 views

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.
Sign in to follow this  


0 Comments


Recommended Comments

There are no comments to display.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!