For game developers
How to publish your game on MRIYU: developer dashboard, SDK, saves, leaderboards and online multiplayer.
Anyone can add their browser game to Games. Players launch it right inside MRIYU and invite friends, and the game gets their names, cloud saves, a leaderboard and rooms for playing online.
How to publish a game
- Make the game on your own website — the page must open over https.
- Add the SDK to the game page:
<script src="https://mriyu.com/sdk/v1.js"></script>. - Open Games → Publish a game (or the
/developerspage) and click New game. - Enter the name, game URL, genre and a short description, add an icon (a square from 256×256) and, optionally, a 16:9 cover and up to 6 screenshots.
- Try the game with Open — it's available to you before it's published.
- Click Send for review. Once a moderator approves it, the game appears in Games under From developers.
Not sure what to put in your game? Open it in the dashboard → the Setup tab (the How to connect button). You’ll find ready code for your game with a Copy button or a template file, an SDK connected check mark once the game talks to MRIYU, and ready examples for saves, leaderboards, friends and multiplayer. A token and a secret are only needed if your game has its own server.
| Status | Meaning |
|---|---|
| Draft | Only you can see the game. |
| In review | A moderator is checking the game. |
| Published | The game is in the catalog for everyone. |
| Rejected | Read the Moderator's comment, fix it and send it again. |
| Blocked | The game was removed from the catalog and can't be edited. |
If you change the URL of a published game, it goes back to review.
The dashboard shows stats: Players, New in 30 days, Played in 30 days and Launches.
SDK: what a game can do
All methods return a Promise. Call MRIYU.init() first — it returns the player (user.id, user.name, user.avatar, user.lang).
| Method | What it does |
|---|---|
MRIYU.init() |
Handshake with the site: the game, the player, the room from an invite (launch.room). |
MRIYU.getFriends() |
The player's friends; plays — whether they've launched the game. |
MRIYU.invite(id, {room, text}) |
Invites a friend via a private message with a link to the game. |
MRIYU.storage.get(key) / set(key, value) / remove(key) / keys() |
Cloud saves: up to 50 keys per player, up to 64 KB each. |
MRIYU.leaderboard.submit(score, {board}) |
The player's score; the best one is kept. |
MRIYU.leaderboard.top({board, limit, friends}) |
The leaderboard, up to 100 rows; friends: true — friends only. |
MRIYU.getLaunchToken() |
A token for verifying the player on your game server. |
MRIYU.multiplayer.connect() |
Connects to rooms for online play. |
The game never gets the real page id: each player has a separate 16-character id in each game.
Online multiplayer
Turn on Online multiplayer in the game settings and set how many players a room holds (2–16). You don't need your own server — MRIYU runs the rooms.
| What | How |
|---|---|
| Connect | const mp = await MRIYU.multiplayer.connect() |
| Find an opponent | mp.quick() — an open room or a new one |
| Own room | mp.create({max: 4}), the room code is mp.room.code |
| Join by code | mp.join('ABC234') |
| Send a move | mp.send(data) — to everyone or {to: id} to one player |
| Shared state | mp.setState(data) — room host only |
| Start the game | mp.start() — the room disappears from matchmaking |
| Events | mp.on('joined' / 'left' / 'message' / 'state' / 'started', …) |
If the host leaves, the next player becomes the host. A complete example — online tic-tac-toe.
If your game has its own server
Call MRIYU.getLaunchToken() in the game and pass the token to your server. Verify the HMAC-SHA256 signature with the game secret (dashboard → Settings → Show secret), or send POST https://mriyu.com/api/games/verify with token and secret. The answer contains valid and the player (id, name). The token lasts an hour.
Never share the secret. If it leaks, click New secret.
Rules
- The game opens in an embedded frame and can't change the MRIYU page.
- Fraud, collecting passwords or personal data, ads for prohibited goods and 18+ content are not allowed.
- Games that break the rules are rejected or blocked.