I spent this development session researching sprite sheets and learning how animations are typically handled in platformer games. I downloaded the character assets and experimented with loading images into Pygame.
To avoid repeating code for every animation, I created a function that loads images from a folder and stores them in a dictionary. This will eventually become the foundation of the final load_sprite_sheets() function used throughout the project.
I also replaced the rectangle with a single idle sprite. At this stage there are no animations yet—the player simply displays one image.
Problems Encountered
Problem 1: Images not loading
When first attempting to load the sprite, Pygame returned a file path error.
Cause
The image folder was not in the same location as the Python file.
Fix
Used the os.path.join() function to create file paths more reliably.
Comments 0
No comments yet. Be the first!
Sign in to join the conversation.