Game Development Community

sprite animations are jittering

by SlowDaddie · in Torque Game Builder · 11/03/2009 (6:51 am) · 5 replies

I have a character that is just standing still and breathing. It looks fine when I play the images in Flash. However, when I import them into Torque to make a sprite animation from it, the character slowly slides to the right after each frame. The animation jitters back-and-forth, even though the character should just be standing still.

There is something clearly incorrect with the way the cells divide up the sheet. I can see the offset in the cells boundries. I get no such issue when I preview the rendered images in Flash.

Please help!

Thanks

#1
11/03/2009 (7:18 am)
Its not so clear that there is an issue with the way TGB handles celled images. What you are describing is an issue with the export from Flash to a sprite sheet. Sure TGB could be more flexible in what and how it imports images, but it works under normal circumstances.
#2
11/03/2009 (7:25 am)
I'm exporting the sheet from photoshop.

My process is:
1. Render the animation as an image sequence from 3D in a PNG format.
2. Import the PNGs to Flash (to preview).
3. Add the PNGs to GlueIt and save out the PNG.
4. Open the PNGs (exported out from GlueIt) in Photoshop (so I can resize the image size. I notice that TGB will crash if I try to add an image larger than 300KB).
5. While in Photoshop, viewing the GlueIt cell sheet, everything looks aligned. I can tell because of the checker board "blank" BG where the toes are perfectly aligned.
6. Import the image into TGB. Set up the cell sheet and fit the cells to the sprites.
7. When I save it out as an animation, it slides/jitters really bad.

Other animations I've done have worked fine so far. It's just this partiuclar one that's behaving bizzarly.

Also, if anyone can orient me to a more streamline and convient way of taking my 3D animations into sprite animations into Torque, please let me know. I feel that the way I'm doing it right now (descibed above) is a bit hacky and contributing to this weird problems.

Thanks!

David
#3
11/04/2009 (2:39 am)
I've been working on this for a while and can't seem to fix the problem. I've tried several different methods of creating the cell sheet, but the problem persists. I have no idea what the problem could be, but it consistently begins to be an issue once I divide the cell sheet into seperate frames (in torque). Otherwise, the animation appears just fine when I preview all the PNGs in Flash (import as image sequence).

Please PM me if you're willing to help and don't mind spending a few minutes to diagnose the problem. I'll e-mail you the cell sheet, as well as all the original PNGs.

Thanks
#4
11/06/2009 (6:03 am)
The best you could do is:

1.) make them semi-big

2.) Toy around with the sizes in the cell editor or whatever its called.

3.) I use powerpoint for all my sprites :P I do a square then if I have a row 5 ppl on each side I would do 5x5 and them slightly change the sizes through the editor.

srry if this didn't help :(
#5
11/20/2009 (5:47 pm)
thanks for the advice everyone. It was a simple matter of reducing the amount of frames per sprite. I had some sprites that were 60 frames long. Keeping each sprite around the max of 20 frames fixed the problem.