{"id":26649803,"url":"https://github.com/non-npc/byte-clicker-incremental-game","last_synced_at":"2026-05-04T02:38:52.906Z","repository":{"id":282577530,"uuid":"949035664","full_name":"non-npc/Byte-Clicker-Incremental-Game","owner":"non-npc","description":"A practical example of combining Python with web technologies to create rich, responsive applications.","archived":false,"fork":false,"pushed_at":"2025-06-02T03:17:09.000Z","size":101,"stargazers_count":2,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-02T12:55:39.741Z","etag":null,"topics":["application","game","html-css-javascript","javascript","pyqt6","python","webview"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"cc0-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/non-npc.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-03-15T14:29:13.000Z","updated_at":"2025-06-02T03:17:13.000Z","dependencies_parsed_at":"2025-06-02T04:24:01.521Z","dependency_job_id":null,"html_url":"https://github.com/non-npc/Byte-Clicker-Incremental-Game","commit_stats":null,"previous_names":["non-npc/byte-clicker-incremental-game"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/non-npc/Byte-Clicker-Incremental-Game","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/non-npc%2FByte-Clicker-Incremental-Game","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/non-npc%2FByte-Clicker-Incremental-Game/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/non-npc%2FByte-Clicker-Incremental-Game/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/non-npc%2FByte-Clicker-Incremental-Game/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/non-npc","download_url":"https://codeload.github.com/non-npc/Byte-Clicker-Incremental-Game/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/non-npc%2FByte-Clicker-Incremental-Game/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32592719,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-03T22:12:39.696Z","status":"online","status_checked_at":"2026-05-04T02:00:06.625Z","response_time":58,"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":["application","game","html-css-javascript","javascript","pyqt6","python","webview"],"created_at":"2025-03-25T01:01:44.214Z","updated_at":"2026-05-04T02:38:52.900Z","avatar_url":"https://github.com/non-npc.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Byte Clicker\n\nA modern incremental clicker game that demonstrates how to build interactive desktop applications using Python and JavaScript. This project serves as a practical example of combining PyQt6's native capabilities with web technologies to create rich, responsive applications.\n\nThe game showcases:\n- Python backend for system operations and data persistence\n- JavaScript frontend for dynamic UI and game logic\n- Bidirectional communication between Python and JavaScript\n- Modern web technologies in a desktop environment\n- Real-time updates and state management\n\nClick to generate bytes and unlock various generators to automate your byte production!\n\n![Byte Clicker Screenshot](screenshot.png)\n\n## Architecture Overview\n\nThis project demonstrates several key concepts for hybrid Python-JavaScript applications:\n\n1. **Frontend-Backend Separation**\n   - JavaScript handles UI updates and game logic\n   - Python manages system operations and data persistence\n   - Clean separation of concerns for maintainability\n\n2. **Bridge Communication**\n   - Bidirectional Python-JavaScript communication via QWebChannel\n   - Asynchronous operations with promises\n   - Type-safe method calls between languages\n\n3. **Modern Development Practices**\n   - Event-driven architecture\n   - Real-time state management\n   - Responsive UI design\n   - Error handling across language boundaries\n\n## Features\n\n- Interactive clicking mechanism\n- Multiple generators with increasing production rates\n- Auto-save functionality\n- Performance metrics and statistics\n- Modern, responsive UI\n- Progress-based generator unlocking system\n\n## How to Play\n\n1. Click the green circle to generate bytes\n2. Purchase generators to automate byte production\n3. Unlock new generators by purchasing 5 of the previous generator\n4. Save your progress using the \"Save Game\" button\n5. Start fresh with the \"New Game\" button\n\n## Game Elements\n\n### Generators\n\n1. **Auto Clicker** - Basic automation\n2. **Byte Compiler** - Improved byte generation\n3. **Data Miner** - Efficient byte production\n4. **Quantum Computer** - Advanced computation\n5. **AI Cluster** - Massive parallel processing\n6. **Quantum Network** - Network-enhanced production\n7. **Digital Dimension** - Ultimate byte generation\n\n### Features\n\n- Auto-save every minute\n- Real-time statistics tracking\n- Performance metrics\n- Progression system\n- Modern UI with visual feedback\n\n## Save System\n\nThe game includes both automatic and manual save features to ensure your progress is never lost:\n\n### Auto-Save\n- Automatically saves your game progress every 60 seconds\n- Saves are stored in `clicker_save.json` in the game directory\n- Auto-save runs silently in the background without interrupting gameplay\n\n### Manual Save\n- Click the \"Save Game\" button at any time to manually save your progress\n- Visual feedback confirms successful saves with a temporary \"Saved!\" message\n- Recommended to manually save before exiting the game\n\n### Save File\n- Save data is stored in JSON format\n- Includes all game state:\n  - Current and total bytes\n  - Generator counts and states\n  - Game statistics\n  - Timestamps\n- Location: `clicker_save.json` in the game directory\n\n## Development\n\nThe game is built using:\n- PyQt6 for the application framework\n- JavaScript for game logic\n- HTML/CSS for the user interface\n- QWebChannel for Python-JavaScript communication\n\n## Bridge Interface\n\nThe game uses a Python-JavaScript bridge (via QWebChannel) to enable communication between the UI layer and the system layer:\n\n### Available Bridge Methods\n\n#### Game State Management\n- `save_game(game_state: str) -\u003e str`\n  - Saves the current game state to `clicker_save.json`\n  - Parameter: JSON string containing complete game state\n  - Returns: Success/error message\n  \n- `load_game() -\u003e str`\n  - Loads game state from `clicker_save.json`\n  - Returns: JSON string of saved game state or empty object if no save exists\n  \n#### System Functions\n- `show_about()`\n  - Displays the About dialog with game version and information\n  - Shows native system dialog with game details\n  \n- `exit_app()`\n  - Handles application exit with confirmation\n  - Shows confirmation dialog before quitting\n  - Prompts user to save if needed\n\n### Using the Bridge in JavaScript\n\n```javascript\n// Initialize bridge connection\nnew QWebChannel(qt.webChannelTransport, function(channel) {\n    window.bridge = channel.objects.bridge;\n    // Bridge is ready to use\n});\n\n// Example: Save game\nbridge.save_game(JSON.stringify(game_state))\n    .then(response =\u003e {\n        console.log(response); // \"Game saved successfully\"\n    });\n\n// Example: Load game\nbridge.load_game().then(saved_state =\u003e {\n    const game_state = JSON.parse(saved_state);\n    // Process loaded state\n});\n\n// Example: Show about dialog\nbridge.show_about();\n\n// Example: Exit application\nbridge.exit_app();\n```\n\n### Implementation Details\n\n- Bridge class: `WebBridge` in `main.py`\n- Communication protocol: QWebChannel\n- Data format: JSON for state transfer\n- Error handling: Try-catch blocks with error messages\n- Thread safety: All methods are synchronous and thread-safe\n\n## Requirements\n\n- Python 3.8 or higher\n- PyQt6\n- PyQtWebEngine\n\n## Installation\n\n1. Clone this repository:\n```bash\ngit clone https://github.com/non-npc/Byte-Clicker-Incremental-Game.git\ncd Byte-Clicker-Incremental-Game\n```\n\n2. Create a virtual environment:\n```bash\npython -m venv venv\n# On Windows:\nvenv\\Scripts\\activate\n# On macOS/Linux:\nsource venv/bin/activate\n```\n\n3. Install dependencies:\n```bash\npip install -r requirements.txt\n```\n\n## Running the Game\n\nTo start the game, run:\n```bash\npython main.py\n```\n\n## License\n\n[CC0 License](LICENSE) - Feel free to modify and distribute this code as you like! \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnon-npc%2Fbyte-clicker-incremental-game","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnon-npc%2Fbyte-clicker-incremental-game","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnon-npc%2Fbyte-clicker-incremental-game/lists"}