اپنا براؤزر گیم لائیں۔ باقی ہم شامل کر دیں گے۔
آن لائن رومز، کھلاڑیوں کے اکاؤنٹس، محفوظ پیش رفت، 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 زبانوں میں ترجمہ کریں۔ گیم کے متن میں انگریزی ضروری ہے؛ جتنی زبانیں ہو سکیں شامل کریں۔
- جعلی سائن اِن پیغامات، پلیٹ فارم جیسے ڈائیلاگ یا گیم سے باہر کے لنک نہیں۔ اپنے گیم کی ریٹنگ ایمانداری سے دیں۔