Sprites, Animations and Gifs

Hello,

First of all, I’d like to introduce myself. This is my first post in this forum, although I have been, for some time now, reading quite a lot of posts in this forum.

Me and my friend are creating a 2D game (in plain old SE Java) which involves sprites and .gif files. We have already made quite a bit of progress now. We do have some animated gifs we got from the internet and have already implemented it in the game. Now, I see a lot of spritesheets hanging around the internet, but I can’t seem to find any ready-to-use animated gifs out there. The problem is not the spritesheet -> gif procedure per se, but the scarcity of automated tools to make them. So here comes my first question:

Are there any Spritesheet -> Animated gifs tools that can at least ease the process?

It really gets on my nerves when I have to sit down and create a bunch of sprites separately from the spritesheets to then create a gif. This wastes my time considerably and doesn’t let me do what I love most, actual coding.

I have seen some tools that have satisfied me to a certain point. spriteBuddy and darkFunction’s editor came this close to solving my problem, but the issue was: they, instead of outputting an actual gif, just gave me an xml (which is pretty much useless for me). I liked the way these two editors allowed me to get sprites from a sprite sheet and make a simple animation with them with no effort whatsoever. That said, here’s my second question:

Are there any XML -> Animated gifs tools that I can use to parse the xml files to an actual gif?

I’ve been looking for these tools for a long time, and I can’t seem to find ANY of these. I hope you guys can help me.

Thank you in advance,
~MonkeySpotted

With a few lines of code, you can use my code:
http://riven8192.blogspot.com/2010/02/image-java-animated-gifs.html
to create your own animated GIFs from Java.

Beats any editor!

Hello Riven,

Thanks for the help, but I don’t think that’s exactly what I’m looking for right now. For what I understood from your code, you send a series of images and convert them into an animated gif, right? What I really am looking for is a tool to take single sprites from sprite sheets of the same size and then position them correctly (like darkFunction does) and then convert them into animated gifs.

Maybe if I could just find a tool that took individual sprites from a sprite sheet I could even make use of your code… Although I do like the idea of an effortless editor.

I’ll be sure to bookmark your blog for further reference, though, I found it quite interesting and may have some usage for me in the future!

Do you mean something like:
BufferedImage.getSubimage(int x, int y, int w, int h)

I assume you have the coordinates laying around somewhere (although preferably they are simply calculated) so why not pull sub-images (sprites) from an image (spritesheet) and feed them into the GIF generator?

The problem is: many of the sprite sheets I have found in the internet don’t have a proportional individual sprite location. That means I would have to either way manually cut them up. Maybe with a visual editor it would make things easier…

Then you have 2 options here:

  • Use an image editor and make them all the same size
  • Write to a file the coordinates for each image

Any time sprite comes up the first thing I think of using is GameMaker’s Spite Editor.

It does not save to .gif but will let you add images from sprites sheets that can be any size and adjust them accordingly.

It will also let you do other useful things like colorize, set opacity, sharpen, glow and some basic animation.

It will save a sprite sheet as a .png which you should be able to convert into a .gif

Hope this helps. :smiley:

Hey StumpyStrust,

Thanks for the tip. I’ll check it out once I get some free time. I have seen some posts about that Game Maker sprite editor, but many were complaints of how badly done it was. Nonetheless, I’ll be sure to try it out. After all, I’m getting on a pretty tight spot here. :-\

hey

I wrote a GIF exporter into darkFunction Editor.

I’ll upload it when I get time this week, if you’re still interested.

Not sure if this is what you’re looking for, but once I was spriting and thought, “Hey, I wish I could see these animated!” But I didn’t have internet at the time so I wrote a tool myself. It’s mostly for checking the animation, but it also can save as an animated .gif. The images have to be evenly spaced, however (you can specify sprite height and width).

http://thisissilly.x10.mx/spriteviewer.php

EDIT: It seems you don’t have them aligned, so this wouldn’t really work. Shame.

I know that you can make gifs in photoshop. Just look up on YouTube how to do it. All you really have to do is cut up the sprite sheet into layers for each frame and put it into a movie format, and then export as a gif. YouTube will also give you a better description on making gifs if you don’t get what I mean.

Hi,
Just wanted to point you to a tool I developed that can export gifs from a sprite sheet.
It’s called Sprite Buddy you can find it at www.spritebuddy.com.
Cheers,
Pat