won't let me post the full code, searched this website and google, but found no answers...
DISPLAYSURF=pygame.display.set_mode((width,height),0,32)
sprite=pygame.image.load('generic_legionnary.png'
def move(direction, sprite, spritex, spritey):
if direction:
if direction == K_UP:
spritey-=5
sprite=pygame.image.load('generic_legionnary.png')
elif direction == K_DOWN:
spritey+=5
sprite=pygame.image.load('generic_legionnary.png')
if direction == K_LEFT:
spritex-=5
sprite=pygame.image.load('generic_legionnary.png')
elif direction == K_RIGHT:
spritex+=5
sprite=pygame.image.load('generic_legionnary.png')
return sprite, spritex, spritey
while True:
DISPLAYSURF.blit(sprite,(spritex,spritey))
I don't know what's wrong, it keeps putting new images when moving, how can I make sure that it's only one drawing that's moving? thanks!
Edit: solved it
screen.fill((255,255,255))
sets the background color and the tracing thing disappears