{"id":24468780,"url":"https://github.com/cnmenghan/pyphysicsball","last_synced_at":"2025-04-13T10:22:16.630Z","repository":{"id":272027428,"uuid":"914847017","full_name":"CNMengHan/PyphysicsBall","owner":"CNMengHan","description":"An interactive physics sandbox built with Pygame, featuring realistic ball physics with gravity, collision, and special effects.","archived":false,"fork":false,"pushed_at":"2025-01-11T22:29:57.000Z","size":9067,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-27T01:47:27.109Z","etag":null,"topics":["2d-physics","2d-physics-engine","ball-physics","collision-detection","educational-game","force-field","game-development","gravity-simulation","interactive","particle-system","physics-engine","physics-simulation","pygame","python","sandbox-game","simulation"],"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/CNMengHan.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":"2025-01-10T12:34:49.000Z","updated_at":"2025-03-20T20:52:44.000Z","dependencies_parsed_at":"2025-01-11T15:45:44.839Z","dependency_job_id":null,"html_url":"https://github.com/CNMengHan/PyphysicsBall","commit_stats":null,"previous_names":["cnmenghan/pyphysicsball"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CNMengHan%2FPyphysicsBall","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CNMengHan%2FPyphysicsBall/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CNMengHan%2FPyphysicsBall/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CNMengHan%2FPyphysicsBall/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CNMengHan","download_url":"https://codeload.github.com/CNMengHan/PyphysicsBall/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248696233,"owners_count":21147093,"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":["2d-physics","2d-physics-engine","ball-physics","collision-detection","educational-game","force-field","game-development","gravity-simulation","interactive","particle-system","physics-engine","physics-simulation","pygame","python","sandbox-game","simulation"],"created_at":"2025-01-21T07:13:09.126Z","updated_at":"2025-04-13T10:22:16.595Z","avatar_url":"https://github.com/CNMengHan.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PyphysicsBall 🎯\n\nA physics-based ball simulation sandbox built with Pygame, featuring realistic physics interactions and engaging gameplay mechanics.\n\n![License](https://img.shields.io/github/license/CNMengHan/PyphysicsBall)\n![Python](https://img.shields.io/badge/python-3.6+-blue.svg)\n![Pygame](https://img.shields.io/badge/pygame-2.0+-blue.svg)\n\n![Game Screenshot](img/!pyg20250112-061032.png)\n\n## 🎮 Features\n\n- **Realistic Physics**: Implements gravity, elastic collisions, and momentum conservation\n- **Interactive Controls**:\n  - Left-click to spawn or drag balls\n  - Right-click to toggle force field (push/pull)\n  - Double-click to clear an area\n- **Special Effects**:\n  - Golden balls that explode on impact\n  - Ball merging with visual feedback\n  - Dynamic color changes based on merges\n- **Dynamic Spawning System**: Automatic ball generation with size variations\n\n## 🚀 Installation\n\n1. Clone the repository:\n```bash\ngit clone https://github.com/CNMengHan/PyphysicsBall.git\ncd PyphysicsBall\n```\n\n2. Install required dependencies:\n```bash\npip install pygame\n```\n\n3. Run the game:\n```bash\npython main.py\n```\n\n## 🎯 How to Play\n\n- **Spawn Balls**: Left-click anywhere on the screen\n- **Drag Balls**: Click and hold on any ball to drag it\n- **Force Field**: \n  - Hold right-click to activate force field\n  - Right-click once to toggle between push/pull modes\n- **Clear Area**: Double-click to remove balls in the vicinity\n- **Watch for Special Balls**: Golden balls will explode on impact with the ground\n\n## 🛠️ Technical Details\n\n- Built with Python 3.6+ and Pygame 2.0+\n- Implements custom physics engine with:\n  - Velocity-based movement\n  - Gravity simulation\n  - Elastic collision detection\n  - Mass-based interactions\n  - Force field mechanics\n\n## 🤝 Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n\n1. Fork the repository\n2. Create your feature branch (`git checkout -b feature/AmazingFeature`)\n3. Commit your changes (`git commit -m 'Add some AmazingFeature'`)\n4. Push to the branch (`git push origin feature/AmazingFeature`)\n5. Open a Pull Request\n\n## 📝 License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## 🙏 Acknowledgments\n\n- Pygame community for the excellent gaming framework\n- Physics simulation inspiration from various open-source projects\n\n## 📞 Contact\n\n张梦涵 - [@CNMengHan](https://github.com/CNMengHan)\n\nProject Link: [https://github.com/CNMengHan/PyphysicsBall](https://github.com/CNMengHan/PyphysicsBall)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcnmenghan%2Fpyphysicsball","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcnmenghan%2Fpyphysicsball","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcnmenghan%2Fpyphysicsball/lists"}