OneCompanion

Developers

Publish your browser game on OneCompanion.

Read the developer guide

Bring a browser game. We add the rest.

Online rooms, player accounts, saved progress, a store page in 20 languages and our desktop app, free. Publishing here is non-exclusive: your game can live anywhere else too.

  • Multiplayer without servers

    Relay and lockstep rooms run on our side. Your game sends bytes; we handle rooms, invite links, command order and late joiners.

  • Players, ready-made

    Guests play without signing up, one account works across every game, and saved progress is kept by the platform. Server-run games can be ranked, with leaderboards and tournaments.

  • 20 languages, browser and desktop

    Your store page reaches players in 20 languages, right-to-left included. Your game runs in the browser and in our desktop app, with pointer lock, fullscreen and gamepads when you ask for them.

Already playing here

Games by independent developers run here with online play we added, and our own games use the same contract yours will.

Your studios

Sign in to see your studios.

Sign in

How it works

You build your game in JavaScript or TypeScript against one small contract: a mount function for the client and, if your game needs one, a game module for the server. Our command-line tool builds it, checks it and uploads it.

Our team reviews every version before players see it. OneCompanion serves your game in a sandboxed frame: it never sees players' accounts, reaches the network only through its room, and keeps its saved data with the platform.

Multiplayer

none
Solo only, no rooms.
relay
The room passes messages between players. Good for co-op and party games. Unranked.
lockstep
The room orders every player's commands by step and keeps the log for late joiners. Your simulation must be deterministic. Unranked.
server
Your own game module runs next to the room and decides every outcome. By invitation.

Publish from the command line

Create a token on your studio page, then run these commands in your game's folder:

With Bun

git clone https://github.com/onecompanion-net/sample-game
cd sample-game && bun install
bun run validate
export ONECOMPANION_API=https://onecompanion.net
export ONECOMPANION_TOKEN=oc_…
bun run publish:game

With npm

git clone https://github.com/onecompanion-net/sample-game
cd sample-game && npm install
npm run validate
export ONECOMPANION_API=https://onecompanion.net
export ONECOMPANION_TOKEN=oc_…
npm run publish:game

npm installs the packages and runs the scripts, but the tools themselves run on Bun 1.3 or later, so install Bun either way.

Start a new game

No game yet? Start from a small playable template: solo, relay (players share a screen) or lockstep (each player commands their own unit). It passes the checks as generated.

bunx github:onecompanion-net/game-cli init my-game --template relay
cd my-game && bun install && bun run dev

Translations: the i18n command writes each missing language as a copy of English and prints a prompt for your AI coding tool to translate them. Uploads refuse untranslated copies.

Read the developer guide

Integrate with an AI coding tool

Open your game's folder in Claude Code, Cursor, GitHub Copilot or another AI coding tool and give it this prompt. It reads our guide, adapts your game to the platform, checks it and stops before publishing.

I want to publish my browser game on OneCompanion (https://onecompanion.net), which hosts it, lists it in its catalog and runs its multiplayer rooms. Help me integrate this project with the platform and get it ready to upload.

1. Read the developer guide first: https://onecompanion.net/developers/guide.md. It is the contract; where my code disagrees with it, the guide wins. When unsure, compare with the sample game: https://github.com/onecompanion-net/sample-game.
   Use the OneCompanion integration skill as well: https://github.com/onecompanion-net/skills (the skill is skills/onecompanion-integration). If it is not installed in this tool, read its SKILL.md and the reference files it points to; use its templates (contract, client, relay, lockstep, dev host) instead of writing them from scratch.
2. Study this project and show me a short plan before you change anything: the engine, how the game starts and what it draws into, where its text lives, how it saves, any network code, and which room kind fits (none, relay or lockstep; server only if we were invited).
3. Integrate without breaking how the game runs today:
   - Add game.json with "studio": "<my-studio-handle>", an "id" I approve (it becomes the URL and can never be reused) and "version": "1.0.0".
   - Add a client entry that exports mount(host, options) and returns { onMessage, pause, resume, dispose }. Copy the types from the guide into src/contract.ts; import nothing from the platform. Draw only inside host, send onEvent({ type: 'ready' }) after the first frame, and make dispose() undo everything (animation loops, timers, listeners, DOM nodes, WebGL contexts, audio, workers).
   - Move every player-facing string into messages/en.json and show it through options.t (ICU plurals for counts). Lay out with CSS logical properties so right-to-left works.
   - Save with options.storage instead of localStorage, IndexedDB or cookies. Remove fetch and WebSocket calls to other hosts; load our own files with relative URLs.
   - For multiplayer, send with options.online.send and receive in onMessage, using the guide's byte formats exactly, and validate every message. For lockstep, keep the simulation deterministic (the room's seed, no Math.random() or clock).
   - Write listing/en.json (with "play" and "modes" lines if they fit the game); step 6 translates it. Prepare the art at the sizes in the guide, set the rating, and list every third-party asset and its licence under rights.
   - Keep the client entry and its static imports under 450 KB gzip; load the rest with dynamic import().
4. Add the CLI as a dev dependency from GitHub, never from the npm registry by name: "bun add -d github:onecompanion-net/game-cli" (or "npm install -D github:onecompanion-net/game-cli"). Add the scripts "validate": "onecompanion-game validate .", "i18n": "onecompanion-game i18n ." and "publish:game": "onecompanion-game publish .". The tools need Bun 1.3 or later even when I use npm.
5. Copy the sample's dev page (index.html and src/dev.ts) so I can test solo, with ?net=room in two tabs, and with &lang=vi and &dir=rtl.
6. Run the i18n script and translate every file it marks "$untranslated" (the 12 launch store locales are required; in-game languages are up to me), removing the marker from each file you finish. Then run the skill's preflight check (node <skill folder>/scripts/preflight.mjs ., from an installed or cloned copy of the skill), then the validate script, and fix every issue until both pass.
7. Then stop. Tell me what you changed, what you could not do and what I should check by hand. Do not publish: I will set ONECOMPANION_API=https://onecompanion.net and ONECOMPANION_TOKEN in my own terminal and run the publish:game script. Never ask for the token, print it, write it to a file or commit it.

Replace <my-studio-handle> with your studio's handle, or copy the prompt from your studio page, where it is filled in.

Never paste your studio token into an AI chat. Set it in your own terminal when you publish.

Rules

  • Own or license everything in your game, and list what you use from others.
  • Translate the store listing into all 12 languages. In-game text needs English; add every language you can.
  • No fake sign-in prompts, platform dialogs or links out of the game. Rate your game honestly.