I am using this sprite for some experiments. I cropped a section of the sheet with GIMP and made the blue background transparent, the result being this. However, when I run the codes using this sprite, I still end up with a sprite with a blue background. Same thing happens with other sprites (different sprite sheet, same source, same editing process).
Now, I know that I can set transparent colors using PyGame itself but I’m wondering if that’s the only way I can do it? Can’t I do it through the image itself? How come PyGame still reads a blue backgorund even after I have cleared it with GIMP?
P.S. SSCE would be pvz_shooter_test.py and/or image_test.py of the GitHub repo linked.
Try mySurface.convert_alpha() (check the pygame documentation about it).