Skip to content

Amey-Thakur/PONG-GAME

Repository files navigation

Pong Game

License: MIT Status Technology Developed by Amey Thakur and Mega Satish

A modern Python + Pygame reconstruction of the original 1972 Pong, built with accurate collision physics and performance-focused game loops.

Source Code  ·  Technical Specification  ·  Live Demo


Authors  ·  Overview  ·  Features  ·  Structure  ·  Results  ·  Quick Start  ·  Usage Guidelines  ·  License  ·  About  ·  Acknowledgments


Important

🤝🏻 Special Acknowledgement

Special thanks to Mega Satish for her meaningful contributions, guidance, and support that helped shape this work.


Overview

Pong Game is a precision-engineered simulation of the 1972 arcade foundational, rebuilt using Python and Pygame with a focus on engine adaptability and web performance. By leveraging WebAssembly for ubiquitous deployment, this project bridges the gap between retro systems and modern browser capabilities, offering a responsive, mathematically accurate study of collision dynamics and game loop architecture.

core mechanics

The simulation is governed by strict computational design patterns ensuring fidelity and responsiveness:

  • Progressive Physics: The engine utilizes a linear velocity multiplier, incrementally increasing ball speed with every successful rally to create an evolving challenge curve.
  • Heuristic AI: Unlike static opponents, the CPU logic integrates a probabilistic error function that dynamically refines its accuracy over time, simulating an organic learning curve.
  • Direct Manipulation: Input handling supports both continuous key-state and coordinate-based (mouse) control schemes, ensuring zero-latency paddle response critical for high-speed gameplay.

Tip

Sensory Feedback Integration

To maximize state clarity, the engine employs a multi-modal feedback system. Particle emitters detonate on scoring events, and dynamic trails visualize the ball's velocity vector, strictly coupling visual flair with game state changes. This ensures the user's mental model is constantly synchronized with the underlying physics simulation without reliance on intrusive HUD elements.


Features

Feature Description
Physics Engine High-precision collision detection using Rect intersection logic for authentic deflection.
Adaptive AI Opponent logic with velocity-tracking heuristics and organic error rates.
Spatial Audio Event-driven sound engine using OGG assets for broad browser compatibility.
Wasm Architecture Efficient WebAssembly compilation via Pygbag for native web execution.
Game Loop Asynchronous architecture ensuring 60 FPS stability on web clients.
Visual Feedback Dynamic Particle Systems that trigger on goal events for sensory reward.
State Feedback Velocity-Based Trails and screen flash effects for high-impact game feel.
Social Persistence Interactive Footer Integration bridging the game to the source repository.

Note

Interactive Polish: The Velocity Singularity

We have engineered a Physics-Driven State Manager that calibrates ball velocity across multiple vectors to simulate momentum transfer. The visual language focuses on the minimalist "High-Contrast" aesthetic of early computing, ensuring maximum focus on the interactive trajectory.

Tech Stack

  • Languages: Python 3.11
  • Logic: Pygame Engine (Asynchronous Loop & Physics Engine)
  • Imaging: Procedural Graphics (Custom Particle & Trail Systems)
  • UI System: Premium Retro Graphics (Custom Python Canvas)
  • Deployment: GitHub Actions (Pygbag WebAssembly Pipeline)
  • Hosting: GitHub Pages

Project Structure

PONG-GAME/
│
├── .github/                         # Deployment & Automation Layer
│   └── workflows/
│       └── main.yml                 # CI/CD Pipeline (Pygbag Build & Deploy)
│
├── docs/                            # Technical Documentation
│   └── SPECIFICATION.md             # Architecture & Design Specification
│
├── Mega/                            # Archival Attribution Assets
│   ├── Filly.jpg                    # Companion (Filly)
│   └── Mega.png                     # Author Profile Image (Mega Satish)
│
├── screenshots/                     # Project Visualization Gallery
│   ├── 01-loading-screen.png        # WebAssembly Initialization
│   ├── 02-game-start.png            # Initial Game State
│   ├── 03-rally-mechanics.png       # Physics & Difficulty Scaling
│   ├── 04-physics-dynamics.png      # Real-time Collision Tracking
│   └── 05-high-intensity.png        # Peak Velocity State
│
├── Source Code/                     # Primary Application Layer
│   ├── build/                       # WebAssembly Build Artifacts
│   ├── sound/                       # Audio Assets (WAV/OGG)
│   ├── default.tmpl                 # Pygbag HTML Template
│   ├── favicon.png                  # System Identity Icon
│   ├── icon.png                     # Application Icon
│   └── main.py                      # Core Game Logic (Asynchronous Entry Point)
│
├── .gitattributes                   # Git configuration
├── .gitignore                       # Repository Filters
├── CITATION.cff                     # Scholarly Citation Metadata
├── codemeta.json                    # Machine-Readable Project Metadata
├── favicon.png                      # Root Identity Icon
├── LICENSE                          # MIT License Terms
├── README.md                        # Comprehensive Scholarly Entrance
└── SECURITY.md                      # Security Policy & Protocol

