PyGame Resources
-
Trinket.io makes PyGame available.
-
Replit.com has a PyGame language but their method of running it is blocked on the CPS internet.
The documentation for PyGame is good. The pages I use a lot are:
- event - There is a
table that lists the types of event and the data available for those
types. Important event types:
QUIT,KEYDOWN,MOUSEMOTION,MOUSEBUTTONUP. - mouse - The
posfield contains the coordinates of the event. - key - Contains a massive
table with the names of all the keys. The key
K_BACKSPACEis at the top of the list if you want to search for it. - a list of all named colors
You will also need to know/memorize/copy the boilerplate code.
pygame.init()pygame.display.set_mode((width,height))pygame.display.flip()to show the newly-rendered scene.