pygame.draw.rect(window, (150, 150, 150), (self.x, self.y, self.width, self.height))
This basically draws a rectangle on the screen. Note - the sprite has not been rendered yet.
The sprite I'm using is from spriters resource - an online archive of a bunch of sprites and maps etc. I didn't want to spend too long choosing one, so I just picked above. To select a sprite from this sheet, the most suitable way is to use the set_clip and get_clip functions of Pygame as well as some simple mathematics.

No comments:
Post a Comment