---
title: Add Multiplayer and Leaderboards to Your Browser Game | Star
description: Already have a browser game? Put it on Star free, then ask Star's agent to add multiplayer or a leaderboard. Star hosts the server and the rooms.
url: "https://buildwithstar.com/add-multiplayer-to-your-game"
date_modified: 2026-11-23
---
# Add multiplayer to the game you already have

Put your browser game on Star and it's hosted free, at a link anyone can play. To make it multiplayer, ask Star's agent: it writes the game server, and Star hosts the rooms. You don't set up a static host, a server host and a realtime library yourself. Adding multiplayer uses credits: on Claude Haiku 5.5, the model free accounts build with, it has cost about as much as the free credits a new account starts with.

## Prompt for your coding agent

Paste this into Claude Code, Codex, Cursor or another coding agent. It asks you to approve access in your browser, then follows the [Star guide](https://buildwithstar.com/skills/working-with-star/SKILL.md).

> Use the Star skill to make this game multiplayer on Star: put it on Star if it isn't there yet, then ask Star's agent to add multiplayer with Claude Haiku 5.5. That has cost about as much as a new account's free credits. Before Star's agent starts, show me the request and model and wait for my yes. When it's done, send me the play link.
>
> Follow this guide: https://buildwithstar.com/skills/working-with-star/SKILL.md

Or [upload it yourself](https://buildwithstar.com/host).

## How it works

1. **Put the game on Star.** Tell your coding agent, like Claude Code, Codex or Cursor, to put it on Star with the Star skill. It hands back a link anyone can play. Or paste the code or upload the folder at [buildwithstar.com/host](https://buildwithstar.com/host). Hosting is free.
2. **Ask for multiplayer.** Ask Star's agent to make it online multiplayer. Type it in the Star editor, or have your coding agent ask with the Star skill. Star's agent writes the game server, usually in a few minutes.
3. **Send the link.** Friends open it in a browser and join, with no account or download. The rooms run on Star, so the game keeps going when one player leaves. Want a leaderboard too? Ask for one the same way.

## Star vs building it yourself

The usual do-it-yourself setup is a static host for the game files, a server host for a realtime server, and a realtime library such as Socket.IO or Colyseus, plus a database if you want leaderboards.

| | Star | Build it yourself |
|---|---|---|
| Setup | Upload the game, or have your coding agent do it. Ask for multiplayer. | Deploy the game files to a static host. Write a realtime server and deploy it to a server host. Point the game at the server. Add a database and an API for scores. |
| Accounts | One Star account. | Usually one per service: static host, server host, database. |
| Who writes the server | Star's agent. You can't start a game server on Star from your own code today. | You or your coding agent, in any language or library. |
| Cost | Hosting the game and its rooms is free. Adding multiplayer uses credits, about as much as a new account's free credits on Claude Haiku 5.5. | Depends on each provider's plan. Many have free tiers with limits. |
| Upkeep | Nothing to run. Star hosts the game, its server and the rooms. | Your server code, dependencies, deploys, monitoring and database. |
| Leaderboards | Ask Star's agent to add one. Weekly and all-time boards, and guests can post scores. | Build a database and an API for scores. |
| Players | Open a link. No account or download. | Open a link, if you build it that way. |
| What fits | Browser games with an index.html file. Uploads up to 100 MB zipped. | Whatever you build and pay for. |

## When building it yourself is the better choice

- You want to write your own server code, or use a particular framework. Star's agent writes the server on Star.
- Your game isn't a browser game: a native phone app, a desktop build or a console game.
- The game has to use services you already run, like your own accounts, database or sign-in.
- You need control Star doesn't offer, like where the server runs, how it scales or how long a session lasts.
- You don't want one platform to host the whole game.

## Questions

### How do I add multiplayer to my HTML5 game?

Put the game on Star, then ask Star's agent to make it online multiplayer, from the Star editor or through your coding agent. Star's agent writes the game server, and Star hosts the rooms. Friends join from your game's link.

### Do I need to run my own server?

No. Star hosts the game server and the rooms for you, free. You don't need a server host, a realtime library or a database.

### How much does it cost to add multiplayer?

Hosting your game and its multiplayer rooms is free, and so is playing. Adding multiplayer is a build with Star's agent, so it uses credits. On Claude Haiku 5.5, the model free accounts build with, it has cost about as much as the free credits a new account starts with. Bigger games and other models use more.

### Can I use my own server code, Socket.IO or Colyseus?

Not to start a game server on Star today: Star's agent writes it. If you need your own server code or framework, building it yourself is the better fit.

### Can Claude Code, Codex or Cursor do this for me?

Yes. Copy the prompt on this page into your coding agent. It reads the Star guide, puts your game on Star if it isn't there yet, and asks Star's agent to add multiplayer. The prompt asks it to show you the request and wait for your yes before Star's agent starts.

### How do I add a leaderboard without a backend?

Host the game on Star and ask Star's agent to "add a leaderboard". Star saves the scores, with weekly and all-time boards. Players don't need an account to post a score.