Interactive educational platform for learning Pygame
Project description
🎮 Pygame Educational Platform
A playful coding playground where Python meets Pygame in interactive lessons! Designed for educators and learners to explore programming concepts through visual, hands-on examples.
✨ Features
-
Interactive Coding Lessons:
- 🚀 Comet animation with color-changing trails
- ⚛️ Physics playground with bouncing balls
- ⌨️ Key detection with visual feedback
- 🎯 Breakout game with proper collision physics
-
Educational Tools:
- 📜 Real-time code viewer (toggle with
S) - 📝 Concept explanations in each lesson
- ↔️ Easy navigation between lessons
- 📜 Real-time code viewer (toggle with
-
Developer Friendly:
- 🧩 Modular lesson system
- 📱 Responsive screen geometry
- 🎨 Themed color system
🛠️ How to Use
-
Clone the repository:
git clone https://github.com/sergey-samoylov/pygame-tutor cd pygame-tutor
-
Run the main program:
python main.py -
Controls:
←→arrows: Navigate between lessonsS: Toggle code viewerQorESC: Quit- Lesson-specific controls shown in each activity
📚 Lessons Overview
| Lesson | Description | Key Concepts |
|---|---|---|
| Cosmic Comet | Animated comet with colorful trail | Animation loops, Screen wrapping, Color interpolation |
| Physics Playground | Bouncing balls with gravity | Collision detection, Physics simulation, Vector math |
| Key Detection Lab | Visual keyboard input feedback | Event handling, Input processing, Visual feedback |
| Breakout Game | Classic brick-breaking game | Game state management, Collision resolution, Paddle control |
🎨 Color Theme
Based on the Tokyo Night palette:
{
"background": (26, 27, 38), # Dark blue-gray
"text": (169, 177, 214), # Light gray-blue
"highlight": (122, 162, 247), # Bright blue
"accent": (158, 206, 106), # Soft green
"Orange": (255, 179, 0), # Vibrant orange
"Purple": (204, 153, 255) # Light purple
}
🧑💻 Development
To add a new lesson:
- Create
lesson_XX_name.pyin the lessons directory - Implement the lesson class inheriting from
BaseLesson - Add required methods:
update(),draw(),handle_events()
Example lesson structure:
class LessonXXName(BaseLesson):
def __init__(self, screen_geo):
super().__init__(screen_geo)
self.title = "My Cool Lesson"
def update(self, dt):
# Update game state
def draw(self):
# Render graphics
def handle_events(self, event):
# Process input events
📜 License
This project is licensed under the GNU GPLv3 License - see the LICENSE file for details.
"The best way to learn is by doing." - This project brings that philosophy to programming education through interactive Pygame examples.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pygame_tutor-0.1.4.tar.gz.
File metadata
- Download URL: pygame_tutor-0.1.4.tar.gz
- Upload date:
- Size: 33.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
663363af41db35a4cdd04cc73b0192e68d1e0ea5707bbfb05614c4d89fe2c901
|
|
| MD5 |
80c1ccfa0eb4a13f2053404d64fa5911
|
|
| BLAKE2b-256 |
24e3966e4a8b67b1463de93620a4e6e01123a161b7cdf02446d4363e3cebbdff
|
File details
Details for the file pygame_tutor-0.1.4-py3-none-any.whl.
File metadata
- Download URL: pygame_tutor-0.1.4-py3-none-any.whl
- Upload date:
- Size: 40.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
52ed73ff8f934dd7a3d6db2bb6a8887121d21805cc705cf27a4b3130543dcf7d
|
|
| MD5 |
1793176daca785a2260570f8ed48a727
|
|
| BLAKE2b-256 |
66633e6b7bbfb94da45a7fc35eae982e9d5ba7165d81fd130fd59eb7296339aa
|