Users browsing this thread:
Question: How to Use Basic Spritesheet Layouts
#1
Hey guys,

I'm a games developer, experienced with code but not so much with sprite sheets! I have a few basic questions that I would be really grateful if you could help me with:

How are you meant to know how wide and tall each frame of the animation is meant to be in a spritesheet? This info is never contained on the sheet. (There are no boxes round the frames, etc.)

How does one find out the offset of the first frame from the edge of the sheet.

I'm just trying to stick this snake animation (this walking one) in my framework (http://www.spriters-resource.com/custom_...heet/16615) but I have no idea how to work these things out save writing up a big program to display the frames!

Thanks guys
Thanked by:
#2
This seems like it's better suited for the Question forum. I'll go ahead and move it there.
Thanked by: bitShifter_
#3
You're going to have to do it yourself most of the time I'm afraid.

Open them up in paint and center them in individual boxes.
THIS IS MY DESTINY.
Thanked by: bitShifter_
#4
(10-20-2012, 12:05 AM)bitShifter_ Wrote: How are you meant to know how wide and tall each frame of the animation is meant to be in a spritesheet? This info is never contained on the sheet. (There are no boxes round the frames, etc.)

"Never" isn't quite true here! Some do.
I usually keep everything aligned to an 8x8 grid so frame sizes and positions are always a multiple of 8, the actual sizes can be determined quite easily then.

Other than that, you'll usually have to cut and sort the frames manually (or use tools designed for the task).
When adding them to a game, you'd better make your own sheets out of the frames anyways, suited to your needs and without any overhead (text descriptions, spacing etc) and at best optimised for graphics cards (power of two dimensions).
#5
Thanks guys,

So I'm gonna have to work out the sizes myself most of the time. Could you maybe recommend a good program for this task? Thumbtacks you seem as if you know of one?

My other question is about animation. Running each frame of an animation from a sprite sheet one at a time and looping (frame 1, 2, 3, 4, 1, 2, 3, 4,), doesn't seem to produce the intended animation a lot of the time. For instance this top right running animation http://spriters-resource.com/ds/jus/sheet/20848.

Are there any common sequences that have to be followed to animate from sprite sheets?

Really appreciate it Big Grin
Thanked by:
#6
That running animation has eight frames - six at the top right, two at the beginning of the second line.

I'm afraid there are no common sequences, we have no set rules or standards for that. Rippers do as they prefer it, some put in duplicate frames, others don't, so you may end up with weird sequences in some cases. Especially since some games already work with weird ones!
Thanked by:
#7
Jesus, how did I not realize those extra frames? Tongue It looks really good now!

OK, I see. I'm getting the sense that people just mess around with the frames until they get the right sizes, spacing and ordering. Again do you know of a good program for analyzing sprite spacing and sizes?

I'm considering just whipping one up in C# but if there already is one it would save some coding.

Thanks a bunch
Thanked by:
#8
This auto-cutting tool by Chase may help. It detects frames and saves them in individual files. Since many sheets don't use equal frame boxes and spacings anyways, this may be one of the best options you have.
Thanked by: bitShifter_, Phaze
#9
That's a great start. Thanks bro. Happy programming.
Thanked by:


Forum Jump: