Multiplayer: reference
Everything you can configure and use in the Multiplayer plugin, on one page.
Settings
Changed in Plugins → Multiplayer. They are saved inside the project (plugins.multiplayer) and, if you have the AI agent, it changes them with set_plugin.
| Setting | Values | Default | What it does |
|---|---|---|---|
enabled | yes / no | no | Turns the plugin on in the project. |
maxPlayers | 2 to 16 | 4 | Maximum players in the room (the host counts). |
minPlayers | 1 to the maximum | 1 | Players needed for Start to turn on in the waiting room. |
preset | adventure / plaza | — | Only when writing the settings (the agent with set_plugin): sets at once those of that way to play (adventure: cooperative, waiting room, scenes together, 4 players; plaza: social, no waiting room, free scenes, 16). It is not stored: the page recognises it by those settings. |
mode | coop / social | coop | Cooperative (shared state) or social (presence only). |
lobby | room / direct | room in cooperative, direct in social | With room, creating the room from the main menu goes through the waiting room and the host starts for everyone at once. With direct (and always when inviting from the pause menu), the game starts when the room is created. |
dropIn | yes / no | yes | Whether players can join a game in progress. With “no”, once started only those who already had a seat can come back. |
talk | watch / vote / solo | watch in cooperative, solo in social | Someone else’s conversations: watch them and suggest answers, vote them, or each their own. |
sceneMode | gather / together / free | gather in cooperative, free in social | Gather at the exits (wait for the others and change together), drag everyone along at once, or each on their own. |
shared | six switches | all on except inventory (cooperative only) | What part of the game is shared (see below). |
characters | protagonist / playable | protagonist | The same protagonist for everyone, or a different playable character for each (picked in the waiting room). |
chat | free / phrases / off | free | Free typing, quick phrases only (nobody types) or no chat. |
addons | one switch per extra | all on except “Quick phrases” | Which extras there are (see below). |
emojis | up to 12 | 👍 ❤️ 😂 😮 😢 🎉 👋 ❓ | Picker emojis. |
phrases | up to 12 | six ready-made phrases | Quick phrases. |
sounds | yes / no | yes | Soft room sounds (someone joins, leaves, writes, pings or is ready), at the sound effects volume. |
buttonLabel | text, up to 40 characters | empty | Text of the menu button. Empty: “Play with friends”, in the player’s language. In a room it says “Room (2/4)”. |
strategy | nostr / torrent / mqtt / local | nostr | Public network players find each other through (Trystero). local = only tabs of the same browser, no internet. |
relays | wss://… addresses | empty | Own relays, trackers or brokers of that network (empty = the public ones Trystero ships with). |
ice | stun:… addresses | stun:stun.l.google.com:19302 | STUN servers. Empty = local network only. |
turn | up to 3 { urls: ["turn:…" | "turns:…"], username?, credential? } | none | The game author’s TURN servers: they relay whoever cannot connect directly. VERB provides none (what it costs). The credentials ship inside the game. |
backup | yes / no | yes (not with local or with own relays) | Two networks at once: the room is also opened and looked for on another public network (Nostr ↔ BitTorrent; MQTT → Nostr) and the first one that connects wins. |
party | yes / no | no | The Party: the host is a big screen that plays and the others join with their phone as a controller (they do not load the game). The «Party» card (preset: "party") sets it with 8 phones (maxPlayers 9: the big screen counts as a place; in a Party it goes up to 17) and voted conversations. |
partyPad | both / votes / cursor | both | What the phones do in a Party: vote and move a cursor, only vote or only the cursor. |
menuButton | yes / no | yes | Shows “Play with friends” in the menus. |
What is shared
Cooperative only. Each category can be turned off separately:
| Key | What is synchronized |
|---|---|
variables | The value of every variable. |
props | Scene objects: state, visibility, where they were dragged, whether they were picked up. |
hotspots | Hotspots turned on or off. |
objectives | State of the journal objectives. |
data | The Scripting plugin’s game.data object. |
inventory | The items carried (everyone ends up with the same). Off by default: each player carries their own. |
Besides, always in cooperative, everything else in the world: opened locks, open or closed doors, won minigames, reactions done, regions, layers, light, particles, obstacles, names and descriptions changed by scripts, dialogue options used or removed, containers, journal documents, hints, who follows whom, the time of day, the scene’s ambience and sounds and, in 3D scenes, what was moved, the lights and the environment. Not shared is what belongs to each player: where they are, their character, what they visited, the music and looping sounds they hear, their screen filter.
Per player variables (Variable.net: "player", in Logic → Variables → When playing with friends): they are not shared even when variables are; each player has their own, which travels in their record (they get it back after an F5). The countdown of one of them is not shared either. Each player’s record carries their scene, position, character, inventory, per player variables, what they visited, where they came from and the countdowns of their per player variables (if it does not fit, it drops what they visited and shortens long texts before losing the scene or the inventory).
Continue another day. On the host of a cooperative game, the game carries net.seats: one seat per guest (name, color, character and record, at most 16), updated once per second and saved with the game. When a room is created with a game that has them, whoever joins with the same name (case-insensitive) gets their seat back, once; whoever leaves keeps theirs saved (not someone who is kicked). If the saved character is already taken, they get a free one and their record applies to it. The seats take at most about 256 KB of the save.
How it is synchronized. Each player looks at the world about four times per second and sends only what changed. The host sets the order: a guest asks the host for its changes, the host applies them one after another and hands them out to everyone (including whoever asked) with a version number. So if two players change the same thing at once, everyone ends up with the same: the last one the host ordered. What arrives is applied with the same effects as the block that changes it (an object changes state with its animation, an objective is completed with its notice) and does not run scripts: whoever did the action already produced the effects. Anything that does not exist in your project is dropped.
On joining, the guest receives a full snapshot of the state and the host’s scene. Whatever arrives while they are getting in is kept and applied afterwards, in order; if it is too much, they ask for a new snapshot.
What the host runs
What moves on its own is not simulated by each computer on its own (each would do it its own way): the host runs it and the guests mirror it.
| What | In a cooperative room |
|---|---|
| Characters with a behavior (patrol, wander) and those moved by a host script | The host moves them; on the guests they go to where they are on the host’s screen (at their height too in a 3D scene). A character moved by a script on your computer (for example, while talking to them) obeys that script while it lasts. |
| Guards (advanced vision) | They watch every player in the host’s scene and chase the closest one they see. Everyone sees their alert. The “When … becomes …” scripts run on the computer of the player they saw: they talk about the protagonist, and it is theirs. |
| Countdowns | They only count down on the host; everyone sees them go down and end at the same time. If a guest starts one, they ask the host. “When the countdown reaches zero” runs on the host, and its effects reach everyone. |
| Background scripts that start on their own (“On entering the scene”, “On game start”) | They run on the host: global ones always; scene ones, if the host is in that scene. So a timer does not add up once per player. |
All this applies while the host is in your scene. If you are in another one (in “each on their own” mode), the characters, guards and routines of your scene are moved by your computer, as in single player. Simple vision (“When … sees the protagonist”) is checked by each computer with its own protagonist.
Extras
| Id | Name | Description |
|---|---|---|
phrases | Quick phrases | With chat: "free", buttons with ready-made phrases next to the chat. With chat: "phrases", always. |
emotes | Emojis | Reaction picker whose emojis float over the character. |
nameTags | Names over characters | A label with name and color. |
playerList | Player list | In the room panel: each one’s scene and connection quality. Kick (host) and mute. |
pings | Map pings | Alt + click, or the pin button and a click. If something is pointed at, it says what (“Leo: Look at the bell!”). |
follow | Go to a player | The Go to… button of each player in the room panel. |
notices | Room notices | The “Leo joined”, “Leo left”, “lost connection” and “is back” lines in the chat, and “Announce to everyone”. |
Blocks
They only exist with the plugin on. They also appear in the human view and in text.
| Type | Sentence | Parameters |
|---|---|---|
event.netJoin | When a player joins the room, save their name in ‹variable› | var (optional): variable where their name is saved |
event.netLeave | When a player leaves the room, save their name in ‹variable› | var (optional): variable where their name is saved |
event.netMessage | When the message ‹message› arrives, save the data in ‹variable› | name: short word or phrase; var (optional): variable where the data is saved |
net.send | Send everyone the message ‹message› with the data ‹data› | name; value (optional): the data (text, number or [var:name], up to 200 characters) |
net.inRoom | if I am playing with friends | — |
event.netAllHere | When we are all in this scene | — |
net.waitAll | Wait until we are all in this scene | — |
net.allHere | if we are all in this scene | — |
net.bringAll | Take everyone to ‹scene› by ‹entrance› | scene; entrance (optional) |
net.vote | Start a vote ‹vote›: ‹question› with the options ‹options› | name; question; options (2 to 6, one per line or with “|”) |
event.netVoteEnd | When the vote ‹vote› ends, save the option in ‹variable› | name; var (optional): the number of the winner (1, 2…; 0 if nobody voted) |
net.giveTurn | Give the turn to ‹player› | player: their name (empty: the next one) |
net.passTurn | Pass the turn | — |
net.myTurn | if it is my turn | — |
event.netMyTurn | When my turn starts | — |
net.announce | Announce to everyone: ‹text› | text |
net.isHost | if I am the host of the room | — |
net.players | if there are at least ‹players› players in the room | count (default 2) |
Notes:
- Without a room, the player counts as the host of a room of one (
net.isHost= yes,net.players= 1), so the same game works solo. - A message is case-insensitive, and spaces and odd symbols are cleaned (up to 40 characters).
net.sendis run by everyone, including the sender. Scripts that listen for the message run on each computer.- Network events do not lock the player’s control (they are not cinematics): if you want that, use “Take control from the player” inside.
Scripting: game.net
With the Scripting plugin on, the code has game.net:
| Instruction | What it does |
|---|---|
game.net.players | List with the names of the room’s players (empty without a room). |
game.net.count | Number of players (1 without a room). |
game.net.isHost | true if you are the host (or there is no room). |
game.net.me | Your name in the room. |
game.net.list | Who is there: { name, color, character, scene, host, me } per player (empty without a room). |
game.net.send("message", data) | Same as the “Send everyone the message” block (the data is optional). |
game.net.announce("text") | Same as “Announce to everyone”. |
These values are a snapshot taken when the block starts.
Limits and technical details
| Players | 2 to 16 (default 4). |
| Topology | Star: guests connect to the host, which relays. |
| Maximum message | 24,000 characters (anything over is dropped). |
| Name | Up to 20 characters; if repeated, “2”, “3”… is added. |
| Chat | Up to 200 characters per message. |
| Messages per second | Up to about 80 per player (bursts of 160); the excess is dropped. |
| Position | Sent about 10 times per second while you move and once per second when still. |
| Heartbeats | Every 2 s; whoever does not answer within 12 s is considered disconnected. |
| Back to the seat | After a drop or an F5, the host keeps the seat for 60 s with each player’s record (scene, spot, character and items); the guest’s tab keeps the code and the key to their seat. Leave the room frees it. |
| Colors | Twelve, never repeated within a room. |
| Same game | The room is tied to a fingerprint of the project’s ids: another game cannot find it. The game version (meta.version) only warns if it differs. |
| Protocol | Version 2. A game made with another version of VERB gets a clear notice instead of joining. |
| QR | The invite link’s, only where there is a link (the game published on the web); made by uqr (MIT) in the browser itself. |
| Room code | Five letters (no I, O or 0/1). A #verb-room=CODE link fills it in. |
| Discovery | Trystero: Nostr (default), BitTorrent or MQTT. Only used to find each other; game data does not go through that network. |
| Connection | Direct WebRTC (RTCDataChannel) between players, with optional STUN and, if the author sets one up, their TURN. In “Only tabs”, BroadcastChannel. Each game lives in its own space of the public network (appId = verb-<game fingerprint>). |
| No VERB server | Apart from the discovery relays (public or the author’s), the STUN and the author’s TURN, nothing goes through any server. VERB hosts nothing. |
For the AI agent
| Tool | What it does |
|---|---|
list_plugins | Shows the plugin’s state and its current settings. |
set_plugin | { id: "multiplayer", enabled: true, settings: { … } }: turns it on or off and changes settings (validated: only known fields, and only STUN servers). |
multiplayer_probe | “Test the connection” from the agent: whether the relays answer, whether the STUN gives the public address and whether each TURN relays, and which TURN entries are incomplete (they are not used). |
get_multiplayer_guide | This plugin’s guide: what players see (waiting room, in-game interface, coming back after a reload, 3D scenes), every setting and how to write rooms and network scripts. |
Network blocks can be written with write_scripts as soon as the plugin is on.