I am making a platformer in pygame and I have a wall texture I like, but when i use it on differently sized walls it just stretches the image (the image is 4 rows of bricks). I want it to show the same image on the same scale as the original image, but that it “loops” the image as to have it multiple times. Sry for bad english
I tried the simple transform.scale function, and i hoped it would do what I said before, but it stretched out the same image
it’s in a for loop because i have a list of wall coordinates, lengths, and heights
the basketball is the player for now
code:
wall_img = []
for i in range(len(wall_x)):
wall_img.append(pygame.Surface((1080, 1080)))
wall_img[i].blit(spritesheet_wall, (0, 0))
wall_img[i] = pygame.transform.scale(wall_img[i], (WALL_WIDTH[i], WALL_HEIGHT[i]))
Jasper Woertman is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.