Closed brxeee closed 5 months ago
you should not nest update/sleep loops and use game states instead see https://github.com/pmp-p/pygame-breakout-wasm/ for an example
if event.type == pygame.KEYDOWN:
await asyncio.sleep(0)
await main()
is wrong, the await asyncio.sleep(0)
is a critical call that must be made on each frame.
you should not nest update/sleep loops and use game states instead see https://github.com/pmp-p/pygame-breakout-wasm/ for an example
if event.type == pygame.KEYDOWN: await asyncio.sleep(0) await main()
is wrong, the
await asyncio.sleep(0)
is a critical call that must be made on each frame.
How do i fix it? I’m a beginner with everything.
the code runs fine on Pycharm, but i am having problems with trying to figure out why both menus dont appear.
my code: