Multiplayer game backend on Erlang/OTP. Hot-reloadable, Apache-2.
Docs • Live demo • Discord • Issues
Edit a Lua file. Save. Live match updates. No restart. Try it.
Solo devs and small teams building indie 2D multiplayer. If you're on Godot, Defold, LÖVE, Phaser, or Flame+Flutter, asobi ships the backend pieces you'd otherwise rebuild from scratch: matches, matchmaker, chat, leaderboards, economy, voting, phases, worlds, presence, inventory.
Not the right fit for twitch-latency AAA shooters — WebSocket/TCP has a floor around 4ms. Great for turn-based, casual, MMO zone, roguelike, co-op, party, and social games.
git clone https://github.com/widgrensit/asobi
cd asobi/examples/hotreload-demo && docker compose upOpen http://localhost:3000, then edit lua/match.lua and save — the
running match updates live. No restart, no reconnect, no kicked players.
Write your game in Lua — use the asobi_lua Docker runtime. One container, hot-reloadable Lua match scripts, batteries included. No Erlang required. This is what most people want.
Write your game in Erlang — depend on this library directly. You get the same match supervisor, matchmaker, leaderboards, economy, world server, and voting primitives, implemented as OTP behaviours you compose with the rest of your release.
%% rebar.config
{deps, [
{asobi, "~> 0.1"}
]}.asobi_match— behaviour for per-match logic, backed by a supervisedgen_serverwith ETS state backup on crash.asobi_matchmaker— pluggable strategies (fill,skill_based); your own via theasobi_matchmaker_strategybehaviour.asobi_world_server— persistent worlds with lazy zones, spatial grid indexing, terrain chunk serving, adaptive tick rates.asobi_vote_server— plurality, ranked choice, approval, weighted. Fixed / ready-up / hybrid / adaptive windows. Spectator voting, veto tokens, majority-tyranny mitigations.asobi_phase,asobi_season_manager,asobi_timer— phase engine, season lifecycles, five timer primitives.- Rate limiting via
seki(sliding window, per route group), sessions cached in ETS, presence viapg, chat / social / economy / inventory / storage / tournaments / notifications as Nova controllers. - Client SDKs for Godot, Defold, Unity, Unreal, JS/TS, Dart, Flame — see below.
Single node, 8 cores, same-machine client. See guides/benchmarks.md for full numbers.
| Peak | |
|---|---|
| WebSocket throughput | 83,000 msg/sec @ 3,500 concurrent connections |
| RTT p50 / p99 | 4.4 ms / 6.5 ms |
| REST reads (matches / friends / wallets) | 7–14 ms p50 |
| Memory per connection | ~15 KB |
Not a twitch-FPS backend — WebSocket/TCP has a latency floor. Excellent for turn-based, casual, MMO zone, roguelike, co-op, and party games. Pair with a UDP relay if you need sub-3ms physics.
| Engine | Package | Docs | Example |
|---|---|---|---|
| Godot 4.x (GDScript) | asobi-godot | Guide | Demo |
| Defold (Lua) | asobi-defold | Guide | Demo |
| LÖVE (Lua) | asobi-love — ships May 2026 | — | — |
| Phaser (TypeScript) | asobi-phaser — ships May 2026 | — | — |
| Unity 2021.3+ (C#) | asobi-unity | Guide | Demo |
| Unreal Engine 5 (C++) | asobi-unreal | — | — |
| TypeScript / JS (Browser + Node) | asobi-js | — | — |
| Dart / Flutter | asobi-dart | Guide | — |
| Flame (Flutter) | flame_asobi | — | Demo |
- Getting started — stand up a local asobi node from Erlang
- Architecture — supervision tree, modules, design
- REST API · WebSocket protocol
- Matchmaking · Voting · World server · Large worlds
- Economy · Authentication · IAP
- Lua scripting · Lua bots
- Configuration · Clustering · Performance tuning
- Benchmarks · Comparison vs Nakama / Colyseus / SpacetimeDB
- HexDocs — full API reference
- from Hathora — Hathora shuts down 2026-05-05.
- from PlayFab
- from Nakama self-host
- asobi_lua — Lua scripting runtime + Docker image (
ghcr.io/widgrensit/asobi_lua) - asobi-cli — deploy, manage, and scaffold games
- asobi_admin — admin dashboard
- Client SDKs: asobi-godot · asobi-defold · asobi-unity · asobi-unreal · asobi-js · asobi-dart · flame_asobi
Note
asobi is pre-1.0. The API is stabilising; expect minor breaking changes until 1.0. We will never relicense — see guides/exit.md for the "if asobi disappears tomorrow" runbook.
asobi is Apache-2 and self-hostable. One Docker container runs the full
stack — see docker-compose.example.yml for
a production-shaped setup with Postgres.
Don't want to operate it? asobi.dev/cloud is the managed version — €9/mo Indie tier, EU-sovereign, same open-source core. If we ever pivot, you still have the code — see guides/exit.md.
Does asobi replace Nakama / Colyseus / PlayFab? For the indie-2D multiplayer slot, yes. For AAA shooters needing per-match dedicated UDP servers, no — pair asobi with a UDP relay.
Can I write my game logic in something other than Lua? Yes. Depend on asobi as an Erlang library and write match code in Erlang, or call the REST/WebSocket API from any language. Lua is the easy mode.
Does it scale across machines? asobi is single-node by design — one BEAM node handles tens of thousands of connections. Shard at the app level (game-per-node, region-per-node), don't try to cluster a single match across hosts.
What happens if asobi disappears? Apache-2, single-binary deploy, Postgres backing store. Nothing in your stack is load-bearing on us. See guides/exit.md.
See CONTRIBUTING.md for the build setup, pre-push checklist, and test matrix. Security issues: see SECURITY.md.
Apache-2.0. See LICENSE.