Trae tu juego de navegador. Nosotros ponemos el resto.
Salas en línea, cuentas de jugador, progreso guardado, una página de tienda en 20 idiomas y nuestra app de escritorio, gratis. Publicar aquí no es exclusivo: tu juego puede estar en cualquier otro sitio también.
Multijugador sin servidores
Las salas relay y lockstep funcionan de nuestro lado. Tu juego envía bytes; nosotros nos encargamos de las salas, los enlaces de invitación, el orden de los comandos y quienes llegan tarde.
Jugadores, ya listos
Los invitados juegan sin registrarse, una cuenta sirve para todos los juegos y la plataforma guarda el progreso. Los juegos que corren en servidor pueden ser clasificatorios, con clasificaciones y torneos.
20 idiomas, navegador y escritorio
Tu página de tienda llega a jugadores en 20 idiomas, incluidos los de derecha a izquierda. Tu juego funciona en el navegador y en nuestra app de escritorio, con bloqueo del puntero, pantalla completa y mandos cuando los pidas.
Ya se juegan aquí
Juegos de desarrolladores independientes funcionan aquí con el juego en línea que añadimos, y nuestros propios juegos usan el mismo contrato que usará el tuyo.
Tus estudios
Inicia sesión para ver tus estudios.
Iniciar sesiónCómo funciona
Creas tu juego en JavaScript o TypeScript siguiendo un contrato pequeño: una función mount para el cliente y, si tu juego lo necesita, un módulo de juego para el servidor. Nuestra herramienta de línea de comandos lo compila, lo revisa y lo sube.
Nuestro equipo revisa cada versión antes de que la vean los jugadores. OneCompanion ejecuta tu juego en un marco aislado: nunca ve las cuentas de los jugadores, solo llega a la red a través de su sala y guarda sus datos en la plataforma.
Multijugador
- none
- Solo un jugador, sin salas.
- relay
- La sala reenvía mensajes entre jugadores. Ideal para juegos cooperativos y de fiesta. Sin clasificación.
- lockstep
- La sala ordena los comandos de cada jugador por pasos y guarda el registro para quien llega tarde. Tu simulación debe ser determinista. Sin clasificación.
- server
- Tu propio módulo de juego se ejecuta junto a la sala y decide cada resultado. Por invitación.
Publica desde la línea de comandos
Crea un token en la página de tu estudio y ejecuta estos comandos en la carpeta de tu juego:
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 instala los paquetes y ejecuta los scripts, pero las herramientas funcionan con Bun 1.3 o posterior, así que instala Bun de todos modos.
Empieza un juego nuevo
¿Aún no tienes juego? Empieza con una pequeña plantilla jugable: solo, relay (los jugadores comparten pantalla) o lockstep (cada jugador dirige su propia unidad). Pasa las comprobaciones tal como se genera.
bunx github:onecompanion-net/game-cli init my-game --template relay
cd my-game && bun install && bun run dev Traducciones: el comando i18n crea cada idioma que falta como copia del inglés e imprime una instrucción para que tu herramienta de programación con IA lo traduzca. Las subidas rechazan las copias sin traducir.
Intégralo con una herramienta de programación con IA
Abre la carpeta de tu juego en Claude Code, Cursor, GitHub Copilot u otra herramienta de programación con IA y dale este prompt. Leerá nuestra guía, adaptará tu juego a la plataforma, lo comprobará y se detendrá antes de publicar.
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. Sustituye <my-studio-handle> por el identificador de tu estudio, o copia el prompt desde la página de tu estudio, donde ya viene completado.
Nunca pegues el token de tu estudio en un chat con IA. Configúralo en tu propia terminal cuando publiques.
Normas
- Sé dueño o ten licencia de todo lo que hay en tu juego, e indica lo que usas de otros.
- Traduce la ficha de la tienda a los 12 idiomas. El texto del juego necesita inglés; añade todos los idiomas que puedas.
- Nada de avisos de inicio de sesión falsos, diálogos de la plataforma ni enlaces fuera del juego. Clasifica tu juego con honestidad.