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

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.

3 thoughts on “Pyganim - A Pygame module to make sprite animation dead simple.

  1. Nicely done!
    I tested your example programs and needed to make a slight change for it to run on my machine.
    Here's what I added:
    import os
    os.system("Learning Pyganim")
    MYPATH = os.path.expanduser("~")
    #This is the folder where I installed PygAnim files
    Then I needed to change all the forward slashes (/) to the double back slash (\\) as in

    'testimages/bolt_strike_0001.png' to

    Everything ran great from there. Thanks for all you hard work!!

  2. Where's the setFrameNum method? It appears to not exist, yet it is in the documentation, but not in any of the examples.

Leave a Reply

Your email address will not be published. Required fields are marked *