   How to load one sprite from sprite-sheet? (Python)
  Greets.Trying to find a good, novice-friendly way to load sprites with Python, when source bitmap file is a sprite-sheet, full of several sprites, arranged in rows and coloumns. How could I load just a selected sprite from the many?(pygame.image.load() loads the whole file, containing all the sprites not one.)*having searched forums*  maybe this could do it?:def loadPics(self):imgMaster = pygame.image.load("SSF_Feilong.gif")imgMaster = imgMaster.convert()self.imgList = []self.size = ((46,92))self.offset = ((585,14), (630,14), (675,14), (720,14), (765,14))for i in range(5):tmpImg = pygame.Surface(self.size)tmpImg.blit(imgMaster, (0,0), (self.offset, self.size))trans = tmpImg.get_at((1,1))tmpImg.set_colorkey(trans)self.imgList.append(tmpImg)Thanx.[Edited by - ldmn on May 25, 2010 12:31:35 AM]
  You could, indeed, load the spritesheet, then copy each individual sprite into it's own buffer, and unload the spritesheet, although it's not the most efficient approach.Personally, I'd just load the spritesheet and I'd store the coordinates and dimensions of each sprite - then, when drawing them, I'd draw only that specific part of the spritesheet. If you really only want to load a single part of that spritesheet, you probably shouldn't be using spritesheets in the first place - just cut them up into individual images beforehand and load only the ones you want.   ;  Thanx much, at last I could experiment with sprite(sheet) loading / displaying, now its method is clear. Thats very very easy & convenient. hats off.It was a gr8 help:http://www.scriptedfun.com/category/pygame/   