Ask coding questions

← Back to all posts
poblem while running the game
ritikghimire

Hi guys, I am new to programming, I just started a couple of weeks ago and I made a game here watching pygame tutorials and youtube videos. It was working perfectly fine in the beginning and it was displaying the game on the console but as I finished the code it started lagging and now the display does not show any output. though I feel the code is working in the background I couldn't see any display in the workspace except for the black screen that pops up every time I run the code.
it would be great if anyone could help and let me know if there is anything wrong with the code or the display.

Thank you so much

Comments
hotnewtop
QuantumCodes

Umm.. i dont know pygame but i guess you need to update the screen every frame.

This might be wrong

ritikghimire

@QuantumCodes Thank you so much for getting back to me. I tried to do it as well but I don't know why it just shows an error message, could you help me with which line should I add the code, please. Thank you !!