ブラウザゲームを持ってきてください。あとは私たちが用意します。
オンラインルーム、プレイヤーアカウント、進行状況の保存、20 言語のストアページ、デスクトップアプリをすべて無料で。ここでの公開は非独占なので、ほかの場所でも自由に配信できます。
サーバーなしでマルチプレイ
relay と lockstep のルームは私たちの側で動きます。ゲームはバイトを送るだけ。ルーム、招待リンク、コマンドの順序、途中参加は私たちが処理します。
プレイヤーはもう揃っています
ゲストは登録なしで遊べ、1 つのアカウントですべてのゲームを楽しめ、進行状況はプラットフォームが保存します。サーバーで動くゲームはランク対象にでき、ランキングやトーナメントも使えます。
20 言語、ブラウザとデスクトップ
ストアページは右から左に書く言語を含む 20 言語でプレイヤーに届きます。ゲームはブラウザでもデスクトップアプリでも動き、必要ならポインターロック、全画面、ゲームパッドも使えます。
すでにここで遊ばれています
独立系開発者のゲームが、私たちが追加したオンラインプレイ付きでここで動いています。私たち自身のゲームも、あなたのゲームと同じ契約を使っています。
あなたのスタジオ
ログインしてスタジオを表示します。
ログイン仕組み
ゲームは JavaScript または TypeScript で、1 つの小さな契約に沿って作ります。クライアント用の mount 関数と、必要であればサーバー用のゲームモジュールです。コマンドラインツールがビルド、チェック、アップロードを行います。
プレイヤーに公開される前に、チームがすべてのバージョンを審査します。OneCompanion はゲームをサンドボックス化されたフレームで配信します。ゲームはプレイヤーのアカウントを見ることはなく、ネットワークにはルーム経由でのみアクセスし、セーブデータはプラットフォームに保管されます。
マルチプレイヤー
- none
- ソロのみ、ルームなし。
- relay
- ルームがプレイヤー間でメッセージを中継します。協力ゲームやパーティーゲームに最適。ランク対象外。
- lockstep
- ルームが全プレイヤーのコマンドをステップごとに並べ、途中参加者のためにログを保持します。シミュレーションは決定論的である必要があります。ランク対象外。
- server
- 独自のゲームモジュールがルームと並んで動き、すべての結果を決定します。招待制。
コマンドラインから公開
スタジオページでトークンを作成し、ゲームのフォルダで次のコマンドを実行してください:
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 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 でもパッケージのインストールとスクリプトの実行はできますが、ツール自体は Bun 1.3 以降で動くため、どちらの場合も Bun をインストールしてください。
新しいゲームを始める
まだゲームがない?遊べる小さなテンプレートから始めましょう。solo、relay(プレイヤーが画面を共有)、lockstep(各プレイヤーが自分のユニットを指揮)から選べます。生成した時点でチェックに合格します。
bunx github:onecompanion-net/game-cli init my-game --template relay
cd my-game && bun install && bun run dev 翻訳:i18n コマンドは足りない言語を英語のコピーとして書き出し、AI コーディングツールに翻訳させるためのプロンプトを表示します。未翻訳のコピーはアップロードできません。
AI コーディングツールで統合
ゲームのフォルダを Claude Code、Cursor、GitHub Copilot などの AI コーディングツールで開き、このプロンプトを渡してください。ガイドを読み、ゲームをプラットフォームに合わせて調整し、チェックしたうえで、公開の手前で止まります。
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. <my-studio-handle> をスタジオのハンドルに置き換えるか、ハンドルが入力済みのプロンプトをスタジオページからコピーしてください。
スタジオのトークンを AI チャットに貼り付けないでください。公開するときに、自分のターミナルで設定してください。
ルール
- ゲーム内のすべてを自分で所有するかライセンスを取得し、他者から使用したものは明記してください。
- ストアの掲載情報は 12 言語すべてに翻訳してください。ゲーム内テキストは英語が必須で、できるだけ多くの言語を追加してください。
- 偽のログイン画面、プラットフォームを装ったダイアログ、ゲーム外へのリンクは禁止です。レーティングは正直に設定してください。