How are you searching?
Write "pygbag" in google. The first link is the official page:
https://pypi.org/project/pygbag/
The second link, the wiki:
https://pygame-web.github.io/wiki/pygbag/
In both you have minimal example:
import asyncio
import pygame
pygame.init()
pygame.display.set_mode((320, 240))
clock = pygame.time.Clock()
async def main():
count = 60
while True:
print(f"{count}: Hello from Pygame")
pygame.display.update()
await asyncio.sleep(0) # You must include this statement in your main loop. Keep the argument at 0.
if not count:
pygame.quit()
return
count -= 1
clock.tick(60)
asyncio.run(main())
You don't need to know anything else about async, this example already gives you all the use you need to make of async, which is only 3 lines.
Define the main function with
async def main():
call the main function with:
asyncio.run(main())
After updating the pygame canvas, you put:
await asyncio.sleep(0)
Stop, you don't need to know anything else about async for your game.