Game Development Community

Animated sprites

by Steve Bisson · in Torque Game Builder · 05/07/2006 (3:06 am) · 11 replies

I want to make a video screen in my game so i need to make an animation out of 50 frames or so.

I tried to load the frames one by one in the level editor but it doest seem to work that way... do i really need to stick all the frames in 1 file ?

#1
05/07/2006 (3:26 am)
You can use ImageMaps in LINKED mode. That way you can link imageMaps together. How big are your frames?
#2
05/07/2006 (1:19 pm)
Well because i want to support a small zoom in and zoom out in my game pretty much all the textures are bigger then they really need to be so this image is 384x248 or somthing like that.
#3
05/07/2006 (1:23 pm)
Ack! Powers of 2... powers of TWO! you should seriously reconsider sizing your images to 256x128 or 512x256... The imagery doesn't need to be square, but 384 wide means TGB has no choice but to upsize to the next power of two: 512x256... which means... you are wasting a lot of memory currently.
#4
05/07/2006 (1:26 pm)
Ho i see.. no problem i can resize it... i did not know about the memory usage thingy. How do i use linked imagemap ?
#5
05/07/2006 (1:47 pm)
Re: Linked image maps: easy!

1. Boot the Level Builder
2. Go to the Create tab
3. Click on the Create a New ImageMap button
4. After loading all of them, click the button next to it called Create a New Linked ImageMap
5. Associate all of your frames with the linked imagemap.

You are now able to create and animated sprite using your linked imagemap as the source art.
#6
05/23/2006 (6:13 pm)
Actually, I've got Beta3 and the Linked Imagemap button doesn't do anything at all. I also noticed that, unlike those in the fish demo, mine won't do anything when I click the Animate button either. It also seems impossible to create multiple animations in the IDE, forcing me to edit the datablocks file manually instead. Pretty frustrating, because I've been fighting this engine for over a week and still haven't gotten a single animation to work.
#7
05/24/2006 (1:34 am)
That's odd. I haven't had any problems whatsoever... well... not with this issue :)

You've gone through the docs?

- Matt VG
#8
05/24/2006 (9:23 am)
I placed a bug on it, My linked Images Button does nada also....
#9
05/24/2006 (10:02 am)
You know, if my forum experience over the years has taught me anything, it's that a problem will solve itself, by magic perhaps, if only I open my proverbial mouth and post something that sounds frustrated :/

The not-creating-multiple-animations problem was that it would keep creating the new animation over the old one no matter what I named them, so all I had at the end were SourceImageMap and Animation99. Sometimes the editor seems to get hung up and doesn't show updates (addition or removal) until I restart. That's why I was manually entering the datablocks, but it seems to have, as I said, mysteriously solved itself. The only guess I have is a some obscure reference that mention numbers in the name being a problem.

Same goes for the animations not animating. I'd add the frames and then the Animate button didn't do anything. I shut off the engine for a couple hours and started another project from scratch. The only other thing I did different was get the PNG to export transparency right this time (it wanted me to erase the background, not pick an index color), don't know why that would change anything though.

The Linked Images button still doesn't do anything for some reason. Not too concerned about that now, since I have made some progress without it. Still getting used to the interface but I already feel like I've accomplished something that was still eluding me 2-3 weeks into Allegro!

The current problem I'm having is the actionmap.bind() command not recognizing the Alt/Ctrl keys. I've seen a couple references to those keys plus another (ie "alt f4") but nothing seems to happens when used alone. My game idea's pretty simplistic (SNES era vs PC simulation) so I'm trying to keep it to one button for one action. Hopefully now that I've gone and revealed my confusion, the solution just may hit me :)
#10
05/24/2006 (10:07 am)
I'm fixing the link image map problem right now (part of it had to do with the introduction of resources)... I'll post the fixed script file in a few minutes when I get it working :)
#11
05/24/2006 (10:19 am)
Here you can grab the fixes. Place these in your games/tools/imageEditor/scripts folder and overwrite :) Let me know if this fixes your issues.

note: you need at least two valid image maps loaded to create a link image map.