Install Asset
Install via Godot
To maintain one source of truth, Godot Asset Library is just a mirror of the old asset library so you can download directly on Godot via the integrated asset library browser
Quick Information
Serverless peer-to-peer multiplayer for Godot games exported to the Web, powered by GenosDB (https://github.com/estebanrfp/GenosDB): WebRTC data channels plus a reactive, persistent graph database that runs entirely in the browser. No backend, no signaling server to run.Web only: P2P works on the HTML5/Web export. On desktop the API is a safe no-op, so the same code runs everywhere (single-player in the editor, multiplayer on the Web).The API mirrors GenosDB, so using this plugin teaches the real GenosDB API: Net.join(name) -> gdb(name, {rtc:true}) Net.send(data) -> channel.send(...) ephemeral -> signal message(id, data) Net.put(data, id) -> db.put(node, id) graph -> signal graph_changed(id, action, data) Net.remove(id), Net.map(query); signals peer_join / peer_leaveSetup is 3 steps: copy addons/godot_genosdb, enable the plugin, export to Web. The plugin auto-registers the "Net" autoload and auto-injects the JS bridge (loaded from a CDN) into index.html. No manual HTML editing, nothing to bundle.Live demo (open it in two browser tabs): https://estebanrfp.github.io/godot-genosdb/A top-down co-op farm: every tab is another player sharing the world, and a chopped tree falls in every window (and stays fallen for late-joiners, via the persistent graph).Renderer: GL Compatibility recommended.
πΎ godot-genosdb β Serverless P2P multiplayer for Godot (Web)
Add real-time, peer-to-peer multiplayer to a Godot game exported to the Web with zero servers, using GenosDB (WebRTC data channels + a reactive, persistent graph database that runs entirely in the browser). The plugin's API mirrors GenosDB, so using it teaches you the real GenosDB API.
βΆ Live demo: https://estebanrfp.github.io/godot-genosdb/ β open it in two tabs: each shows the other farmer moving, and a tree you chop falls in every window (and stays fallen, even for someone who joins later).
π¦ What's in this repo
| Path | What |
|---|---|
addons/godot_genosdb/ |
The plugin (drop-in Godot 4 addon) β plugin docs |
scenes/, scripts/, assets/, project.godot |
The demo's full source (the co-op farm) |
docs/ |
The exported Web build (this is what GitHub Pages serves) |
web/build.sh, web/serve.py |
Build & local-serve helpers |
π₯ Install the plugin in YOUR game (3 steps)
- Copy the folder
addons/godot_genosdb/into your own project'saddons/folder (createaddons/if it doesn't exist). - In Godot: Project β Project Settings β Plugins, find βGenosDB for Godotβ and switch it to Enabled.
- Export to Web (Project β Export β Web; renderer GL Compatibility
recommended). The plugin auto-injects the GenosDB bridge into your
exported
index.htmlβ you don't edit any HTML.
No npm, no bundling: the bridge loads GenosDB from a CDN. No signaling server: GenosDB uses decentralized Nostr relays.
Use it in code (the API mirrors GenosDB)
func _ready():
Net.peer_join.connect(func(id): spawn_remote(id))
Net.peer_leave.connect(func(id): remove_remote(id))
Net.message.connect(_on_state) # ephemeral (fast)
Net.graph_changed.connect(_on_world) # persistent (synced + stored)
Net.join("my-room") # = gdb("my-room", {rtc:true})
Net.map({}) # = db.map({}, cb) -> graph_changed
func _physics_process(_d):
Net.send({ "x": position.x, "y": position.y }) # = channel.send(...)
func chop_tree():
Net.put({ "type": "tree", "hp": 0 }, "tree_3") # = db.put(node, id)
| GenosDB (JS) | Net (Godot) |
Layer |
|---|---|---|
gdb(name, {rtc:true}) |
Net.join(name) |
room |
room.on('peer:join'/'leave') |
signal peer_join / peer_leave |
room |
channel.send(data) |
Net.send(data) |
ephemeral |
channel.on('message', cb) |
signal message(id, data) |
ephemeral |
db.put(node, id) |
Net.put(data, id) |
graph |
db.remove(id) |
Net.remove(id) |
graph |
db.map(query, cb) |
Net.map(query) + signal graph_changed(id, action, data) |
graph |
Full API: addons/godot_genosdb/README.md.
βΆ Run the demo
Editor (single-player): open the project in Godot 4.6+ and press βΆ. Move with WASD/arrows, chop trees with E / Space. (P2P is Web-only, so in the editor it runs as a normal single-player game.)
Web (multiplayer), locally:
GODOT=/path/to/Godot ./web/build.sh # exports into docs/
python3 docs/serve.py 8088 # open http://127.0.0.1:8088 in two tabs
Or just open the live demo above.
π§ How it works (the hybrid model)
GenosDB isn't only WebRTC β it's a reactive graph database that syncs P2P and persists. So the demo uses both layers, the recommended GenosDB pattern:
- Ephemeral β player positions over a GenosRTC data channel (
Net.send). - Persistent β tree state in the GenosDB graph (
Net.put/Net.map); a late-joiner gets the current world automatically (via theinitialaction) and chops survive reloads.
π Tech
- Godot 4.6 β GL Compatibility, Web export, no threads β any static host.
- GenosDB / GenosRTC β loaded from CDN; auto-injected on export.
Author
Esteban Fuster Pozzi (@estebanrfp) β Full Stack JavaScript Developer
License
Serverless peer-to-peer multiplayer for Godot games exported to the Web, powered by GenosDB (https://github.com/estebanrfp/GenosDB): WebRTC data channels plus a reactive, persistent graph database that runs entirely in the browser. No backend, no signaling server to run.
Web only: P2P works on the HTML5/Web export. On desktop the API is a safe no-op, so the same code runs everywhere (single-player in the editor, multiplayer on the Web).
The API mirrors GenosDB, so using this plugin teaches the real GenosDB API:
Net.join(name) -> gdb(name, {rtc:true})
Net.send(data) -> channel.send(...) ephemeral -> signal message(id, data)
Net.put(data, id) -> db.put(node, id) graph -> signal graph_changed(id, action, data)
Net.remove(id), Net.map(query); signals peer_join / peer_leave
Setup is 3 steps: copy addons/godot_genosdb, enable the plugin, export to Web. The plugin auto-registers the "Net" autoload and auto-injects the JS bridge (loaded from a CDN) into index.html. No manual HTML editing, nothing to bundle.
Live demo (open it in two browser tabs): https://estebanrfp.github.io/godot-genosdb/
A top-down co-op farm: every tab is another player sharing the world, and a chopped tree falls in every window (and stays fallen for late-joiners, via the persistent graph).
Renderer: GL Compatibility recommended.
Reviews
Quick Information
Serverless peer-to-peer multiplayer for Godot games exported to the Web, powered by GenosDB (https://github.com/estebanrfp/GenosDB): WebRTC data channels plus a reactive, persistent graph database that runs entirely in the browser. No backend, no signaling server to run.Web only: P2P works on the HTML5/Web export. On desktop the API is a safe no-op, so the same code runs everywhere (single-player in the editor, multiplayer on the Web).The API mirrors GenosDB, so using this plugin teaches the real GenosDB API: Net.join(name) -> gdb(name, {rtc:true}) Net.send(data) -> channel.send(...) ephemeral -> signal message(id, data) Net.put(data, id) -> db.put(node, id) graph -> signal graph_changed(id, action, data) Net.remove(id), Net.map(query); signals peer_join / peer_leaveSetup is 3 steps: copy addons/godot_genosdb, enable the plugin, export to Web. The plugin auto-registers the "Net" autoload and auto-injects the JS bridge (loaded from a CDN) into index.html. No manual HTML editing, nothing to bundle.Live demo (open it in two browser tabs): https://estebanrfp.github.io/godot-genosdb/A top-down co-op farm: every tab is another player sharing the world, and a chopped tree falls in every window (and stays fallen for late-joiners, via the persistent graph).Renderer: GL Compatibility recommended.