pygame is
Python
Simple DirectMedia Layer
 
 
pygame.org is
Site Swing
SpritePacker.py

SpritePacker.py - 1.0

Beerman (beerman)

Tags:

Description

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
Source: http://www.beercave.co.uk/content/spritepackerpy

Screenshot


click to view original size

Releases

SpritePacker.py - 1.0 - Jun 5, 2011

Pygame.org account Comments

If you wish to leave a comment with your pygame.org account, please sign in first.

No user comments have been submitted.
spotlight

 
our projects
pygame.org welcomes all python game, art, music, sound, video and multimedia projects. If they use pygame or not.
 
recent releases
Apr 16, 2014

Apr 13, 2014

Apr 9, 2014

Mar 21, 2014

Mar 18, 2014


Mar 15, 2014


Mar 14, 2014

Mar 13, 2014

Mar 11, 2014

Mar 9, 2014

... more!
 
for pygame related questions, comments, and suggestions, please see help (lists, irc)