SimpleMultiplayer3D is a lightweight Godot plugin for real-time 3D multiplayer over WebSocket, designed with a mobile-first workflow in mind. It is suitable for fast prototyping, local mobile testing, and real multiplayer projects with a separate Node.js backend.
Built specifically for mobile-first multiplayer development, allowing full local multiplayer testing directly on Android using Termux without requiring a desktop server setup.
- WebSocket multiplayer
- Android support
- Desktop support
- Local server testing
- Online deployment support
- Fast setup
- Mobile-first workflow
- Godot integration
- Easy room/session handling
- Real-time sync
- Godot 4.x compatible version, tested with Godot 4.6
- Android export templates for mobile builds
- Internet permission enabled for Android online testing
- Node.js LTS recommended for the backend server
- Termux optional for local mobile testing on Android
- Install the plugin from the Godot Asset Library.
- Enable the plugin in Godot: Project > Project Settings > Plugins.
- The plugin files will be available under
res://addons/simplemultiplayer3d/. - Make sure the autoloads are enabled in the project settings if you are integrating the addon manually:
WebSocketClientMultiplayerManager
- Configure the server URL in Project Settings if needed:
simple_multiplayer/server_url
- Enable the plugin.
- Open the demo scene.
- Start the local server.
- Run the project.
- Connect the client.
For the first test, the recommended flow is to run the Node.js server locally, open the demo lobby, and verify that the client connects and enters the waiting room correctly.
This plugin was developed to work with a separate repository from the Node.js server, where you can find the complete step-by-step instructions for installing, configuring, and running the backend.
Server repository: Open server repository
Use this repository when you need:
- Server configuration instructions
- Backend installation steps
- Local and online server execution
- Environment-specific configuration details
It is recommended to keep the Godot plugin and the backend in separate repositories so that the client project remains lightweight and easy to distribute.
This is the recommended workflow for mobile development.
pkg update
pkg install nodejsnode server.jsifconfigUse the IP address assigned by your Wi-Fi network, not localhost, when connecting from another device.
ws://192.168.x.x:PORT
For local Android testing:
- The phone and the client device must be on the same network.
- Replace
localhostwith the local IP address of the machine running the server. - Keep the server reachable from the mobile device over Wi-Fi.
If the server runs on the Android device itself, use the device's local network IP or the appropriate loopback route for the test environment.
You can deploy the Node.js backend on:
- Render
- VPS
- Railway
- Any Node.js hosting provider
When exporting to Android as an APK, the Godot internet permission must be enabled.
Important
On exported Android APKs, enable internet permission in Godot: Project > Export > Android > Permissions > INTERNET
Without this permission, the client will not connect to online servers.
- Generate the Android export templates.
- Enable internet permission.
- Export the project as APK.
- Install the APK on the device.
- Test the connection against your local or online server.
extends Node
func _ready() -> void:
var ws_client = get_node_or_null("/root/WebSocketClient")
if ws_client:
ws_client.connect_to_server("ws://127.0.0.1:9090")addons/simplemultiplayer3d/- Plugin source code, editor entry point, WebSocket client, and multiplayer managerexemplo/- Demo content used to validate the workflow and show how the plugin is consumedexemplo/cenas/- Sample scenes for lobby, waiting room, test world, and related flowsexemplo/scripts/- Gameplay and UI scripts used by the demo scenesexemplo/player/- Local and network player scenesproject.godot- Godot project configuration and autoload registration
- Connection refused: Verify that the server is running and that the URL and port are correct.
- Infinite reconnect: Check whether the server is closing the socket or rejecting the handshake.
- Android not connecting: Confirm that the device can reach the server over Wi-Fi and that the server URL is not using
localhost. - Localhost not working on device: Replace
localhostwith the local IP of the machine hosting the server. - Missing internet permission: Enable
Project > Export > Android > Permissions > INTERNETbefore building the APK. - Wrong local IP: Use
ip addr show wlan0on Termux or check the network adapter on your host machine. - Server offline: Start the Node.js backend before launching the Godot client.
- Port blocked: Ensure the firewall allows inbound traffic on the selected WebSocket port.
- WebSocket is efficient for small to medium multiplayer state updates, but it is not a replacement for full netcode optimization.
- Prefer compact payloads and avoid sending unnecessary data every frame.
- Use a sensible network tick rate for position sync instead of spamming packets continuously.
- On mobile, keep replication lean to reduce battery use and network overhead.
- Avoid excessive RPC spam or redundant position broadcasts when state has not changed.
Contributions are welcome.
Please open an issue or pull request with clear reproduction steps, a short description of the change, and any relevant test notes.
Placeholder.
Placeholder.
SimpleMultiplayer3D é um plugin leve para multiplayer 3D em tempo real via WebSocket, desenvolvido com fluxo mobile-first em mente. Ele é indicado para prototipagem rápida, testes locais no celular e projetos multiplayer reais com backend separado em Node.js.
Construído especificamente para o desenvolvimento de jogos multiplayer com foco em dispositivos móveis, permitindo testes multiplayer locais completos diretamente no Android usando o Termux, sem a necessidade de configurar um servidor em um computador.
- Multiplayer via WebSocket
- Suporte a Android
- Suporte a desktop
- Testes locais com servidor
- Suporte a deploy online
- Configuração rápida
- Fluxo mobile-first
- Integração com Godot
- Gerenciamento simples de salas/sessões
- Sincronização em tempo real
- Versão compatível com Godot 4.x, testado com Godot 4.6
- Export templates de Android para builds mobile
- Permissão de internet habilitada para testes online no Android
- Node.js LTS recomendado para o servidor backend
- Termux opcional para testes locais mobile no Android
- Instale o plugin pela Godot Asset Library.
- Ative o plugin em Godot: Project > Project Settings > Plugins.
- Os arquivos do plugin ficam em
res://addons/simplemultiplayer3d/. - Se estiver integrando manualmente, confirme os autoloads no projeto:
WebSocketClientMultiplayerManager
- Configure a URL do servidor no Project Settings, se necessário:
simple_multiplayer/server_url
- Ative o plugin.
- Abra a cena de demo.
- Inicie o servidor local.
- Execute o projeto.
- Conecte o cliente.
Para o primeiro teste, o fluxo recomendado é rodar o servidor Node.js localmente, abrir o lobby de demonstração e verificar se o cliente conecta e entra corretamente na sala de espera.
Este plugin foi desenvolvido para funcionar com um repositório separado do servidor Node.js, onde está o passo a passo completo de instalação, configuração e execução do backend.
Repositório do servidor: Abrir o repositório do servidor
Use esse repositório quando precisar de:
- Instruções de configuração do servidor
- Etapas de instalação do backend
- Execução local e online do servidor
- Detalhes de configuração específicos do ambiente
A recomendação é manter o plugin Godot e o backend em repositórios separados, para que o projeto do cliente continue leve e fácil de distribuir.
Este é o fluxo recomendado para desenvolvimento mobile.
pkg update
pkg install nodejsnode server.jsifconfigUse o endereço IP fornecido pela sua rede Wi-Fi, e não localhost, ao conectar a partir de outro dispositivo.
ws://192.168.x.x:PORT
Para testes locais no Android:
- O celular e o cliente precisam estar na mesma rede.
- Troque
localhostpelo IP local da máquina que está executando o servidor. - Garanta que o servidor esteja acessível via Wi-Fi para o dispositivo mobile.
Se o servidor estiver rodando no próprio Android, use o IP local da rede do dispositivo ou a rota de loopback adequada ao ambiente de teste.
Você pode hospedar o backend Node.js em:
- Render
- VPS
- Railway
- Qualquer provedor de hospedagem Node.js
Ao exportar para Android como APK, a permissão de internet da Godot precisa estar habilitada.
Important
No APK exportado para Android, ative a permissão de internet em Godot: Project > Export > Android > Permissions > INTERNET
Sem isso, o cliente não conecta em servidores online.
- Gere os export templates de Android.
- Habilite a permissão de internet.
- Exporte o projeto como APK.
- Instale o APK no dispositivo.
- Teste a conexão com seu servidor local ou online.
extends Node
func _ready() -> void:
var ws_client = get_node_or_null("/root/WebSocketClient")
if ws_client:
ws_client.connect_to_server("ws://127.0.0.1:9090")addons/simplemultiplayer3d/- Código-fonte do plugin, ponto de entrada do editor, cliente WebSocket e gerenciador de multiplayerexemplo/- Conteúdo de demonstração usado para validar o fluxo e mostrar como o plugin é consumidoexemplo/cenas/- Cenas de exemplo para lobby, sala de espera, mundo de teste e fluxos relacionadosexemplo/scripts/- Scripts de gameplay e interface usados pelas cenas de demonstraçãoexemplo/player/- Cenas do jogador local e do jogador de redeproject.godot- Configuração do projeto Godot e registro dos autoloads
- Connection refused: Verifique se o servidor está rodando e se a URL e a porta estão corretas.
- Infinite reconnect: Confirme se o servidor está encerrando o socket ou rejeitando o handshake.
- Android not connecting: Verifique se o dispositivo alcança o servidor via Wi-Fi e se a URL do servidor não usa
localhost. - Localhost not working on device: Troque
localhostpelo IP local da máquina que hospeda o servidor. - Missing internet permission: Habilite
Project > Export > Android > Permissions > INTERNETantes de gerar o APK. - Wrong local IP: Use
ip addr show wlan0no Termux ou confira a interface de rede na máquina host. - Server offline: Inicie o backend Node.js antes de abrir o cliente Godot.
- Port blocked: Garanta que o firewall permite tráfego de entrada na porta WebSocket escolhida.
- WebSocket é eficiente para estados multiplayer pequenos e médios, mas não substitui uma arquitetura de netcode otimizada.
- Prefira payloads compactos e evite enviar dados desnecessários a cada frame.
- Use uma taxa de atualização de rede sensata para sincronização de posição, em vez de saturar a rede com pacotes contínuos.
- No mobile, mantenha a replicação enxuta para reduzir consumo de bateria e overhead de rede.
- Evite spam excessivo de RPCs ou transmissões redundantes de posição quando o estado não mudou.
Contribuições são bem-vindas.
Abra uma issue ou pull request com passos claros de reprodução, uma descrição curta da mudança e qualquer nota de teste relevante.
Placeholder.
Placeholder.