0

Having an issue with blitting order (I think) and transparent bounding boxes showing up during collisions.

Link to the code and the issue is here: https://github.com/CastleSeven/flappy-balloon/issues/1

Basically, whenever a collision is about to occur, the player model is occluded by a transparent bounding box around the obstacle. I'm not sure what I need to change so that JUST the non-transparent pixels are reblitted for the background on every loop.

If I change the code so that the balloon blit comes AFTER the obstacle blit, I get the inverse effect, the balloon's bounding box occludes the obstacle.

  • Have you tried http://www.pygame.org/docs/ref/surface.html#pygame.Surface.convert_alpha – cmd Oct 06 '15 at 16:35

1 Answers1

0

Try using a colorkey, make the background of the textures something ugly like (255, 0, 255) and set the colorkey of the textures the same color. https://www.pygame.org/docs/ref/surface.html#pygame.Surface.set_colorkey