{"id":14963918,"url":"https://github.com/phaserjs/discord-template","last_synced_at":"2025-10-19T08:32:09.094Z","repository":{"id":230092954,"uuid":"775468665","full_name":"phaserjs/discord-template","owner":"phaserjs","description":"A quickstart Phaser template for creating playable Discord Activities","archived":false,"fork":false,"pushed_at":"2024-11-14T17:07:02.000Z","size":1605,"stargazers_count":19,"open_issues_count":1,"forks_count":7,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-01-29T11:11:25.270Z","etag":null,"topics":["canvas","discord","game","phaser","phaserjs","webgl"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/phaserjs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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-03-21T12:56:46.000Z","updated_at":"2024-11-26T06:55:31.000Z","dependencies_parsed_at":null,"dependency_job_id":"30cbf16b-7065-47fb-bdb0-6f9d27b34d24","html_url":"https://github.com/phaserjs/discord-template","commit_stats":{"total_commits":23,"total_committers":3,"mean_commits":7.666666666666667,"dds":0.3913043478260869,"last_synced_commit":"110c343d55271e5aeb3672ccbc34cdd4080a86c0"},"previous_names":["phaserjs/discord-template"],"tags_count":0,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phaserjs%2Fdiscord-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phaserjs%2Fdiscord-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phaserjs%2Fdiscord-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phaserjs%2Fdiscord-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/phaserjs","download_url":"https://codeload.github.com/phaserjs/discord-template/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":237092889,"owners_count":19254298,"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":["canvas","discord","game","phaser","phaserjs","webgl"],"created_at":"2024-09-24T13:32:19.606Z","updated_at":"2025-10-19T08:32:08.501Z","avatar_url":"https://github.com/phaserjs.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Phaser Discord Games Template\n\nThis Project Template is a great starting point for creating games on Discord with Phaser, utilising their new Embedded App SDK. It helps you seamlessly integrate custom games and activities into your Discord server, fostering community engagement, interaction, and fun.\n\nWe have a [comprehensive tutorial](https://phaser.io/tutorials/creating-discord-games-with-phaser) you can read on the Phaser site, which includes the steps required to create a Discord App and get your Phaser game running as an activity within it.\n\nPlease work through our tutorial, as it was written to go with this template repository to get you up and running fast.\n\n## Template Project Structure\n\nWe have provided a default project structure to get you started. This is as follows:\n\n- `client` - Contains the game \u0026 Discord SDK source code.\n- `client/main.js` - The main entry point for the client. This contains the game \u0026 Discord SDK configuration which starts the game.\n- `client/scenes/` - The Phaser Scenes are in this folder.\n- `client/assets/` - Contains game assets(sprites, sounds, spritesheets, etc).\n- `server/server.js` - Contains Discord SDK for OAuth2 connection\n\n## Handling Assets\n\nVite supports loading assets via JavaScript module `import` statements.\n\nThis template provides support for both embedding assets and also loading them from a static folder. To embed an asset, you can import it at the top of the JavaScript file you are using it in:\n\n```js\nimport logoImg from './assets/logo.png'\n```\n\nTo load static files such as audio files, videos, etc place them into the `client/assets` folder. Then you can use this path in the Loader calls within Phaser:\n\n```js\npreload ()\n{\n    //  This is an example of an imported bundled image.\n    //  Remember to import it at the top of this file\n    this.load.image('logo', logoImg);\n\n    //  This is an example of loading a static image\n    //  from the public/assets folder:\n    this.load.image('background', 'assets/bg.png');\n}\n```\n\nWhen you issue the `npm run build` command, all static assets are automatically copied to the `dist/assets` folder.\n\n## Customizing the Template\n\n### Vite\n\nIf you want to customize your build, such as adding plugin (i.e. for loading CSS or fonts), you can modify the `client/vite.config.js` file for cross-project changes, or you can modify and/or create new configuration files and target them in specific npm tasks inside of `package.json`. Please see the [Vite documentation](https://vitejs.dev/) for more information.\n\n## Join the Phaser Community!\n\nWe love to see what developers like you create with Phaser! It really motivates us to keep improving. So please join our community and show-off your work 😄\n\n**Visit:** The [Phaser website](https://phaser.io) and follow on [Phaser Twitter](https://twitter.com/phaser_)\u003cbr /\u003e\n**Play:** Some of the amazing games [#madewithphaser](https://twitter.com/search?q=%23madewithphaser\u0026src=typed_query\u0026f=live)\u003cbr /\u003e\n**Learn:** [API Docs](https://newdocs.phaser.io), [Support Forum](https://phaser.discourse.group/) and [StackOverflow](https://stackoverflow.com/questions/tagged/phaser-framework)\u003cbr /\u003e\n**Discord:** Join us on [Discord](https://discord.gg/phaser)\u003cbr /\u003e\n**Code:** 2000+ [Examples](https://labs.phaser.io)\u003cbr /\u003e\n**Read:** The [Phaser World](https://phaser.io/community/newsletter) Newsletter\u003cbr /\u003e\n\nCreated by [Phaser Studio](mailto:support@phaser.io). Powered by coffee, anime, pixels and love.\n\nThe Phaser logo and characters are \u0026copy; 2011 - 2024 Phaser Studio Inc.\n\nAll rights reserved.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphaserjs%2Fdiscord-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphaserjs%2Fdiscord-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphaserjs%2Fdiscord-template/lists"}