Sign in to follow this  
genyagilin

Help using Sprite Sheet

Recommended Posts

genyagilin    100
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
cyberspahn    100
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
imi    154
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
Captain P    1092
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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this