{"id":31128822,"url":"https://github.com/xfedet/pong","last_synced_at":"2026-05-04T08:37:48.891Z","repository":{"id":313231050,"uuid":"1050589794","full_name":"xFedeT/Pong","owner":"xFedeT","description":"A modern real-time multiplayer Pong game built with C# and .NET, featuring TCP networking, clean architecture, and smooth gameplay mechanics.","archived":false,"fork":false,"pushed_at":"2025-09-04T16:48:29.000Z","size":21,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-09-04T18:35:06.465Z","etag":null,"topics":["arcade-game","client-server","csharp","dotnet","game-development","multiplayer","networking","pong","tcp","winforms"],"latest_commit_sha":null,"homepage":"","language":"C#","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/xFedeT.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-04T16:40:15.000Z","updated_at":"2025-09-04T16:48:33.000Z","dependencies_parsed_at":"2025-09-04T18:35:09.078Z","dependency_job_id":"56e7e8df-1423-4a20-bd4e-f2d6b6a57564","html_url":"https://github.com/xFedeT/Pong","commit_stats":null,"previous_names":["xfedet/pong"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/xFedeT/Pong","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xFedeT%2FPong","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xFedeT%2FPong/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xFedeT%2FPong/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xFedeT%2FPong/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xFedeT","download_url":"https://codeload.github.com/xFedeT/Pong/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xFedeT%2FPong/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":275691308,"owners_count":25510521,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-17T02:00:09.119Z","response_time":84,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["arcade-game","client-server","csharp","dotnet","game-development","multiplayer","networking","pong","tcp","winforms"],"created_at":"2025-09-18T01:03:56.924Z","updated_at":"2025-09-18T01:05:36.764Z","avatar_url":"https://github.com/xFedeT.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Pong Multiplayer\n\nA classic Pong game implementation with real-time multiplayer networking support, built in C# using Windows Forms and TCP/IP communication.\n\n## 🎮 Features\n\n- **Real-time Multiplayer**: Two players can connect and play over a network\n- **TCP/IP Networking**: Reliable client-server architecture\n- **Smooth Graphics**: Anti-aliased rendering with customizable colors\n- **Game Physics**: Realistic ball physics with collision detection\n- **Score Tracking**: Live score display for both players\n- **Countdown System**: 3-second countdown before each game starts\n- **Auto-reconnection**: Clients can reconnect after disconnection\n- **Cross-platform Server**: Console-based server with management commands\n\n## 🏗️ Architecture\n\nThe project follows a clean, modular architecture:\n\n```\nPong/\n├── Client/                 # Client-side components\n│   ├── App/               # Application entry point\n│   └── Graphics/          # Rendering and UI components\n├── Server/                # Server-side components\n│   └── App/              # Server application entry point\n├── Game/                 # Core game logic (shared)\n│   ├── Config/           # Game configuration\n│   ├── Logic/            # Game physics and rules\n│   ├── Network/          # Network communication\n│   └── State/            # Game state management\n└── Program.cs            # Main application entry point\n```\n\n## 🚀 Getting Started\n\n### Prerequisites\n\n- .NET 8.0 or later\n- Windows OS (for Windows Forms client)\n- Visual Studio 2022 or VS Code with C# extension\n\n### Building the Project\n\n1. Clone the repository:\n```bash\ngit clone [your-repository-url]\ncd PongClient\n```\n\n2. Build the solution:\n```bash\ndotnet build\n```\n\n3. Or open `PongClient.sln` in Visual Studio and build.\n\n### Running the Game\n\n#### Starting the Server\n\nRun the server from command line:\n```bash\ndotnet run --project Pong -- server\n```\n\nOr from Visual Studio, set command line arguments to `server`.\n\nThe server will start and display:\n```\n=====================================\n    Pong Multiplayer Server v1.0    \n=====================================\n\n✓ Server started successfully!\n✓ Listening on port 12346\n✓ Ready to accept player connections\n```\n\n#### Starting the Client\n\nRun the client:\n```bash\ndotnet run --project Pong\n```\n\nOr simply run without arguments from Visual Studio.\n\nWhen prompted, enter the server IP address (default: `127.0.0.1` for local play).\n\n## 🎯 How to Play\n\n### Controls\n- **Up Arrow**: Move paddle up\n- **Down Arrow**: Move paddle down\n\n### Gameplay\n1. Two players connect to the server\n2. A 3-second countdown begins\n3. The ball starts moving automatically\n4. Players control their paddles to hit the ball\n5. Score points when the ball passes the opponent's paddle\n6. Ball speed increases after each paddle hit\n7. Game continues until a player disconnects\n\n### Player Assignment\n- **Player 1** (Blue paddle): Left side of the screen\n- **Player 2** (Red paddle): Right side of the screen\n\n## 🛠️ Server Commands\n\nWhile the server is running, you can use these commands:\n\n| Command | Description |\n|---------|-------------|\n| `help` or `h` | Show available commands |\n| `status` or `s` | Display server status |\n| `restart` or `r` | Restart the server |\n| `clear` or `cls` | Clear console screen |\n| `quit` or `exit` or `q` | Stop server and exit |\n\n## ⚙️ Configuration\n\nGame settings can be modified in `GameConfiguration.cs`:\n\n### Field Dimensions\n```csharp\npublic const int FieldWidth = 800;\npublic const int FieldHeight = 520;\n```\n\n### Paddle Settings\n```csharp\npublic const int PaddleWidth = 10;\npublic const int PaddleHeight = 100;\npublic const int PaddleSpeed = 10;\n```\n\n### Ball Physics\n```csharp\npublic const int BallSize = 20;\npublic const int BallInitialSpeed = 2;\npublic const int MaxBallSpeed = 12;\n```\n\n### Network Settings\n```csharp\npublic const int ServerPort = 12346;\npublic const string DefaultServerIP = \"127.0.0.1\";\n```\n\n## 🔧 Technical Details\n\n### Networking Protocol\n\nThe game uses a simple text-based protocol over TCP:\n\n#### Client to Server Messages\n- `MOVE:1` - Move paddle down\n- `MOVE:-1` - Move paddle up\n\n#### Server to Client Messages\n- `ASSIGN:1` - Assign player ID (1 or 2)\n- `COUNTDOWN:3` - Countdown display (3, 2, 1)\n- `START` - Game begins\n- `STATE:x,y,p1y,p2y,s1,s2` - Game state update\n- `QUIT` - Other player disconnected\n\n### Game State Synchronization\n\nThe server maintains the authoritative game state and broadcasts updates to all clients at 30 FPS. The state includes:\n- Ball position (x, y)\n- Ball velocity (x, y)\n- Player 1 paddle Y position\n- Player 2 paddle Y position\n- Player scores\n\n### Collision Detection\n\nThe game implements rectangle-based collision detection for:\n- Ball-wall collisions (top/bottom walls)\n- Ball-paddle collisions (left/right paddles)\n- Goal detection (ball passes paddle boundaries)\n\n## 🐛 Troubleshooting\n\n### Common Issues\n\n1. **Connection Failed**\n   - Ensure the server is running\n   - Check firewall settings\n   - Verify the correct IP address and port\n\n2. **Game Lag**\n   - Check network connection stability\n   - Ensure server has sufficient resources\n\n3. **Client Crashes**\n   - Verify .NET 8.0 is installed\n   - Check Windows Forms dependencies\n\n### Debug Output\n\nThe application outputs debug information to the console:\n- Connection status\n- Player assignments\n- Network errors\n- Game state changes\n\n## 🏆 Future Enhancements\n\nPotential improvements for future versions:\n\n- [ ] Sound effects and background music\n- [ ] Multiple game modes (tournament, practice)\n- [ ] AI opponent for single-player mode\n- [ ] Improved graphics with animations\n- [ ] Game replay system\n- [ ] Player statistics tracking\n- [ ] Custom paddle colors and themes\n- [ ] Mobile client support\n\n## 📝 License\n\nThis project is open source and available under the [MIT License](LICENSE).\n\n\n**Enjoy playing Pong Multiplayer!** 🏓\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxfedet%2Fpong","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxfedet%2Fpong","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxfedet%2Fpong/lists"}