skip to Main Content

Screen Shot of Problem

Hi can anyone help. I am getting glitching on pygame sprite. The sprites are 50×50 pixels 72 res created in Photoshop. I am using:
tile.image = pygame.image.load(tile.name) to load adding them to a pygroup tileGroup.add(tile) then just doing a regular tileGroup.draw(screen)

I have tried the code on a Windows PC and it works fine. I can only assume it is a MAC thing. Can anyone shed any light?

2

Answers


  1. I had the same problem and I fixed it by downgrading from SDL v1.2.15 to 1.2.10. SDL Library has this nasty bug exclusively on El Capitan and on versions higher than 1.2.10.

    To downgrade via Homebrew, you should:

    1. Go to “/usr/local/Library/Formula”, find “sdl_image.rb” and rename it to something in case to backup it.
    2. In Terminal, use “brew create https://www.libsdl.org/projects/SDL_image/release/SDL_image-1.2.10.tar.gz“. It should create new “sdl_image.rb” in the same location.
    3. Open the new “sdl_image.rb” and the old one; Copy the lines that starts with “depends_on” and whole “install” function from the old image file and then replace “install” function in the new file with these lines.
    4. In Terminal, use “brew install sdl_image”.
    Login or Signup to reply.
  2. This also sometimes happens with the Tkinter module, and mostly on mac (when you draw things on the screen it lgitches a lot.)
    I believe it is a mac problem, so you could try the following:
    You could use a different image,
    you could .convert() the image
    you could .convert_alpha() the image

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search