AS3 External XML Animation Scripting with TweenMax

Continuing my foray into preparing for collaborative Flash Game Developement, I’ve been thinking a lot about tools, how to set the project up to allow for a maximum variety of skill levels and skill sets to collaborate on the project while trying to keep Flash and Actionscript as much removed as possible.

In a recent post, I mentioned 3 things I had learned so far about collaborative game dev.  During one of my first “test runs” of the engine ( aka.. one of the ‘more successful failures’ ) I had realized that with a number of people working on the project, most of which have no idea what the inside of Flash looks like.  Which is great!  We all have our strengths, and because they dont know Flash, it just leaves more room for things that *I* dont know.

The Challenge:

As the only coder in the little group, my goal is to remove Flash, AS3 and any other technical programs or bottlenecks from as much of the process as I can.  I want to try to remove dependency upon me in the situation, the need for people to come looking for me when they want something changed.

So I had mentioned earlier that I wanted to externally load (at least now for development ) all assets… Music, Images, xml files containing map and level tile values, etc.  So once you have all of those assets loading in dynamically,

Thats great, but step ahead to thinking about the intro of your game?  Or the title screen?  what happens to these buttons and sprites and images you’ve posted up when they’re clicked on?  Do they move?  Fade out?  How does your game “feel”?  If this responsibility falls to the designer with no flash experience…?

XML provides the perfect way for them to be able to enter values and control animations by simply editing the text/xml file.  You, as the developer, can easily get XML data and parse through it.  It’s the perfect middle ground.  Now, how do you implement this ‘perfect middle ground?’

Sample XML File:

<animation>
<info>
<id>tower</id>
</info>
<move>
<x>100</x>
<y>100</y>
<time>2</time>
<alpha>1</alpha>
<rotation>0</rotation>
</move>
</animation>

This is the xml file in the sourcecode.  Ideally, if I keep playing with this idea, this will obviously become a bit more filled out and structured. But for the test here, this xml data is loaded in. You may need to refresh the page if you didn’t see the little image move.

So this is essentially where this test came from… a way to put all of the animation code into an XML file so artists and designers can change values easier.

– Demo

– Source .Zip

FacebookTwitterGoogle+Share

3 Comments

 Add your comment
  1. Dear Haelix

    Below is a question I posted at the Adobe/Flash Forum, and I recieved a response that sent me to your interesting posting here. I’d be highly appriciative if you could add any comments or thoughts or further direction to my question below, as you appear to be thinking along very similar lines. Indeed, given my lack of success everywhere else in solving my problem, here’s my email in case we should perhaps communicate on a more business-like level (kim.r.reynolds@gmail.com). Thanks so much for your consideration, Haelix.

    Here was my posting:

    Please excuse my total lack of knowledge, but is flash capable of animating objects (visual elements) such that the objects’ motions (translation, rotation, etc) is completely defined by an external data set? For instance, I want to show a car doing various maneuvers based on x and y position data (plus rotation data) sourced from an external datafile (at present, excel, but obviously it can be converted into whatever format works). My goal is to produce a series of animation videos, with each one being unique by iteratively changing the external data during the production process. Again, please excuse my lack of knowledge but I hate to spend a lot of money without first knowing if this is even possible. Thanks everybody.

    – Kim Reynolds

  2. Great post with lots of imartopnt stuff.

  3. Very soon this web page will be famous among all blog people,
    due to it’s fastidious articles

Leave a Comment

Your email address will not be published.