আপনার ব্রাউজার গেম নিয়ে আসুন। বাকিটা আমরা যোগ করব।
অনলাইন রুম, খেলোয়াড় অ্যাকাউন্ট, সংরক্ষিত অগ্রগতি, ২০টি ভাষায় স্টোর পেজ আর আমাদের ডেস্কটপ অ্যাপ, বিনামূল্যে। এখানে প্রকাশ করা একচেটিয়া নয়: আপনার গেম অন্য যেকোনো জায়গাতেও থাকতে পারে।
সার্ভার ছাড়াই মাল্টিপ্লেয়ার
relay আর lockstep রুম আমাদের দিকে চলে। আপনার গেম বাইট পাঠায়; রুম, আমন্ত্রণ লিংক, কমান্ডের ক্রম আর দেরিতে যোগ দেওয়া খেলোয়াড় আমরা সামলাই।
খেলোয়াড়, আগে থেকেই প্রস্তুত
অতিথিরা সাইন আপ ছাড়াই খেলেন, একটি অ্যাকাউন্ট সব গেমে চলে, আর অগ্রগতি প্ল্যাটফর্ম সংরক্ষণ করে। সার্ভারে চলা গেম র্যাঙ্কড হতে পারে, লিডারবোর্ড ও টুর্নামেন্টসহ।
২০টি ভাষা, ব্রাউজার ও ডেস্কটপ
আপনার স্টোর পেজ ২০টি ভাষায় খেলোয়াড়দের কাছে পৌঁছায়, ডান থেকে বামে লেখা ভাষাসহ। আপনার গেম ব্রাউজারে ও আমাদের ডেস্কটপ অ্যাপে চলে, চাইলে পয়েন্টার লক, ফুলস্ক্রিন ও গেমপ্যাডসহ।
এখানে ইতিমধ্যে খেলা হচ্ছে
স্বাধীন ডেভেলপারদের গেম এখানে আমাদের যোগ করা অনলাইন খেলাসহ চলে, আর আমাদের নিজেদের গেমও সেই একই চুক্তি ব্যবহার করে যা আপনার গেম করবে।
আপনার স্টুডিও
আপনার স্টুডিও দেখতে সাইন ইন করুন।
সাইন ইনএটি কীভাবে কাজ করে
আপনি 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 চ্যাটে পেস্ট করবেন না। প্রকাশের সময় নিজের টার্মিনালে সেটি সেট করুন।
নিয়ম
- গেমের সবকিছুর মালিক হোন বা লাইসেন্স রাখুন, এবং অন্যের যা ব্যবহার করেছেন তার তালিকা দিন।
- স্টোরের বিবরণ ১২টি ভাষাতেই অনুবাদ করুন। গেমের লেখায় ইংরেজি থাকতেই হবে; যত ভাষা পারেন যোগ করুন।
- ভুয়া সাইন-ইন অনুরোধ, প্ল্যাটফর্মের ডায়ালগ বা গেমের বাইরের লিংক চলবে না। সততার সঙ্গে গেমের রেটিং দিন।