OneCompanion

Sviluppatori

Pubblica il tuo gioco per browser su OneCompanion.

Leggi la guida per sviluppatori

Porta il tuo gioco per browser. Al resto pensiamo noi.

Stanze online, account giocatore, progressi salvati, una pagina nello store in 20 lingue e la nostra app desktop, gratis. Pubblicare qui non è esclusivo: il tuo gioco può stare anche altrove.

  • Multigiocatore senza server

    Le stanze relay e lockstep girano da noi. Il tuo gioco invia byte; noi gestiamo stanze, link di invito, ordine dei comandi e chi arriva in ritardo.

  • Giocatori, già pronti

    Gli ospiti giocano senza registrarsi, un solo account vale per tutti i giochi e la piattaforma conserva i progressi. I giochi eseguiti sul server possono essere classificati, con classifiche e tornei.

  • 20 lingue, browser e desktop

    La tua pagina nello store raggiunge i giocatori in 20 lingue, comprese quelle da destra a sinistra. Il gioco funziona nel browser e nella nostra app desktop, con blocco del puntatore, schermo intero e controller quando li richiedi.

Già giocati qui

Giochi di sviluppatori indipendenti girano qui con il gioco online che abbiamo aggiunto, e i nostri giochi usano lo stesso contratto che userà il tuo.

I tuoi studi

Accedi per vedere i tuoi studi.

Accedi

Come funziona

Crei il tuo gioco in JavaScript o TypeScript seguendo un piccolo contratto: una funzione mount per il client e, se il gioco ne ha bisogno, un modulo di gioco per il server. Il nostro strumento a riga di comando lo compila, lo verifica e lo carica.

Il nostro team esamina ogni versione prima che i giocatori la vedano. OneCompanion serve il tuo gioco in un frame isolato: non vede mai gli account dei giocatori, accede alla rete solo tramite la sua stanza e conserva i dati salvati sulla piattaforma.

Multiplayer

none
Solo giocatore singolo, niente stanze.
relay
La stanza passa i messaggi tra i giocatori. Ottimo per giochi co-op e party game. Non classificato.
lockstep
La stanza ordina i comandi di ogni giocatore per passo e conserva il log per chi entra tardi. La tua simulazione deve essere deterministica. Non classificato.
server
Il tuo modulo di gioco gira accanto alla stanza e decide ogni esito. Su invito.

Pubblica dalla riga di comando

Crea un token nella pagina del tuo studio, poi esegui questi comandi nella cartella del gioco:

Con 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

Con 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 installa i pacchetti ed esegue gli script, ma gli strumenti stessi girano su Bun 1.3 o successivo, quindi installa Bun in ogni caso.

Inizia un nuovo gioco

Nessun gioco ancora? Parti da un piccolo modello giocabile: solo, relay (i giocatori condividono lo schermo) o lockstep (ogni giocatore comanda la propria unità). Supera i controlli appena generato.

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

Traduzioni: il comando i18n scrive ogni lingua mancante come copia dell'inglese e stampa un prompt perché il tuo strumento di programmazione con IA le traduca. I caricamenti rifiutano le copie non tradotte.

Leggi la guida per sviluppatori

Integra con uno strumento di coding IA

Apri la cartella del gioco in Claude Code, Cursor, GitHub Copilot o un altro strumento di coding IA e dagli questo prompt. Legge la nostra guida, adatta il gioco alla piattaforma, lo verifica e si ferma prima della pubblicazione.

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.

Sostituisci <my-studio-handle> con l'handle del tuo studio, o copia il prompt dalla pagina del tuo studio, dove è già compilato.

Non incollare mai il token del tuo studio in una chat IA. Impostalo nel tuo terminale quando pubblichi.

Regole

  • Possiedi o hai in licenza tutto ciò che c'è nel gioco, ed elenca ciò che usi di altri.
  • Traduci la scheda del negozio in tutte le 12 lingue. I testi in gioco richiedono l'inglese; aggiungi tutte le lingue che puoi.
  • Niente finte richieste di accesso, finestre della piattaforma o link fuori dal gioco. Classifica il tuo gioco onestamente.