Pygame is a cross-platform set of Python modules designed for writing video games. It includes computer graphics and sound libraries designed to be used with the Python programming language. Now, it’s up to the imagination or necessity of developer, what type of game he/she wants to develop using this toolkit.
Command to install pygame :
pip install pygame
There are four basic steps to displaying images on the
pygame window :
- Create a display surface object using
display.set_mode()method of pygame.
- Completely fill the surface object with white using
fill()method of pygame display surface object.
- Drawing different shapes onto a surface object using
Primitive Drawing Functionsof pygame.
- Show the display surface object on the pygame window using
display.update()method of pygame.
Below is the implementation:
- Python | Display text to PyGame window
- Python | Display images with PyGame
- Introduction to pygame
- Python | Add Label to a kivy window
- Python | Make a simple window using kivy
- Python | Window size Adjustment in Kivy
- Python | Get the smallest window in a string containing all characters of given pattern
- How to access popup login window in selenium using Python
- Draw geometric shapes on images using OpenCV
- Window Sliding Technique
- Reading Python File-Like Objects from C | Python
- Important differences between Python 2.x and Python 3.x with examples
- Python | Sort Python Dictionaries by Key or Value
- Python | Add Logging to Python Libraries
- Python | Add Logging to a Python Script
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.