The Invent with Python Blog

Fri 09 December 2011

Pyganim - A Pygame module to make sprite animation dead simple.

Posted by Al Sweigart in news   

Pyganim logo

Download and example programs. (Works on both Python 2 and 3.)

Details at

Pyganim is a module that you can import into your Pygame games to handle sprite animation. Creating an animation is simply a matter of supplying a list of image filenames (or pygame.Surface objects) for each frame of animation, along with the duration that each frame lasts. Then call the play() method to start the animation and then call blit() each time you draw the window. The blit() function automatically draws the correct frame based on the amount of real time that has passed since the play() method was called. There are many, many other methods to provide finer levels of control as well.

There is more information available on the Tutorial and Reference page.


Learn to program with my books for beginners, free under a Creative Commons license:

Take my Automate the Boring Stuff with Python online Udemy course. Use this link to apply a 60% discount.