Animation Question and problem
by John Colgrove · in Torque Game Builder · 11/07/2011 (6:46 pm) · 2 replies
Problem: I'm trying to get my character to walk. He walks, but the image violently moves left or right during the animation. I noticed when I create my image map, the images aren't centered. They're off by a half an inch.
Question: Before I create the image map, do all of the sprites have to be the exact same distance apart in order for this problem to not occur?
Question: Before I create the image map, do all of the sprites have to be the exact same distance apart in order for this problem to not occur?
#2
11/08/2011 (5:44 pm)
I made the mistake of moving some of the sprites. I replaced all of my sprite sheets with the originals and so far so good. I haven't had much time today to do anything though.
Associate William Lee Sims
Machine Code Games
The first (and I think most common) is to make cells. These are images that are the same size (say, 100x100 pixels) with the character animated over the same spot. After loading the image, you select CELL for the "Image Mode". If you look in your TGB installations, you'll see a tgb/resources/fishArt/fish directory. In there, look at "seahorse1sheet.png". You'll see an animated sea horse in cells of the same size.
The second is to make key cells. These images can be different sizes, but if they are animated, the center of each image should be the same. They require a single horizontal line of any color (typically purple) at the top of the file. Subsequent images must be split with purple. New "lines" of images are separated with another single horizontal line of the same color. Look at "fishimages.png" and you'll see a different sized images in the same file.