Vibe Games

Publish your game

Every game is self-hosted and runs inside Vibe Games in a sandboxed iframe. Package it as a .zip with index.html at the root and upload it — no external links.

1Build

Put index.html at the root of your zip, use relative asset paths, and keep everything the game needs inside the zip. Works for plain HTML5/JS and for Godot/Unity WebGL exports.

2Add a leaderboard (optional)

Include the SDK and call two functions. The page that embeds your game is logged in and saves the result for you:

<script src="https://vibegames.space/sdk/vibe-games.js"></script>
<script>
  VibeGames.submitScore(value);          // a non-negative integer
  VibeGames.getLeaderboard().then(rows => {
    // [{ rank, value, name }]
  });
</script>

You pick the label (Score / Time / Moves), ranking (higher or lower wins) and value format (number or time) on the upload form — not in code. A timed game submits its elapsed time and chooses “lower is better”. Leave it off entirely for games without scores.

3Go multiplayer (optional)

For real-time games, Vibe Games runs the networking for you: a shared relay handles rooms, membership and host election. Your game stays client-side — one player's browser is the host (authority for game state) and the relay just forwards messages. You don't run or deploy any server.

Include the SDK and use the VibeGames.mp functions:

<script src="https://vibegames.space/sdk/vibe-games.js"></script>
<script>
  // React to the room before/while connecting.
  VibeGames.mp.on("playerJoin",  p => { /* p.id, p.name */ });
  VibeGames.mp.on("playerLeave", p => { /* p.id */ });
  VibeGames.mp.on("hostChange",  h => { /* h.id — you're host if h.id === me */ });
  VibeGames.mp.on("message",     m => { /* m.from, m.data */ });

  // Join a match: "quick" | "create" (private code) | "join" (with code).
  VibeGames.mp.connect({ mode: "quick" }).then(s => {
    // s = { you, room, players, isHost }
  });

  VibeGames.mp.send({ x: 1, y: 2 });          // broadcast to the room
  VibeGames.mp.send(state, { to: peerId });   // direct message to one peer
</script>

On the upload form you pick the hosting model and min/max players:

  • Rooms — players quick-match or share a private code; the host page shows a join bar and a ?room=CODE link.
  • One shared world — no codes; everyone who opens the game auto-joins the same arena (best for .io-style games like Slither). The oldest connected player hosts.

4Submit for review

Log in and go to /submit, choose Single-player or Multiplayer at the top, add a title, tags and your zip. An admin approves it before it goes live. Ship updates later from your dashboard.

Prompt for your AI assistant

Paste this into Claude Code (or any AI agent) inside your game folder to package it into a Vibe Games-ready zip:

Prepare this browser game for upload to Vibe Games (vibegames.space):
1. Put index.html at the ROOT of the zip; use only relative asset paths.
2. Make it self-contained (no external/CDN-only dependencies).
3. Include only game files (html/js/css/json/wasm/pck/data/images/audio/fonts);
   exclude node_modules, .git, source maps, project files.
4. Optional leaderboard: add
   <script src="https://vibegames.space/sdk/vibe-games.js"></script>,
   call VibeGames.submitScore(value) on game over and
   VibeGames.getLeaderboard() to show top results. Ranking (higher/lower wins)
   and number-vs-time display are chosen on the upload form, not in code.
5. Optional rewarded ad: a button calling VibeGames.showRewardedAd(),
   grant the reward only if { rewarded: true }.
6. Output a single game.zip with index.html at the top level and list its files.
For Godot/Unity WebGL: keep all engine files next to index.html and zip together.

Prompt for a multiplayer game

Use this prompt instead when you want a real-time multiplayer game. Vibe Games provides the networking — your game only wires the SDK.

Build/adapt this as a REAL-TIME MULTIPLAYER browser game for Vibe Games
(vibegames.space). Networking is provided by the platform — do NOT write or
assume any backend, WebSocket server, or matchmaking. Use only the Vibe Games
multiplayer SDK, where one player's browser is the HOST (authority for game
state) and the relay forwards messages between players in a room:
1. Put index.html at the ROOT of the zip; relative paths only; self-contained.
2. Add <script src="https://vibegames.space/sdk/vibe-games.js"></script>.
3. Join a room with VibeGames.mp.connect({ mode: "quick" }) (or "create"/"join"
   with a code). It resolves to { you, room, players, isHost }.
4. Register handlers BEFORE/while connecting:
   VibeGames.mp.on("playerJoin", p => ...)   // p.id, p.name
   VibeGames.mp.on("playerLeave", p => ...)  // p.id
   VibeGames.mp.on("hostChange", h => ...)   // you're host if h.id === your you-id
   VibeGames.mp.on("message", m => ...)      // m.from, m.data
5. Architecture: the HOST simulates the game and broadcasts authoritative state
   with VibeGames.mp.send(state); non-hosts send only their inputs to the host
   via VibeGames.mp.send(input). On "hostChange", the new host takes over the sim.
6. Keep messages small JSON and send at a sane rate (<= a few/sec for state).
7. Don't build your own lobby/login — the Vibe Games page shows room/join UI and
   handles identity. Output a single game.zip and list its files.
Full engine-specific guides (including the exact Godot JavaScriptBridge and Unity .jslib snippets) live in the repo: PUBLISHING.md, docs/godot.md, docs/unity.md, and a working example in examples/example-game/.