A simple multiuser typing game using client authoratative networking with WebSockets in a Discord Activity.
- Create a Discord Application: https://discord.com/developers/docs/activities/building-an-activity#step-1-creating-a-new-app
- Copy the contents of the
.example.env
files in theclient
andserver
folders to new.env
files in the same location. Set theVITE_CLIENT_ID
andCLIENT_SECRET
environment variables to that of your Discord Application.
From the client
directory:
npm install
npm run dev
From the server
directory: go run .
For debugging purposes, using Discord from a browser (https://discord.com/app) is recommended. Discord Activities can be accessed in a voice call or voice channel of a server.
See: https://discord.com/developers/docs/activities/development-guides#run-your-application-locally
- Extract translation and login functionality out of server and into Cloudflare Workers
- TypingInput component adapted from https://github.com/thisissteven/monkeytype-clone
- Sprites - https://kooky.itch.io/pixel-train
- Soundtrack - Levente Ungvari