Quote:Original post by Gerrsun
Ah the sprite 'sheet' does bring up another question. I hear people talk about it like its one big bitmap and all the images are on it. In my program I just have a bunch of gif pics that i load separately.
My question is how do you parse these bitmaps once they are on a sheet. I could see creating a bitmap with all the images on it but how do you break them out?
and yes, I am looking to see if I can figure out how to do it myself, as part of learning to code in Python.
I can already see how this could be expanded so that instad of once sprite being a pond, I coud use multiple sprites which connect up and create larger ponds, or if I wanted to play with 2.5D, sprits which 'look' 3d but sit on a flat surface kinda like Sacred.
Simple, if all your bitmaps are the same size. Just line them all up row by row and save them in one bitmap. Then caculate offsets to access individual images. For instance, say you want the sprite that is two from the left and three from the top. If you have 18x18 sprites you would do x=18 * 2 and y=18 * 3 to get its starting position. Then you have to find a way acess just the part of the sprite sheet between x and x+18, and y and y+18. That part is API specific but it should be simple enough.
as for a good sprite editor I use GIMP. Its the best ive been able to find for free.