I am new to pygame and trying to learn the ropes, so forgive me if this is a noob question. I have a set of sprites I downloaded off the Internet to practice and I am using a basic walk code to animate the character walking left and right. The images I am using are all facing right, so I am using the pygame.transform.flip function to rotate the image when the character is moving left. Here is a sample of the code:
if self.left and not self.isJump:
win.blit(pygame.transform.flip(self.walk[self.walkCount],True,False), (self.x,self.y))
self.walkCount += 1
elif self.right and not self.isJump:
win.blit(self.walk[self.walkCount], (self.x,self.y))
self.walkCount += 1
The problem is, the image has a bunch of blank space around it. The image below is an example (I drew the border just so you can see, the real ones are transparent png files). When the image flips, it flips along the right edge, so the character flips to the other side of the image. So instead of turning in place, the character jumps back and forth on the screen. Is there a way to handle this besides going through and cropping all the blank space in all my images?
