• Advertisement
Sign in to follow this  

Help using Sprite Sheet

This topic is 2955 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello, i am kinda new to game programing , i have a couple of sprite sheets and i wanna use a program to split them to even squares or different images so that i can load them easily in my game, i need them to be transperent after i cut them. so i need suggestions twords a program that can cut my sprite sheets (and whould also prefer it to be free). thank you in advance for any help

Share this post


Link to post
Share on other sites
Advertisement
Hi I'm new to programming myself but I have found Gimp 2.6.8(like Photoshop but free) to be a good picture editing program that I have used to manipulate sprite sheets. May not be the best, but gets the job done. And as far as I'm aware, I haven't found software that will automate cutting sprite sheets into perfectly "sprite" centered squares.

Share this post


Link to post
Share on other sites
Gale is a reasonable easy-to-use sprite editor. http://www.humanbalance.net/gale/us/

It can import and export "combined images" which are some kind of sprite sheets, except its only one animation per image.

Ciao, Imi.

Share this post


Link to post
Share on other sites
Instead of splitting up the spritesheets, can't you just display specific parts of images?

Either way, for things like this I usually write a script - with Python and the PIL imaging library it's usually pretty easy. Something like this (untested and bare-bone):
from PIL import Image

spritesheet = Image.open('filename.png')
tilewidth = 32
tileheight = 32

for x in xrange(0, spritesheet.size[0], tilewidth):
for y in xrange(0, spritesheet.size[1], tileheight):
tile = spritesheet.crop(x, y, x + tilewidth, y + tileheight).load()
tile.save('filename_tile_' + str(x) + '_' + str(y) + '.png')

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement