{"id":29201935,"url":"https://github.com/jeffasante/pingpong-engine-rs","last_synced_at":"2025-07-02T12:36:33.811Z","repository":{"id":301643324,"uuid":"1009901564","full_name":"jeffasante/pingpong-engine-rs","owner":"jeffasante","description":"A minimal Rust game engine designed for building a classic Ping Pong game. Demonstrates pixel-buffer rendering, ECS-inspired components/systems, and reactive AI.","archived":false,"fork":false,"pushed_at":"2025-06-27T23:37:41.000Z","size":0,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-06-28T00:26:10.438Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jeffasante.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}},"created_at":"2025-06-27T23:28:33.000Z","updated_at":"2025-06-27T23:51:50.000Z","dependencies_parsed_at":"2025-06-28T00:36:16.585Z","dependency_job_id":null,"html_url":"https://github.com/jeffasante/pingpong-engine-rs","commit_stats":null,"previous_names":["jeffasante/pingpong-engine-rs"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jeffasante/pingpong-engine-rs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeffasante%2Fpingpong-engine-rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeffasante%2Fpingpong-engine-rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeffasante%2Fpingpong-engine-rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeffasante%2Fpingpong-engine-rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jeffasante","download_url":"https://codeload.github.com/jeffasante/pingpong-engine-rs/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeffasante%2Fpingpong-engine-rs/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263141283,"owners_count":23420046,"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","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":[],"created_at":"2025-07-02T12:36:30.086Z","updated_at":"2025-07-02T12:36:33.800Z","avatar_url":"https://github.com/jeffasante.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Ping Pong Engine\n\nA lightweight 2D game engine built in Rust specifically designed for creating a classic Ping Pong game. This project demonstrates modular game architecture, real-time rendering, and game system design patterns.\n\n![Gameplay Demo](output.gif)\n\n## Features\n\n- **Real-time 2D rendering** using pixel buffer manipulation\n- **Modular ECS-inspired architecture** with separated components and systems\n- **Smooth 60 FPS gameplay** with delta-time based movement\n- **Player vs AI gameplay** with intelligent paddle behavior\n- **Collision detection** between ball, paddles, and boundaries\n- **Digital scoreboard** with retro 7-segment display styling\n- **Configurable game parameters** through centralized config system\n\n\n## Technical Implementation\n\n**Rendering**: Custom 2D pixel buffer rendering with direct memory manipulation for optimal performance\n\n**Input Handling**: Real-time keyboard input processing using the minifb library\n\n**Physics**: Simple velocity-based movement with collision response and boundary constraints\n\n**AI**: Reactive AI opponent that tracks ball position with realistic movement limitations\n\n**Architecture Pattern**: Entity-Component-System inspired design for maintainable and extensible code\n\n## Controls\n\n- **Arrow Keys** or **WASD**: Move player paddle up/down\n- **Escape**: Exit game\n\n## Dependencies\n\n- `minifb`: Window creation and input handling\n- `winit`: Cross-platform window management\n\n## Getting Started\n\n### Prerequisites\n\n- Rust 1.70 or later\n- Cargo package manager\n\n### Installation and Running\n\n```bash\n# Clone the repository\ngit clone https://github.com/jeffasante/pingpong-engine-rs\ncd ping_pong_engine\n\n# Build and run\ncargo run\n\n# For optimized release build\ncargo run --release\n```\n\n### Configuration\n\nGame parameters can be modified in `src/engine/config.rs`:\n\n```rust\npub struct Config {\n    pub window_width: u32,      // Default: 800\n    pub window_height: u32,     // Default: 600\n    pub paddle_speed: f32,      // Default: 300.0\n    pub ball_speed: f32,        // Default: 200.0\n    pub fps_target: u64,        // Default: 60\n    // ... additional styling options\n}\n```\n\n## Development Notes\n\nThis project serves as a foundation for 2D game development in Rust, demonstrating:\n\n- **Memory-safe systems programming** with Rust's ownership model\n- **Performance-oriented rendering** through direct pixel manipulation\n- **Clean architecture patterns** for game development\n- **Real-time system constraints** and frame timing management\n\nThe modular design allows for easy extension with additional features like sound effects, particle systems, or networked multiplayer functionality.\n\n## License\n\nThis project is created for educational and portfolio purposes.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjeffasante%2Fpingpong-engine-rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjeffasante%2Fpingpong-engine-rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjeffasante%2Fpingpong-engine-rs/lists"}