[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[pygame] Animation (Image Strips)



Hey, I'm a new programmer and I have a question about storing images.
 
Since I've started using pygame, I've saved each image as its own file (ex. player_left_1.bmp)
But recently I subscribed to pygame mailing list and came across some emails discussing animation. Someone suggested using one image file with all of a character's sprites and changing the source rect. I deleted the emails before I realized their significance.
 
Could anyone give me an example of how this could be done? I think they used a dictionary to define animations, but I'm not sure. Any help would be very appreciated.