Game Development Community

How are you supposed to work with animations?

by Andreas Ehnbom · in Torque Game Builder · 05/23/2009 (6:54 am) · 6 replies

TGB seems to use a single bitmap for each animation that is tiled and contains several, smaller bitmaps. Is this the only way to do it? Because my source are seperate images for each frame. How are you supposed to get them into one? Is there a workflow for this? How are you making your animated sprites?

#1
05/23/2009 (11:20 am)
That the normal way of working you get an image with a matrix of images (same size) and the builds will load then.
#2
05/23/2009 (11:25 am)
So how exactly would I go from having several seperate images to having an animated sprite in TGB?

Edit:
I made a python script that reads image-files and concatenates them into a single one. Still curious how you're "supposed to" do it though...
#3
05/23/2009 (2:37 pm)
There are spritesheet editors around. On Mac you could use Pixen. Might be a plugin or something for Photoshop, too.

Writing a tool to merge images isn't too hard, either. Gimme some free time, and I could come up with a graphical Win+Mac program.

Edit: Yep, that's one way to do it, with a Python script :)
There is no 'right' way. Whatever works, works!
#4
05/23/2009 (5:37 pm)
Ronny,
I'm just suprised there doesnt seem to be a common workflow (like a program that everyones using) for this, considering that everyone whos using animated sprites must make them somehow.

Anyways. I encountered a weird problem.

I'd like to save my images to png, since they provide somekind of compression, but are still lossless and can handle alpha. The weird thing is that if my script produces a png-file from non-png-files, TGB will crash when it tries to read it (division by zero). Any other application can read the image just fine. Other fileformats work. Try it yourself:

http://boomie.se/upload/result.png
http://boomie.se/upload/result.jpg

The PNG image will make TGB crash if you try to create a new imagemap. The JPG one wont.

The py script:

http://boomie.se/upload/concatenate-images.py

Note: These are just test images.
#5
05/23/2009 (5:55 pm)
3120 x 1760 pixels? Might be a problem with the size/it not being powers of two.
#6
05/24/2009 (3:40 am)
Hehe yeah, I'm kinda testing its limits. Weird though that the JPG (which has the same dimensions) works.