Results

Main Landing: System Initialization
Asynchronous WebAssembly environment setup via Pygbag.

Loading Screen


Gameplay: 2D Physics Interface
High-contrast rendering with minimalist retro aesthetics.

Game Start


Progressive Challenge: Rally Dynamics
Dynamic velocity multiplier increasing challenge with every rally.

Rally Mechanics


Trajectory Analysis: Collision Logic
Real-time physics calculation for precise deflection vectors.

Physics Dynamics


Visual Feedback: Multi-modal Particles
State-driven particle systems triggered on goal events.

High Intensity


Quick Start

1. Prerequisites

Warning

Local Execution

For local development, ensure that the pygame and asyncio libraries are correctly installed. Running the project locally may require pygbag for the full web-simulation experience.

2. Installation

Clone the repository and install the necessary dependencies:

# Clone the repository
git clone https://github.com/Amey-Thakur/PONG-GAME.git
cd PONG-GAME

# Install Pygame (Community Edition recommended for best performance)
pip install pygame-ce

# (Optional) Install Pygbag if you wish to build for the web
pip install pygbag

3. Execution Modes

You can launch the application in two distinct environments:

A. Native Desktop (Recommended) Run the game directly as a high-performance desktop application:

python "Source Code/main.py"

B. Web Simulation (Pygbag) Simulate the WebAssembly environment locally to test browser compatibility:

pygbag "Source Code"

Access the simulation at http://localhost:8000 once the server starts.

Tip

Cross-Platform Web Deployment | WebAssembly Reconstruction

Experience this high-performance Python game engine running natively in your browser via WebAssembly (Wasm). This asynchronous reconstruction leverages Pygbag to deliver a premium retro-arcade experience with mathematically accurate collision dynamics and zero-latency Human-Machine Interaction.

Launch Live Demo


Usage Guidelines

This repository is openly shared to support learning and knowledge exchange across the academic community.

For Students
Use this project as reference material for understanding interactive system design, game development patterns, and Python principles. The source code is available for study to facilitate self-paced learning and exploration of user-centric design patterns.

For Educators
This project may serve as a practical lab example or supplementary teaching resource for Game Development and Python Programming courses. Attribution is appreciated when utilizing content.

For Researchers
The documentation and design approach may provide insights into academic project structuring and interactive application development.


License

This repository and all its creative and technical assets are made available under the MIT License. See the LICENSE file for complete terms.

Note

Summary: You are free to share and adapt this content for any purpose, even commercially, as long as you provide appropriate attribution to the original authors.

Copyright © 2022 Amey Thakur & Mega Satish


About This Repository

Created & Maintained by: Amey Thakur & Mega Satish
Academic Journey: Bachelor of Engineering in Computer Engineering (2018-2022)
Institution: Terna Engineering College, Navi Mumbai
University: University of Mumbai

This project features The Pong Game, a high-performance reconstruction of the retro arcade classic. It represents a personal exploration into Python-based game development and interactive physics simulation.

Connect: GitHub  ·  LinkedIn  ·  ORCID

Acknowledgments

Grateful acknowledgment to Mega Satish for her exceptional collaboration and scholarly partnership during the development of this game design project. Her constant support, technical clarity, and dedication to software quality were instrumental in achieving the system's functional objectives. Learning alongside her was a transformative experience; her thoughtful approach to problem-solving and steady encouragement turned complex requirements into meaningful learning moments. This work reflects the growth and insights gained from our side-by-side academic journey. Thank you, Mega, for everything you shared and taught along the way.

Special thanks to the mentors and peers whose encouragement, discussions, and support contributed meaningfully to this learning experience.


↑ Back to Top

Authors  ·  Overview  ·  Features  ·  Structure  ·  Results  ·  Quick Start  ·  Usage Guidelines  ·  License  ·  About  ·  Acknowledgments


🏓 PONG-GAME


Computer Engineering (B.E.) - University of Mumbai

Semester-wise curriculum, laboratories, projects, and academic notes.

Releases

No releases published

Packages

 
 
 

Contributors