Generate a Game
tip
Understand what UrTurn is and isn't.
Create Gameโ
npx @urturn/runner init my-game # generates new game files
cd my-game
npm run dev # run the game locally
File/Folder structureโ
game
โ package.json # npm package specification for dependencies for your room functions (includes @urturn/runner for local development)
โ
โโโโ.github/workflows # contains important GitHub actions that create a build artifact for UrTurn to use
โ
โโโโsrc
โ โ main.js # room functions (e.g. onRoomStart, onPlayerMove, etc.)
โ
โโโโfrontend # holds all the files related to your game frontend
โ package.json # npm package specification for dependencies on your frontend (includes @urturn/client)
โ ...your frontend files
GitHub Actions in .github/workflows
โ
tip
No GitHub Actions experience needed!
We've already done the hard work for you. When you ran npx @urturn/runner init my-game
, the correct github actions were created for you.
When you push
to main
branch of your repo on GitHub, the actions will automatically create the correct Artifact structure on the published
branch, which you will use to deploy to production.