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
Aug 26, 2015


Aug 25, 2015


Aug 21, 2015

Aug 16, 2015


Jul 30, 2015

Jun 24, 2015

Jun 17, 2015

Jun 14, 2015

Jun 8, 2015

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