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.1.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.1-py3-none-any.whl (37.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pygame_tutor-0.1.1.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.1.tar.gz
Algorithm Hash digest
SHA256 ca90a8061ec9eae5c5d775ce68bae0205dfa224898f73964f9ccf35d83d4e4cc
MD5 ebd83da151ad495cefbbbfe2bcd3528a
BLAKE2b-256 e6364e4517925063901416791abe6652c3055388b74be98d7e3d8da601779462

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pygame_tutor-0.1.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ce0201ab1a16b680dcc2a931338daf1394684425ac79aabd872f738b0bdee60d
MD5 af1bb44960f5798c5fb2dd05bb292a5e
BLAKE2b-256 16dd973e0d1db85ea3b3a2081c358d83cca662678d3d82a5fe7a8caf9ce7d3e1

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