Welcome! This repository contains the source code for my Pygame for Beginners video series. Whether you are a student from my institute or a fellow coder from YouTube/LinkedIn, feel free to use this code to learn and build your own games.
I have structured these files chapter-wise so you can follow the transition from a blank screen to moving objects.
| File Name | What you will learn |
|---|---|
Chapter1_CreatingScreen.py |
Setting up the display window and game loop. |
Chapter2_CreatingObject.py |
Drawing basic shapes (Rectangles/Circles) on the screen. |
Chapter3_ChangingColor.py |
Handling RGB values and background updates. |
Chapter4_BouncingBall.py |
Basic physics: Making an object move and bounce off edges. |
Chapter5_FallingObjects.py |
Implementing gravity and reset logic for objects. |
- Clone or Download: Click the green Code button and select Download ZIP. Extract it on your PC.
- Open in VS Code: Open the folder in VS Code.
- Install Pygame: You don't need my
venvfolder. Just open your terminal and type:pip install pygame
- Run: Open any chapter and press F5 to see the magic!
If you want to understand the logic behind every line of code, watch the step-by-step tutorials here:
Happy Coding! Don't forget to Star ⭐ this repo if it helped you!