I'm making code for a Python game and I have the following
WIDTH = 600
HEIGHT = 800
player_x = 600
player_y = 350
def draw():
screen.blit(images.backdrop, (0, 0))
screen.blit(images.mars, (50, 50))
screen.blit(images.astronaut, (player_x, player_y))
screen.blit(images.ship, (550, 300))
def game_loop():
global player_x, player_y
if keyboard.right:
player_x += 5
elif keyboard.left:
player_x -= 5
elif keyboard.up:
player_y -= 5
elif keyboard.down:
player_y += 5
clock.schedule_interval(game_loop, 0.03)
However, when I run it, it won't show the astronaut. I have the astronaut image for it but whatever I try doing, it will not work. Can someone please tell me where the problem is?