{"id":14963921,"url":"https://github.com/phaserjs/discord-multiplayer-template","last_synced_at":"2025-10-19T08:32:15.919Z","repository":{"id":238726543,"uuid":"780900428","full_name":"phaserjs/discord-multiplayer-template","owner":"phaserjs","description":"A quickstart Phaser template for creating multiplayer Discord Activities","archived":false,"fork":false,"pushed_at":"2025-01-10T17:10:25.000Z","size":2170,"stargazers_count":23,"open_issues_count":0,"forks_count":8,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-29T11:11:23.321Z","etag":null,"topics":["canvas","colyseus","discord","game","multiplayer","phaser","webgl","websockets"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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-04-02T11:26:16.000Z","updated_at":"2025-01-10T17:10:28.000Z","dependencies_parsed_at":"2024-05-10T14:54:16.766Z","dependency_job_id":"59d3540f-70ff-4362-9b5f-f3a7c1e1e873","html_url":"https://github.com/phaserjs/discord-multiplayer-template","commit_stats":{"total_commits":60,"total_committers":2,"mean_commits":30.0,"dds":"0.033333333333333326","last_synced_commit":"17b6a716184042c7d80e486286d21ec25fc9f995"},"previous_names":["phaserjs/discord-multiplayer-template"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phaserjs%2Fdiscord-multiplayer-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phaserjs%2Fdiscord-multiplayer-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phaserjs%2Fdiscord-multiplayer-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phaserjs%2Fdiscord-multiplayer-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/phaserjs","download_url":"https://codeload.github.com/phaserjs/discord-multiplayer-template/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":237092909,"owners_count":19254304,"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","colyseus","discord","game","multiplayer","phaser","webgl","websockets"],"created_at":"2024-09-24T13:32:19.825Z","updated_at":"2025-10-19T08:32:10.198Z","avatar_url":"https://github.com/phaserjs.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Phaser Discord Multiplayer Games Template\n\nThis project template is designed to be used in conjunction with our [Creating Multiplayer Discord Games with Phaser](https://phaser.io/tutorials/creating-multiplayer-discord-games-with-phaser) tutorial. It provides a starting point for creating multiplayer games on Discord with Colyseus and Phaser, utilising their new Embedded App SDK.\n\n## Requirements\n\nYou need to have Node.js v21 or higher version.\n\n## Template Project Structure\n\nWe have provided a default project structure to get you started. This is as follows:\n\n- `packages/client` - Contains the game \u0026 Discord SDK source code.\n- `packages/client/src/main.ts` - The main entry point for the client. This contains the game \u0026 Discord SDK configuration which starts the game.\n- `packages/client/src/scenes/` - The Phaser Scenes are in this folder.\n- `packages/client/public/assets/` - Contains game assets(sprites, sounds, spritesheets, etc).\n- `packages/client/src/utils` - Contains custom code for responsivity of the game.\n- `packages/server/server.ts` - Contains Discord SDK for OAuth2 \u0026 initiates WebSocket server for Colyseus.\n- `packages/server/rooms/GameRoom.ts` - Contains game session, channels communication between client/server.\n- `packages/server/schemas/GameState.ts` - Defines the structure and types of data that can be synchronized between the server and client.\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-multiplayer-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphaserjs%2Fdiscord-multiplayer-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphaserjs%2Fdiscord-multiplayer-template/lists"}