Game Development Community

Animation Management

by USC - IMD student 2 · in Torque X 2D · 11/16/2007 (6:01 pm) · 1 replies

I'm running through the new TXB tutorials that just got posted and have a question related to "how the hell do I do THIS instead of THAT"

- In both tutorials that use animated sprite they're using one sprite sheet and advancing frames based on input or variable change, both simple stuff like changing pitch and roll or death/growth. I see how that works and it makes sense to just advance frames.

BUT

What if I have a character with a lot of different animations I want tied to it? If I move the stick left I want to call the "turn left" animation. If I turn right, the right turn animation, etc. Die? Separate animation I set up in the TXB interface.

It's kind of necessary because I want the project to look good on HDTV and as a result can't have an enormous single sprite sheet due to size limitations with TXB.

I don't want it to advance frames, just call new animations. I suspect it would double good useful to set this up as an animation management component so it could be used for all the game sprites that have animations but I have no clue how to set that up.

Help?

#1
11/19/2007 (4:13 pm)
The hello world tutorial pretty much does what you are talking about. It just uses one sprite sheet to define all the animations. I think that could easily be separate sprite sheets for each animation. See section 8 of that tutorial.