Skip to main content

SpritePacker.py

Quick and dirty spritesheet generator.


Beerman
(beerman)

The SpritePacker class takes a folder of sprites and generates the following:

  • texture.png : single texture with all sprites in the folder packed into it
  • texmap.py : python file containing a dictionary which maps the sprite names to texture co-ordinates
  • Example texmap.py file using various Sheep Snaggers sprites:

    texmap = {
    'kisschicklogo' : [0, 0, 500, 300],
    'ming' : [501, 0, 202, 162],
    'ship' : [704, 0, 32, 32],
    'alien' : [737, 0, 32, 32],
    'alien_shadow' : [770, 0, 32, 32],
    'fighter' : [803, 0, 32, 32],
    'sheep' : [836, 0, 32, 32],
    'star' : [869, 0, 20, 20],
    'star2' : [890, 0, 20, 20],
    'bullet' : [911, 0, 4, 4],
    'beerman_logo' : [0, 301, 477, 305],
    }
    

Links

Home Page
http://www.beercave.co.uk/content/spritepackerpy

Releases

SpritePacker.py 1.0 — 5 Jun, 2011

Pygame.org account Comments

  • risboo6909 2011-06-06 12:53:44

    aha, very useful thing! thanks!

  • Guest 2014-08-04 10:32:19

    How can i download this?