I'm creating a 2D game where the player shoots cannonballs. To give the impression of movement, I want the cannonball to increase its size until half of the path, and then decrease it until it reaches the target (just like rampart game cannonballs).
Right now, I'm doing this in every draw, but the call doesn't increases:
self.CannonImg = pygame.transform.smoothscale(self.CannonImg, (10 + int(auxDistance / 10), 10 + int(auxDistance / 10)))
This is how the image shows up:
It doesn't scale smoothly, and the image is cut on the edges (over time, it starts to look a little bit transparent).
Is there any easy way to do it?
Also, I'm using images like the following. Though I've been reading, and found some people using sprites. What should I do?
self.CannonImg = pygame.image.load('Imagens/CannonBall.png') self.surface.blit(self.CannonImg, self.Position)