{"id":23209469,"url":"https://github.com/squiddy/pyxel-reload","last_synced_at":"2025-07-16T17:32:35.262Z","repository":{"id":267867947,"uuid":"902567282","full_name":"squiddy/pyxel-reload","owner":"squiddy","description":"A hot-reloading development tool for Pyxel games that automatically refreshes your game when code or asset files change.","archived":false,"fork":false,"pushed_at":"2025-01-11T10:31:23.000Z","size":289,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-02T13:50:44.110Z","etag":null,"topics":["game-development","pyxel"],"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/squiddy.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":"2024-12-12T20:28:03.000Z","updated_at":"2025-01-11T10:31:26.000Z","dependencies_parsed_at":null,"dependency_job_id":"8bcb6bac-0c72-4d86-827a-493b9646ced8","html_url":"https://github.com/squiddy/pyxel-reload","commit_stats":null,"previous_names":["squiddy/pyxel-reload"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/squiddy/pyxel-reload","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/squiddy%2Fpyxel-reload","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/squiddy%2Fpyxel-reload/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/squiddy%2Fpyxel-reload/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/squiddy%2Fpyxel-reload/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/squiddy","download_url":"https://codeload.github.com/squiddy/pyxel-reload/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/squiddy%2Fpyxel-reload/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265527552,"owners_count":23782480,"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":["game-development","pyxel"],"created_at":"2024-12-18T18:17:34.530Z","updated_at":"2025-07-16T17:32:35.223Z","avatar_url":"https://github.com/squiddy.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pyxel-reload\n\nA hot-reloading development tool for [Pyxel](https://github.com/kitao/pyxel) games that automatically refreshes your game when code or asset files change.\n\n## Features\n\n- Hot reloading of Python code changes\n- Automatic reloading when .pyxres asset files change\n- Error display in both console and game window\n- Simple integration with existing Pyxel games\n\n## Installation\n\nInstall via pip:\n\n```bash\npip install pyxel-reload\n```\n\n## Usage\n\n1. Ensure your game file has an `update` and `draw` function\n\n```python\nimport pyxel\n\npyxel.init(160, 120)\n\ndef update():\n    if pyxel.btnp(pyxel.KEY_Q):\n        pyxel.quit()\n\ndef draw():\n    pyxel.cls(0)\n    pyxel.text(10, 10, \"Hello, Pyxel!\", pyxel.frame_count % 16)\n\npyxel.run(update, draw)\n```\n\n2. Run your game with pyxel-reload:\n\n```bash\npyxel-reload game\n```\n\nWhere `game` is the name of your Python module (without the .py extension).\n\n3. Make changes to your code or .pyxres files and see them reload automatically!\n\n## Error Handling\n\nWhen errors occur during reload:\n- Error details are displayed in the console\n- A basic error message appears in the game window\n- The game continues running and will reload once errors are fixed\n\n![](error-overlay.png)\n\n## Run code before reload\n\nIf you need to run some code before the game is reloaded, you can define a\n`on_unload` function in your game module:\n\n```python\n\ndef on_unload():\n    stop_music()\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsquiddy%2Fpyxel-reload","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsquiddy%2Fpyxel-reload","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsquiddy%2Fpyxel-reload/lists"}