{"id":15443484,"url":"https://github.com/lemonyte/pongout","last_synced_at":"2026-02-14T07:31:08.634Z","repository":{"id":133545093,"uuid":"606879309","full_name":"lemonyte/pongout","owner":"lemonyte","description":"Pong \u0026 Breakout hybrid, created for the 9th Python Discord Code Jam.","archived":false,"fork":false,"pushed_at":"2024-10-28T19:30:09.000Z","size":119,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-06T11:40:02.394Z","etag":null,"topics":["breakout","code-jam","pong","python-discord"],"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/lemonyte.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}},"created_at":"2023-02-26T20:30:52.000Z","updated_at":"2024-10-28T19:56:46.000Z","dependencies_parsed_at":null,"dependency_job_id":"1361d41e-1c85-403c-a459-09e7cc29f41f","html_url":"https://github.com/lemonyte/pongout","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/lemonyte/pongout","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lemonyte%2Fpongout","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lemonyte%2Fpongout/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lemonyte%2Fpongout/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lemonyte%2Fpongout/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lemonyte","download_url":"https://codeload.github.com/lemonyte/pongout/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lemonyte%2Fpongout/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29439483,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-14T07:24:13.446Z","status":"ssl_error","status_checked_at":"2026-02-14T07:23:58.969Z","response_time":53,"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":["breakout","code-jam","pong","python-discord"],"created_at":"2024-10-01T19:35:12.094Z","updated_at":"2026-02-14T07:31:08.607Z","avatar_url":"https://github.com/lemonyte.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Pongout\n\nA Pong/Breakout hybrid with some odd features and twists.\n\nThis repository contains the **Zesty Zombies** team's submission for the [9th Python Discord Code Jam](https://www.pythondiscord.com/events/code-jams/9/).\n\nThe planning document is available [here](https://docs.google.com/document/d/1tSLVY6UtiPd9_nb_SqX0iz_ja2lJUBb2YvVplKj6tY8/edit?usp=sharing), and the presentation video is [here](https://youtu.be/Bm-WyYzRjXk).\n\n## Table of Contents\n\n- [Pongout](#pongout)\n  - [Table of Contents](#table-of-contents)\n  - [Playing the Game](#playing-the-game)\n    - [Requirements](#requirements)\n    - [Launching the Client](#launching-the-client)\n    - [Gameplay](#gameplay)\n    - [Hosting a Server](#hosting-a-server)\n    - [Docker](#docker)\n    - [Extras](#extras)\n  - [How It Works](#how-it-works)\n    - [Communication](#communication)\n    - [User Interface](#user-interface)\n  - [Improvements](#improvements)\n  - [Credits](#credits)\n  - [License](#license)\n\n## Playing the Game\n\n### Requirements\n\n- [Python 3.10](https://www.python.org/downloads/) or newer\n\n### Launching the Client\n\nClone or download the code in this repository.\n\nCreate a virtual environment in the same directory as the code.\n\n```bash\npython -m venv .venv\n```\n\nActivate the virtual environment.\n\n```bash\n# PowerShell\n.venv/Scripts/activate\n# Command Prompt\n.venv\\Scripts\\activate\n# Bash or other Linux shell\nsource .venv/bin/activate\n```\n\nInstall the dependencies.\n\n```bash\npip install -r requirements.txt\n```\n\nRun the client.\n\n```bash\npython client.py\n```\n\nEnter the IP address of a server to connect to.\n\n![image](https://user-images.githubusercontent.com/49930425/182553749-e0cee289-c3f6-4559-9dfa-f0474b62463a.png)\n\nClick the Connect button to join the server and start playing. Multiple clients can be run on the same machine.\n\nNote: The text field does not show a cursor or highlight text, but you are still able to type in it.\n\nA public server will be available during the Code Jam for judging and demonstration purposes at the IP address `zesty-zombies.pshome.me`.\n\n### Gameplay\n\nThe goal of the game is to prevent the ball from going past your paddle and hitting the wall behind it. Move the paddle with your mouse cursor to hit the ball on the screen. Up to 4 players can join a server, each controlling a paddle on one of the edges of the screen. The ball will bounce off walls where no paddle is present.\n\nPoints are awarded to the player who last bounced the ball before it hits a wall and is reset.\n\nBricks will spawn randomly on the field. Extra points are awarded for each brick destroyed. There is a small chance for a brick to activate a powerup when it is destroyed.\n\nPowerups affect every player *except* the player who activated it, and last for a short period of time. There are three types of powerups:\n\n- Invisible Ball: The ball becomes nearly invisible.\n- Invisible Paddle: All paddles become nearly invisible.\n- Inverted Paddle Movement: Your paddle will move in the opposite direction from your mouse cursor.\n\n### Hosting a Server\n\nFollow the steps to download the code, create a virtual environment, and install the dependencies from [Launching the Client](#launching-the-client).\n\nRun the server.\n\n```bash\npython server.py\n```\n\nThis will start a server on the IP address `0.0.0.0` and port `8765`.\n\nIf you want the server to be accessible from the Internet, you need to port-forward port `8765`. This process is similar to hosting a Minecraft server locally. Otherwise the server will be available on the local network only.\n\n### Docker\n\nThe repository contains a Dockerfile if you wish to run the server in a container.\n\nBuild the container image.\n\n```bash\ndocker build -t zesty_zombies .\n```\n\nRun the container.\n\n```bash\ndocker run -d -p 8765:8765 --name=\"zesty_zombies\" zesty-zombies\n```\n\nThis will expose port 8765 to be connected to, additional firewall configuration and port-forwarding may be required.\n\n### Extras\n\nThere are some extra ~~bugs~~ features included in the game, but we will not list them here. Have fun finding them!\n\n## How It Works\n\n### Communication\n\nThe client and server communicate using [WebSockets](https://pypi.org/project/websockets/) by sending data in JSON format.\n\nThe client sends messages to update the server with its current paddle position.\n\n```jsonc\n{\n  \"type\": \"paddle\", // Paddle position update message\n  \"data\": [0, 0] // Paddle coordinates\n}\n```\n\nThe client also sends an `init` message to notify the server that it would like to join.\n\n```jsonc\n{\n  \"type\": \"init\" // Server join request message\n}\n```\n\nThe server broadcasts messages containing the game state to all clients continuously.\n\n```jsonc\n{\n    \"type\": \"updates\", // Game state update message\n    \"data\": {\n        \"ball\": [0, 0], // Ball coordinates\n        \"ball_texture\": 0, // Ball texture index\n        \"bounce\": false, // Whether the ball has bounced\n        \"players\": { // Dict of players in the game\n            \"0\": { // Player number\n                \"position\": [0, 0], // Player coordinates\n                \"score\": 0, // Player score\n                \"player_number\": 0, // Player number\n                \"paddle_size\": [10, 100] // Paddle size\n            },\n            ...\n        },\n        \"bricks\": [ // List of bricks on the field\n            {\n                \"position\": [0, 0], // Brick coordinates\n                \"size\": [10, 50] // Brick size\n            },\n            ...\n        ],\n        \"powerups\": [ // List of active powerups\n            {\n                \"type\": \"Powerup\", // Powerup type\n                \"user\": 0 // Player that activated the powerup\n            },\n            ...\n        ]\n    }\n}\n```\n\nThe server also broadcasts events.\n\n```jsonc\n{\n    \"type\": \"join\", // Player join event message\n    \"data\": {\n        \"new\": 2, // Number of the new player\n        \"ingame\": [0, 1] // List of connected players\n    }\n}\n\n```\n\n```jsonc\n{\n    \"type\": \"leave\", // Player leave event message\n    \"data\": 0 // Number of the player who left\n}\n```\n\n```jsonc\n{\n    \"type\": \"new_powerup\", // Powerup activation event message\n    \"data\": {\n        \"type\": \"Powerup\", // Powerup type\n        \"user\": 0 // Player that activated the powerup\n    }\n}\n```\n\n### User Interface\n\nThe client uses the [`arcade`](https://pypi.org/project/arcade/) library to show the game state on screen and get the mouse cursor position.\n\n## Improvements\n\nThe Code Jam submission deadline has passed, however the game can still be improved outside of the Code Jam. These are some improvements that could be made:\n\n- [ ] General code cleanup\n- [ ] Performance improvements\n- [ ] Unified JSON message format\n- [ ] CRT filter effect\n- [ ] Player names\n- [ ] DPI aware rendering\n- [ ] Support for multiple balls\n\nAs well as some minor fixes:\n\n- [ ] Adjust balancing of invisibility powerups\n- [ ] Center the client window on start\n\n## Credits\n\nThe **Zesty Zombies** team consists of the following members:\n\n- [nitinramvelraj](https://github.com/nitinramvelraj) (team leader)\n- [Lemonyte](https://github.com/lemonyte)\n- [pmsharp2](https://github.com/pmsharp2)\n- [ilcheese2](https://github.com/ilcheese2)\n- [striker4150](https://github.com/striker4150)\n\n## License\n\nThis code is licensed under the [MIT license](LICENSE).\n\nAssets in the `images` directory are licensed under the [MIT license](LICENSE) and created by [Lemonyte](https://github.com/lemonyte).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flemonyte%2Fpongout","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flemonyte%2Fpongout","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flemonyte%2Fpongout/lists"}