{"id":48075385,"url":"https://github.com/brej-29/space-ping-pong","last_synced_at":"2026-04-04T14:49:38.818Z","repository":{"id":315469570,"uuid":"1059621979","full_name":"brej-29/space-ping-pong","owner":"brej-29","description":"Space Ping Pong is a neon, arcade-style 2D pong game built with Python + Pygame. Play vs computer (E/M/H) or local two-player. Includes power-ups, particle effects, starfield, screen shake, and persistent high scores. Modular codebase (ball/paddle/powerups/game) easy to extend.","archived":false,"fork":false,"pushed_at":"2025-09-18T18:53:23.000Z","size":6343,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-09-18T21:24:25.251Z","etag":null,"topics":["2d-game","ai-opponent","arcade","game","game-development","gamedev","high-scores","local-multiplayer","open-source","particle-effects","ping-pong","power-ups","pygame","python","retro","screen-shake","starfield"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/brej-29.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-09-18T17:40:09.000Z","updated_at":"2025-09-18T18:45:11.000Z","dependencies_parsed_at":"2025-09-18T21:37:14.127Z","dependency_job_id":null,"html_url":"https://github.com/brej-29/space-ping-pong","commit_stats":null,"previous_names":["brej-29/space-ping-pong"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/brej-29/space-ping-pong","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brej-29%2Fspace-ping-pong","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brej-29%2Fspace-ping-pong/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brej-29%2Fspace-ping-pong/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brej-29%2Fspace-ping-pong/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/brej-29","download_url":"https://codeload.github.com/brej-29/space-ping-pong/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brej-29%2Fspace-ping-pong/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31403676,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-04T10:20:44.708Z","status":"ssl_error","status_checked_at":"2026-04-04T10:20:06.846Z","response_time":60,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["2d-game","ai-opponent","arcade","game","game-development","gamedev","high-scores","local-multiplayer","open-source","particle-effects","ping-pong","power-ups","pygame","python","retro","screen-shake","starfield"],"created_at":"2026-04-04T14:49:38.163Z","updated_at":"2026-04-04T14:49:38.809Z","avatar_url":"https://github.com/brej-29.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n  \u003ch1\u003e🛰️ Space Ping Pong\u003c/h1\u003e\n  \u003cp\u003e\u003ci\u003eAn arcade-style, neon space-themed ping pong game built with Python \u0026 Pygame\u003c/i\u003e\u003c/p\u003e\n\n  \u003c!-- Gameplay preview (ensure the filename below matches your gifs folder) --\u003e\n  \u003cimg src=\"gifs/SpacePingPongDemo.gif\" alt=\"Space Ping Pong gameplay\" width=\"700\"\u003e\n\u003c/div\u003e\n\n\u003cbr\u003e\n\n\u003cdiv align=\"center\"\u003e\n  \u003c!-- Update the repo path in the href and badge if your repo name differs --\u003e\n  \u003ca href=\"https://github.com/brej-29/space-ping-pong\"\u003e\n    \u003cimg alt=\"Last Commit\" src=\"https://img.shields.io/github/last-commit/brej-29/space-ping-pong\"\u003e\n  \u003c/a\u003e\n  \u003cimg alt=\"Python Language\" src=\"https://img.shields.io/badge/Language-Python-blue\"\u003e\n  \u003cimg alt=\"Pygame\" src=\"https://img.shields.io/badge/Library-Pygame-brightgreen\"\u003e\n  \u003cimg alt=\"License: MIT\" src=\"https://img.shields.io/badge/License-MIT-yellow\"\u003e\n  \u003cimg alt=\"OS\" src=\"https://img.shields.io/badge/OS-Windows%20%7C%20macOS%20%7C%20Linux-lightgrey\"\u003e\n\u003c/div\u003e\n\n\u003cdiv align=\"center\"\u003e\n  \u003cbr\u003e\n  \u003cb\u003eBuilt with the tools and technologies:\u003c/b\u003e\n  \u003cbr\u003e\u003cbr\u003e\n  \u003ccode\u003ePython\u003c/code\u003e | \u003ccode\u003ePygame\u003c/code\u003e | \u003ccode\u003edataclasses\u003c/code\u003e | \u003ccode\u003eEnum\u003c/code\u003e | \u003ccode\u003eJSON (local storage)\u003c/code\u003e | \u003ccode\u003eOOP\u003c/code\u003e\n\u003c/div\u003e\n\n---\n\n## **Table of Contents**\n* [Overview](#overview)\n* [Features](#features)\n* [Getting Started](#getting-started)\n  * [Prerequisites](#prerequisites)\n  * [Installation](#installation)\n  * [Configuration](#configuration)\n  * [Usage](#usage)\n* [Project Structure](#project-structure)\n* [Controls](#controls)\n* [Difficulty \u0026 Power-ups](#difficulty--power-ups)\n* [License](#license)\n* [Contact](#contact)\n\n---\n\n## **Overview**\n\n**Space Ping Pong** is a colorful, fast-paced desktop game. It features a starfield background, particle effects, power-ups, screen shake, a high-score table, and both **Single-player (vs Computer)** and **Local Two-player** modes. The animated menu lets you pick a mode, toggle difficulty (E/M/H), view high scores, and exit.\n\n\u003e The game stores high scores locally (JSON), so your top results persist between runs.\n\n\u003cbr\u003e\n\n### **Project Highlights**\n- **Two Modes:** Play vs Computer (AI) or Local Human vs Human.\n- **Dynamic Feel:** Particle bursts, pulsing menu text, starfield, and subtle screen shake.\n- **Power-ups:** Speed Boost, Paddle Grow/Shrink, Shield, Multi-Ball, and Freeze.\n- **High Scores:** Auto-saved locally and shown in a dedicated screen.\n- **Lightweight:** Only external dependency is `pygame`.\n\n---\n\n## **Features**\n- Animated main menu with difficulty toggle (E/M/H).\n- AI opponent with difficulty scaling.\n- Local 2-player option (separate key bindings).\n- Multiple power-ups with visual feedback.\n- Particle effects for hits/scoring and a trailing ball effect.\n- Persistent high scores (JSON file).\n- Clean, modular Python code split across multiple files.\n\n---\n\n## **Getting Started**\n\nFollow these steps to set up and run the project on your machine.\n\n### **Prerequisites**\n- **Python 3.8+**\n- **pip** (Python package manager)\n\n### **Installation**\n1. **Clone the repository (or download the source code):**  \n   ``` sh\n   git clone https://github.com/brej-29/space-ping-pong.git\n   cd \u003crepo-name\u003e\n     ```\n\n2. **Install dependencies:**\n  ``` sh\n  pip install -r requirements.txt\n  ```\n\n### Configuration\n This game runs out-of-the-box. Optional tweaks:\n- **Window \u0026 FPS:** edit SCREEN_WIDTH, SCREEN_HEIGHT, and FPS in settings.py.\n- **Default Difficulty:** in game.py (self.difficulty = Difficulty.MEDIUM), change to EASY or HARD.\n- **High Scores file path:** adjust in storage.py if you want to store it somewhere else (e.g., a data/ folder).\n\n### Usage\nRun the game from the project root:\n``` sh\npython main.py\n```\n\u003e If you’re using a virtual environment, activate it first (see above).\n\n---\n\n## Project Structure\n\n``` bash\n.\n├─ LICENSE\n├─ README.md\n├─ requirements.txt\n├─ gifs/\n│  └─ space-ping-pong.gif        # gameplay preview (update name if different)\n├─ main.py                       # entrypoint (runs the game)\n├─ game.py                       # Game loop, states, drawing, event handling\n├─ settings.py                   # screen size, FPS, colors, etc.\n├─ enums.py                      # GameState, Difficulty, PowerUpType\n├─ vector.py                     # lightweight Vector2D\n├─ ball.py                       # Ball entity, physics \u0026 trail\n├─ paddle.py                     # Paddle entity, player/AI logic \u0026 effects\n├─ particles.py                  # Particle \u0026 Star classes\n├─ powerups.py                   # PowerUp entity \u0026 visuals\n└─ storage.py                    # load/save high scores (JSON)\n\n```\n\n---\n\n## **Controls**\n\n**Menu**\n- `1` → Play vs Computer  \n- `2` → Play vs Human  \n- `3` → High Scores  \n- `E / M / H` → Change difficulty  \n- `ESC` → Quit\n\n**Gameplay**\n- **Player 1 (Right):** Arrow `↑` / `↓`  \n- **Player 2 (Left, only in Human vs Human):** `W` / `S`  \n- `SPACE` → Pause / Resume\n\n---\n\n## **Difficulty \u0026 Power-ups**\n\n- **Difficulty**\n  - The AI paddle behavior changes based on `Difficulty` (EASY / MEDIUM / HARD).  \n  - You can toggle it from the menu using `E`, `M`, or `H`.  \n  - To change the default, set `self.difficulty` in `game.py`.\n\n- **Power-ups**\n  - **Speed Boost** – temporarily increases ball speed.  \n  - **Paddle Grow / Shrink** – temporarily changes paddle size.  \n  - **Shield** – gives a paddle a one-time protective barrier.  \n  - **Multi-Ball** – spawns an additional ball.  \n  - **Freeze** – briefly pauses ball/paddle updates.\n  \n\u003e Power-ups spawn periodically and are collected when the ball collides with them. Particle bursts and highlights indicate pickups.\n\n---\n\n## **License**\nThis project is licensed under the **MIT License**. See the [`LICENSE`](LICENSE) file for details.\n\n---\n\n## **Contact**\nQuestions or feedback or want to collaborate? Reach out via my  \n**LinkedIn:** [Brejesh Balakrishnan](https://www.linkedin.com/in/brejesh-balakrishnan-7855051b9/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrej-29%2Fspace-ping-pong","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbrej-29%2Fspace-ping-pong","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrej-29%2Fspace-ping-pong/lists"}