From Basic to Advance level gaming tutorial.
In this repository you can find my learning from day 1 to day end by prefix day
.
- Pygame is a cross-platform set of Python modules which is used to create video games.
- It consists of computer graphics 🤖️ and sound libraries designed to be used with the Python programming language.
- Pygame was officially written by Pete Shinners to replace PySDL.
- Pygame is suitable to create client-side applications that can be potentially wrapped in a standalone executable.
Recommended to create a virtual enviorment and install the library.
pip3 install -U pygame --user
To check whether the pygame is properly installed or not, in the IDLE interpreter, type the following command and press Enter:
import pygame
Hello from the pygame community. https://www.pygame.org/contribute.html
screen_disaply.py
- To give an idea about basic syntax.display_image.py
- Adding a image on white blank surface.pygame_rect.py
- Rectrect()
is used to draw a rectangle in PyGame.
keypress_event.py
- Pygame KEYDOWN and KEYUP detect the event if a key is physically pressed and released.draw_using_key_event.py
- We see KEY Press, now let's draw something using keyboard.geometry_shape_draw.py
- Let's draw rectangle, polygon, ellipse, straight line, circle, elliptical arc using pygame.
text_and_font.py
- Let's render the font and text and also size and color the font.sprite_collision_detection.py
- A pygame sprite is a two-dimensional image that is part of the large graphical scene. Usually, a sprite will be some object in the scene.multimedia_library.py
-pyglet()
another game library which is cross-platform for windowing and multi-media. It supports user interface event handling, windowing, OpenGL graphics, loading images and videos, and playing sounds and music.