[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[pygame] Pygame.sprite ignores transparency?



Hello!
This is my first post here, so if I sound like a newbie, it's because I am one:)


I have been trying to learn python for a month or so and having used SDL a bit before I was glad to find Pygame!
For practice I have been working on a small "Worm-eats-apples-and-grows" game. Python and pygame make for a very fast coding, but when I tried out the sprite functions I ran into a problem.


The problem is that Pygame.sprite ignores transparency in my sprite images.
I have a PNG image of a simple red ball with anti-aliased edges, drawn in photoshop. If I render this image with an ordinary surface.blit everything looks fine. The edges are anti-aliased and nice.
However, when I try to use pygame.sprite to draw this same image, it gets drawn without any transparency. I use RenderUpdates.draw for the drawing.
I have looked at the pygame.sprite source, but can't find anything unusual. It seems to be using regular blits. Perhaps it converts the sprite images?


Can I make pygame.sprite use the transparency data in my images? It's not supposed to ignore it is it?

Appreciate any help on this,

thanks
Martin