अपना ब्राउज़र गेम लाइए। बाकी हम जोड़ देंगे।
ऑनलाइन रूम, खिलाड़ी खाते, सहेजी गई प्रगति, 20 भाषाओं में स्टोर पेज और हमारा डेस्कटॉप ऐप, मुफ़्त। यहाँ प्रकाशित करना गैर-अनन्य है: आपका गेम कहीं और भी उपलब्ध रह सकता है।
सर्वर के बिना मल्टीप्लेयर
relay और lockstep रूम हमारी तरफ़ चलते हैं। आपका गेम बाइट भेजता है; रूम, आमंत्रण लिंक, कमांड का क्रम और बाद में जुड़ने वाले खिलाड़ी हम संभालते हैं।
खिलाड़ी, पहले से तैयार
मेहमान बिना साइन अप किए खेलते हैं, एक खाता हर गेम में चलता है, और प्रगति प्लेटफ़ॉर्म सहेजता है। सर्वर पर चलने वाले गेम रैंक हो सकते हैं, लीडरबोर्ड और टूर्नामेंट के साथ।
20 भाषाएँ, ब्राउज़र और डेस्कटॉप
आपका स्टोर पेज 20 भाषाओं में खिलाड़ियों तक पहुँचता है, दाएँ से बाएँ लिखी जाने वाली भाषाओं सहित। आपका गेम ब्राउज़र में और हमारे डेस्कटॉप ऐप में चलता है, और माँगने पर पॉइंटर लॉक, फ़ुलस्क्रीन और गेमपैड मिलते हैं।
यहाँ पहले से खेले जा रहे
स्वतंत्र डेवलपरों के गेम यहाँ हमारे जोड़े गए ऑनलाइन खेल के साथ चलते हैं, और हमारे अपने गेम भी वही अनुबंध इस्तेमाल करते हैं जो आपका गेम करेगा।
आपके स्टूडियो
अपने स्टूडियो देखने के लिए साइन इन करें।
साइन इन करेंयह कैसे काम करता है
आप अपना गेम JavaScript या TypeScript में एक छोटे से अनुबंध के अनुसार बनाते हैं: क्लाइंट के लिए एक 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 भाषाओं में अनुवाद करें। गेम के टेक्स्ट में अंग्रेज़ी ज़रूरी है; जितनी भाषाएँ हो सकें जोड़ें।
- नकली साइन-इन संकेत, प्लेटफ़ॉर्म डायलॉग या गेम से बाहर के लिंक नहीं। अपने गेम को ईमानदारी से रेट करें।