1

I've been working on a Python3/Pygame game. A lot of the images are loaded from a very basic spritesheet setup. All images are PNG format. The spritesheet code is simple. The spritesheet image object is created, and then my program picks out smaller images from the spritesheet image based on Rect coordinates that I supply. It works great. I have compiled the code (PyInstaller) and tested the code (and game) on multiple windows computers (Windows 7 and 10), linux, and on four different mac setups. On all except one, it works perfectly.

The computer that it doesn't work on is an old MacBook Air running ‎OS X El Capitan. The game runs perfectly, but there is an error picking the image files from the spritesheet PNG file, where everything is shifted one pixel too far down. So, instead of accurately selecting the sprite I want, I will get most of the sprite, but the top row of pixels will be missing and the bottom row of pixels will be from 'below the sprite' on the sprite sheet. Everything is shifted down by one row. I can fix this on that specific computer by editing the code so the y-coordinates sent through the spritsheet function are one row lower.

But why? Why is it only on this mac? Another MacBook Air (newer) does not have this problem. An old iMac running an older version of Os X (lion) does not have this problem. Is it a problem with the pygame install on this particular computer? And if so, why would this affect the compiled PyInstaller version of the game I tried running? I thought PyInstaller sent along everything it needed to work properly.

How do I solve this problem?

Emma
  • 27,428
  • 11
  • 44
  • 69
Ancalabro
  • 61
  • 1
  • 3

0 Answers0