Skip to main content

Interactive educational platform for learning Pygame

Project description

🎮 Pygame Educational Platform

License: GPL v3

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.

Demo GIF

✨ 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
  • Developer Friendly:

    • 🧩 Modular lesson system
    • 📱 Responsive screen geometry
    • 🎨 Themed color system

🛠️ How to Use

  1. Clone the repository:

    git clone https://github.com/sergey-samoylov/pygame-tutor
    cd pygame-tutor
    
  2. Run the main program:

    python main.py
    
  3. Controls:

    • arrows: Navigate between lessons
    • S: Toggle code viewer
    • Q or ESC: 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:

  1. Create lesson_XX_name.py in the lessons directory
  2. Implement the lesson class inheriting from BaseLesson
  3. 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

pygame_tutor-0.1.4.tar.gz (33.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pygame_tutor-0.1.4-py3-none-any.whl (40.0 kB view details)

Uploaded Python 3

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

Hashes for pygame_tutor-0.1.4.tar.gz
Algorithm Hash digest
SHA256 663363af41db35a4cdd04cc73b0192e68d1e0ea5707bbfb05614c4d89fe2c901
MD5 80c1ccfa0eb4a13f2053404d64fa5911
BLAKE2b-256 24e3966e4a8b67b1463de93620a4e6e01123a161b7cdf02446d4363e3cebbdff

See more details on using hashes here.

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

Hashes for pygame_tutor-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 52ed73ff8f934dd7a3d6db2bb6a8887121d21805cc705cf27a4b3130543dcf7d
MD5 1793176daca785a2260570f8ed48a727
BLAKE2b-256 66633e6b7bbfb94da45a7fc35eae982e9d5ba7165d81fd130fd59eb7296339aa

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page