Adding an Animation from a Spritesheet
by MrSpaceGame · in Torque Game Builder · 04/03/2012 (8:42 am) · 2 replies
Hi Folks.
I am still evaluating the Torque2D Engine and I have a problem with adding Animations. I have an explosion animation which consist of 90 frames (png's). I have also the same animation as .swf and .gif.
All PNG Frames are named with a number and UnChaos sorts the images well on the texture.
But, when I import that Texture into Torque2D, I have to tell Torque to use 12*8 Cells to get them correctly displayed, instead of 25*4 which is used on the sheet/atlas. That mixes all frames up and sorting them into an animation is not easy, esp. not since the Animation Window is so freaking small. It is a real pita.
Now, is there any way to get the animation correctly into Torque2D by some Tool or did I just oversee something?
Here is what I mean:
http://imgur.com/m3mdR
I am still evaluating the Torque2D Engine and I have a problem with adding Animations. I have an explosion animation which consist of 90 frames (png's). I have also the same animation as .swf and .gif.
All PNG Frames are named with a number and UnChaos sorts the images well on the texture.
But, when I import that Texture into Torque2D, I have to tell Torque to use 12*8 Cells to get them correctly displayed, instead of 25*4 which is used on the sheet/atlas. That mixes all frames up and sorting them into an animation is not easy, esp. not since the Animation Window is so freaking small. It is a real pita.
Now, is there any way to get the animation correctly into Torque2D by some Tool or did I just oversee something?
Here is what I mean:
http://imgur.com/m3mdR
About the author
#2
I thought about using particles, but I am not yet savy enough with it :D.
For now I have reduced the animation to 6 Images and it works fine so far.
04/06/2012 (4:57 am)
If I set the image size manually, it does the same. Makes no difference. I thought about using particles, but I am not yet savy enough with it :D.
For now I have reduced the animation to 6 Images and it works fine so far.
Conor O'Kane
cokane.com
However, using an animation for an explosion is very inefficient. Torque's particle system can create great explosions with only 2 or 3 small images. I make all my explosions with particle effects. Lots of examples in this game: www.youtube.com/watch?v=92PoS1NBwHE