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.6.tar.gz (31.7 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.6-py3-none-any.whl (40.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pygame_tutor-0.1.6.tar.gz
  • Upload date:
  • Size: 31.7 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.6.tar.gz
Algorithm Hash digest
SHA256 2e65239701b256a4d964dc0c3d58cd0d8f975ee490a41edbb3632405583edef7
MD5 4bf3a3b7da38b1f93e624c24aa2c4e8d
BLAKE2b-256 ef116de12fb7696676eb8e3fba7dca200d3491d2db02a384068e63aa803a874f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pygame_tutor-0.1.6-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.6-py3-none-any.whl
Algorithm Hash digest
SHA256 c65a0d857ea3bca833cbff6ae2b7d2fff7f6fce29256cd3df8467da0a5c6114e
MD5 35746cb3d184d0fc069fff5c20268db0
BLAKE2b-256 1753f08e23f88d20cf42d9ef53e2ed277a551ea4f1b5c4a47903458652a01ac5

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