so I am trying to make my fish grow little by little and grow like its original image but when ever it eats a small fish it grows way to fast even though I set the grow rate to 1 for the small fishes and also the WIDTH of my fish always seems bigger then my height of my fish is there a way I can fish this problem VIDEO as you can see in the video the fish is growing like its height bigger but its width smaller and it ends up looking like that and it also grows like super fast each time I eat the small fish even though I set the grow rate to 1
class player:
def __init__(self,x,y,height,width,color):
#[.....]
def get_rect(self):
self.rect.topleft = (self.x,self.y)
return self.rect
pygame.draw.rect(self.color,self.rect)
def draw(self):
#[............]
def collide(self, other_rect):
return self.rect.colliderect(other_rect)
def grow(self, dx, dy):
self.width += 1
self.height += 1
self.right = [pygame.transform.scale(image, (self.width,self.height)) for image in self.right_original]
self.left = [pygame.transform.scale(image, (self.width,self.height)) for image in self.left_original]
playerman.rect = pygame.Rect(self.x, self.y, self.width, self.height)
then in my main loop when ever I collide with the fish I add it by 1 but its adding to much for my width and a little for my height and the fish ends up looking weird and also the fish when ever it eats it grows way to fast.
for blac in blacs:
if playerman.collide(blac):
blac.x = 880
playerman.grow(1, 1)
blac.y = random.randint(0,800)
print("collid")
my full code script