Jump to content
Sign in to follow this  
  • entries
    41
  • comments
    119
  • views
    22596

Animation Storage Technique Discovered!!!

Sign in to follow this  
The Forgotten Mindset

238 views

Nothing new to report today except that I have decided on an animation storing techique. I will use a snappydoo little text file that will have C/C++-like syntax:

// Guy.txt

//##############################
//# Perpendicular Walks
//##############################

WalkNorth {
dx = 0;
dy = -15;
r = {0,0,0,0,0,0};
c = {0,1,2,3,4,5};
t = {36,36,36,36,36,36};
}

WalkSouth {
dx = 0;
dy = 15;
r = {0,0,0,0,0,0};
c = {0,1,2,3,4,5};
t = {36,36,36,36,36,36};
}

WalkEast {
dx = 0;
dy = 15;
r = {0,0,0,0,0,0};
c = {0,1,2,3,4,5};
t = {36,36,36,36,36,36};
}


Sign in to follow this  


5 Comments


Recommended Comments

That will work just fine, but I'd recommend instead that you do it in a standard format. I've been using XML for everything, and it works really well. (I use TinyXML to take care of all the parsing for me.)

The ability to utilize existing tools and knowledge is just too big to pass up, in my opinion.

Share this comment


Link to comment
Hey thanks!

You know I started learning XML a long time ago, but quit because I had no use for it at the time.

How long do you think it will take for me to learn XML for use in this project?

Share this comment


Link to comment
No time at all. It's very easy. Check out TinyXML. http://www.grinninglizard.com/tinyxml/

I don't know what your identifiers stand for so I'll just make something up, but here's a (very) quick idea of how you could lay it out. (I hope the code tag works. I haven't used it much.)


<dude>
<animation name="WalkNorth">
<dx>0</dx>
<dy>-15</dy>
<frame number="0">
<offset>0</offset>
<image>0</image>
<time>36</time>
</frame>
<frame number="1">
<offset>0</offset>
<image>1</image>
<time>36</time>
</frame>

... more frames ...
</animation>

... more animations ...

... whatever else you want ...
</dude>

Share this comment


Link to comment
JUST SAY NO TO XML.

I hate reading XML it has way to much text for simple things... reminds me too much of HTML.... stick with what I told you!

Share this comment


Link to comment

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!