Pygame Zero only showing some of the background

194 Views Asked by At

I haven't found a question anywhere else which matches mine, but sorry in advance if I'm duplicating. I am doing a python course and I am making a game with pgzero. I have not completed it, but I have this issue, where it doesn't display the full background. I have tried uninstalling modules, reinstalling them, checking my code, checking the internet, but I haven't found anything that helps. Here is the code I have done so far:

from random import randint

WIDTH = 800
HEIGHT = 600
CENTER_X = WIDTH / 2
CENTER_Y = HEIGHT / 2

move_list = []
display_list = []

score = 0
current_move = 0
count = 4
dance_length = 4

say_dance = False
show_countdown = True
moves_complete = False
game_over = False

dancer = Actor("dancer-start")
dancer.pos = CENTER_X + 5, CENTER_Y - 40

up = Actor("up")
up.pos = CENTER_X, CENTER_Y + 110
right = Actor("right")
right.pos = CENTER_X + 60, CENTER_Y + 170
down = Actor("down")
down.pos = CENTER_X, CENTER_Y + 230
left = Actor("left")
left.pos = CENTER_X - 60, CENTER_Y + 170

def draw():
     global game_over, score, say_dance
     global count, show_countdown
     if not game_over:
         screen.clear()
         screen.blit("stage", (0, 0))
         dancer.draw()
         up.draw()
         down.draw()
         right.draw()
         left.draw()
         screen.draw.text("Score: " +
                          str(score), color="black",
                          topleft=(10, 10))
     return

I also have an image of the pgzero window I get shown:

And this is the picture of how the background should look like:

Any support would be greatly appreciated, thanks in advance.

0

There are 0 best solutions below