# Multiplayer Godot games without running a game server

> We built a pure GDScript Hibira addon for Godot 4: rooms, chat and synced player positions, web exports included. Why we built it, how it works, and a running demo in five minutes.

Source: https://hibira.io/blog/godot-multiplayer-without-a-server
Updated: 2026-11-17

One day someone on our team asked: "Does Godot speak the Pusher protocol?"

It didn't. Godot 4 has WebSockets built in and a full high-level multiplayer API, but both assume you run a game server yourself, or let one of the players host. For a lot of small teams that is exactly where multiplayer gets stuck: the game is done, and now you have to learn to run servers, open ports, deal with NAT, and pay every month for a machine when you have no idea how many people will play.

We wanted another way: put only a client in the game, connect it to a hosted realtime service, and let that service carry rooms, the online list and messages between players. So we built the Hibira addon for Godot. It is pure GDScript with no native extension, so it runs on every platform Godot exports to, the web included.

![One room: a Godot player on the left, a browser player on the right.](https://hibira.io/portal/articles/godot-lobby-crossplay-en.webp)

## What small multiplayer games actually need

Not every multiplayer game is a shooter. When we looked at the indie games and game jams around us, the multiplayer parts were mostly these:

- **Lobbies and rooms**: create a room, get a code, send it to friends, wait until everyone presses "Ready".
- **Who is online**: who is in the room, who just joined, who left, who the host is.
- **Chat**: including "the other player is typing…".
- **Light syncing**: everyone's position in a co-op game, who tapped first in a party game, the next move in a turn-based one.

What these have in common: the messages are small, and they have to be fast as people feel it, not fast to the millisecond like a shooter. One WebSocket plus channels handles them well, and that is what the Pusher protocol is good at.

## Why the Pusher protocol

The Pusher protocol has been around for more than ten years, and its model is simple: clients subscribe to channels, and servers or other clients send events to those channels. For games, presence channels are the useful part:

- Your backend signs each subscription, so you decide who may enter which room.
- The channel tells everyone the current members, and who joins and leaves.
- Players can send client events to each other directly, and the server stamps every one of them with the sender's `user_id`.

The last point is the important one. The `user_id` is stamped by the server, not filled in by the client, so when "player A moved here" arrives, you know it really came from player A. The position syncing further down is built on that guarantee.

The other benefit: same protocol, so the web and the game can talk. Our web lobby SDK, @hibira-io/lobby, uses the same events, so Godot players and browser players can sit in the same room, as in the screenshot above.

## How it works

```text
flow: The game connects only to Hibira; your backend only signs
Godot game|HibiraClient --sign request--> Your backend|signs presence channels with the app secret
Godot game|HibiraClient --WebSocket--> *Hibira|rooms, members, relays events --WebSocket--> Other players|Godot or browser
```

The addon has four main parts:

- **`HibiraClient`**: a Pusher protocol v7 client on top of Godot's built-in `WebSocketPeer`. It connects, subscribes, answers pings, and reconnects and subscribes again after a drop.
- **`HibiraChannel`**: one channel. `bind()` listens for events, `trigger()` sends client events, and presence channels add the member list and signals for joins and leaves.
- **`HibiraRoom`**: turns a presence channel into a game room with seats, a host, ready flags, room settings, kick and start, plus chat with typing indicators.
- **`HibiraSync`**: new in 0.2.0. Add it under a character and its position shows up on every other player's screen.

The app secret never goes into the game. Anyone can unpack an exported game, so signing has to happen on your backend, exactly as with pusher-js or Laravel Echo. If you already have a web version, its auth endpoint works as is.

## HibiraSync: add it and it syncs

The most common need in a co-op game is "let the others see where I am". We wanted that to take one node. In `player.tscn`, add a HibiraSync under the CharacterBody2D, set its channel name to `presence-match-1` and its properties to `position` and `rotation`, then spawn each player:

```gdscript
func spawn(user_id: String) -> void:
	var p := PLAYER.instantiate()
	p.name = user_id
	p.get_node("HibiraSync").owner_id = user_id # who drives it
	add_child(p)
```

Behind it, a few things happen:

- **Only the owner can move it.** Each node has an `owner_id`. Values from anyone else are dropped, which works because the server stamps the `user_id`.
- **The whole scene is one message.** Every synced node on a channel is batched into one client event per tick, 8 a second by default. Hibira allows 10 client events a second per connection, so however many nodes a scene syncs, it stays within the limit.
- **Only changed values are sent.** A character standing still sends nothing; when someone joins the room, everything is sent again for them.
- **Received values move smoothly.** Applying 8 updates a second directly would make characters jump. Instead each value becomes a target, and the character moves a little closer every frame, with matching interpolation for angles and quaternions.

```text
sequence: What happens in one tick
Player A's game | *Hibira | Player B's game
1 > 2: client-hibira-sync | {"s": {"A/Player": {"position": [...]}}}
2 > 3: the same event | with user_id: "A"
note: Player B checks that user_id is the node's owner, then moves the character smoothly
```

![The playground: two browser windows in one room, each driving one dot, and the other window's dot catches up smoothly.](https://hibira.io/portal/articles/godot-playground-en.mp4)

To be clear: HibiraSync suits party games, co-op games and board games, games played among friends. Each player has full control over their own characters. It is not server-authoritative netcode, and a competitive game that has to stop cheating still needs a server to make the calls.

## Up and running in five minutes

1. Download `addons/hibira` from [GitHub](https://github.com/hibira-io/godot), put it in your project's `addons/` folder, and turn on Hibira Realtime in **Project → Project Settings → Plugins**.
2. Open `addons/hibira/demo/playground.tscn` and press F6. With no setup, it connects to our public demo app and creates a room with a four-letter code.
3. In **Debug → Customize Run Instances**, set the instance count to 2 and run it again to see two dots moving in one room.

To try it in the browser right away, open the [playground online](https://demos.hibira.io/godot/): it is the same scene exported for the web. Send a friend the link with the room code and they join the same room. Each playground window is a new player. In your own game, two windows signed in as the same user are one member of the room, so test with two accounts, for example in a second browser or a private window.

For your own app, first set it up in the Hibira portal: copy the **key** from the app's **Overview → Credentials** (the secret is shown only once, when you create the app, and stays on your backend), turn on **Settings → Allow client events**, and for a web export add the page's origin, such as `https://yourname.itch.io`, to **Settings → Allowed origins**. The Free plan doesn't accept `*`, and without the origin the browser can't connect. Your auth endpoint signs `presence-` channels like any Pusher-compatible backend; for Node, `authorizeRoom()` from @hibira-io/lobby does it.

Then fill in the app key and the auth endpoint in the **Hibira** section of Project Settings. The addon adds an autoload called `Hibira` that connects when the game starts, and any script can use it:

```gdscript
func _ready() -> void:
	var lobby := HibiraRoom.join(Hibira, "presence-room-ABCD", {"capacity": 4})
	lobby.message_received.connect(func(m): print(m.info.name, ": ", m.text))
	lobby.started.connect(func(data, _by): start_game(data))
```

## A complete example: a reaction game

To check that the parts really add up to a game, we made a four-player reaction game with them: a room list, four seats, a host, ready flags, kick, room chat, and five rounds of "tap first after GO!".

![The room list: create a room, or join a friend's with its code.](https://hibira.io/portal/articles/godot-lobby-rooms-en.webp)

![In the game: once the host starts, every tap is a client event on the room channel.](https://hibira.io/portal/articles/godot-lobby-game-en.webp)

It speaks the same events as our web lobby example, so Godot and browser players can play together. The full source is in [examples/godot-lobby](https://github.com/hibira-io/examples/tree/main/godot-lobby).

## Cost and limits

- Each client event counts as one message, however many players receive it. Four players, five rounds: a few dozen messages. The free plan has 200,000 a day, plenty for prototypes and small tests.
- HibiraSync sends at most 8 a second by default (adjustable in Project Settings, up to 10), and only when something changed. Four players moving all the time use at most about 110,000 messages an hour; standing still costs nothing.
- On the Free plan an event's data can be up to 4 KB (more on paid plans). HibiraSync splits its batches below that; keep single values, such as a long string, small.
- Presence channels hold up to 100 members, plenty for rooms. For bigger spaces, such as a lobby of thousands, use a regular channel with broadcasts from your server.

## What's next

The addon is on [GitHub](https://github.com/hibira-io/godot/releases), and we have submitted it to the Godot Asset Library. Next we want to add end-to-end encrypted channels and user sign-in (`pusher:signin`).

If you are making a multiplayer game in Godot, give it a try. We would love to hear what your game needs.
