I have several different classes that extend the Sprite pygame class, and initially I just created a Surge object for pygame using an external image and painted this image on my screen. I have large groups of these sprites, so I include them in the RenderClear group, and then just clear and draw the group for simplicity. This worked until I decided to draw my own graphics with pygame.
Instead of an external image, I create a Surface image and draw a circle on it:
pygame.draw.circle(self.image, self.color, (int(self.x), int(self.y)), self.radius, 0)
However, the circle does not appear when I draw it on the screen. Nothing is visible, it's just a transparent surface.
I also tested drawing a circle right on the screen with the same parameters, and it works, but if I draw a sprite image, nothing. Any ideas?
source share