My pygame window is not responding

If I press run to my program it doesn’t shows anything but I have programming it to show me a background. Please help me.

Hi @TasosKhatzes can you share a link to the Repl please?


1 Like

Hi @TasosKhatzes thanks for the link.

I took a look and noticed you had missed the call to update

while playgame:
  #the background
  screen.blit(background, [0, 0])

Please note that the way you’ve written the while loops this is all that will run. It will not display the other items because you never exit the above loop. I would suggest bringing in the other code to this while loop as well.

1 Like

No image displayed, but the background and some other images are in the While loop.

while playgame and level1 is True:
    screen.blit(spaceship, [spaceshipx, spaceshipy])

Hi @TasosKhatzes

Sorry I don’t understand your reply. Do you mean that the suggestion didn’t work for you? Or is there another problem?

My pygame window is nit responding:
Is that happend to you?
Try to run the program and tell me if it works or not.
My repl

Hi @TasosKhatzes I’ve already replied with a solution to your issue. You don’t need to create another topic. I’ve moved your post back into the original topic.

I can see that your code remains unchanged. You need to have the update method to display the images on the screen. See My pygame window is not responding - #4 by IanAtReplit

this is what it look like on my screen

Can you see the code and tell me if you see any mistake.

sure i dont know much about pygame though

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.