Skip to main content

Quick Start

Build a multiplayer game for the Rune platform and its millions of players. Rune handles netcode, servers, voice chat, matchmaking, spectating, and much more.


Create a new Rune game project by running:

npx rune-games-cli@latest create

or add the SDK to an existing game by including it in your index.html above any other JS scripts:

<script src=""></script>

Game Logic

Create a file named logic.js with a setup function that returns initial values for your game state that should be synced across players. Add an action that modifies this game state and call Rune.initLogic() to initialize. For instance, to give all players a score and have an action that just increments the score:

// logic.js

minPlayers: 1,
maxPlayers: 4,
setup: (allPlayerIds) => {
const game = { scores: {} }
for (let playerId of allPlayerIds) {
game.scores[playerId] = 0
return game
actions: {
incrementScore(playerWhoGotPoints, { game }) {


Next, integrate your game UI to react to game state changes and send actions to the logic layer. This code may live anywhere except in logic.js; the docs will refer to client.js:

// client.js

// Your game setup code...

// Trigger an action based on user input
button.onClick = () => {
playerWhoGotPoints: "player1",

// Callback you define for when something changes (e.g. someone made an action)
function onChange({ oldGame, newGame, yourPlayerId, players, action, event }) {
// Your game visuals update code...

// Initialize the Rune SDK once your game is fully ready
Rune.initClient({ onChange })

Next Steps