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.0.tar.gz (32.0 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.0-py3-none-any.whl (37.8 kB view details)

Uploaded Python 3

File details

Details for the file pygame_tutor-0.1.0.tar.gz.

File metadata

  • Download URL: pygame_tutor-0.1.0.tar.gz
  • Upload date:
  • Size: 32.0 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.0.tar.gz
Algorithm Hash digest
SHA256 f6d255888c2050ad4d2fea72b323f421612d8e32c38afba8f175ecb7f614991d
MD5 0fc2452d75bbd8ee7ac290897193fdce
BLAKE2b-256 fe6cdaf254a4142b4766b33f4cfb95268f54b107f80d7c59ae7ca43b288214b0

See more details on using hashes here.

File details

Details for the file pygame_tutor-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: pygame_tutor-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 37.8 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5dd7e1f27aff404bb878336144d7b653f6f154eab53e3e4d273480323b40fcc8
MD5 b4480a66dfc9b1e9f9efb17306e7d559
BLAKE2b-256 089b1dc16f5396abe5fd863b3055317679f73b5a232dfecdc9afcf2098e0327d

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