Skip to content

AJChurchJr/pygame-spritesheets

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pygame Spritesheets

  • A program written by Andrew Church sometime in 2024 (2 years ago as of the time of me posting this to Github.)
  • This is a part of an effort for me to upload all of my programming works to Github.

Update to what I wrote up top

This is a module that would be loaded into my Pygame games that would index every image, put them in a dictionary, and then load "spritesheets" that would use those loaded images in order. Mostly everything would be done through these "spritesheets", even if they were static images, because they then handled the collision Rects and Masks.

Older versions

Originally, this was different. In my older games, and earlier versions of this module, spritesheets were one solid image, which were then broken up when loaded into the game. There was a program that would take the images, compile them into one large sheet, and then output a JSON for you to edit frame speed and order freely. Usually every animation for a given object would be in this spritesheet, meaning that in order to use an animation, you had to load in that full spritesheet and use it as your only spritesheet. This was bad, and essentially closed you into a set of animations when you built the spritesheet, so I did away with it when I streamlined it into this program. (Older versions of the program will be included as files here)

What are we looking at?

  • spritesheets.py is the module that would get loaded in. It acted as a class, and the loaded images were class variables. There was no ability to make instances of Spritesheets.
    • Spritesheets.py held the ability to load images and spritesheet files, and also held the Spritesheet class which would be used on pygame.sprite.Sprite()s
  • editor.py was a tkinter file that was going to let you edit the fps, oritentation, and size of the images as well as the images used.
    • I never finished this, or let alone started this. All I did for it was copy a TKinter tutorial from GeeksForGeeks.
    • I claim no credit or ownership of this as I didn't put any programming work into it.
  • test.py is a file that runs spritesheets.py and runs it in a pygame instance.
    • I don't remember if it works. I think it did?

About

Pygame Spritesheet Handling Module

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages