
Simple WebSocket Multiplayer v3.1 Scripts 4.4 Community
Submitted by user Zee GameDev; MIT; 2025-09-15
# Simple WebSocket Multiplayer for Godot


A simple addon for Godot 4.x that provides a solid foundation for WebSocket-based multiplayer games, including a functional lobby, room system, and player synchronization. Mobile compatible.
## Features
* Automatic server connection.
* Simple lobby system (create/join rooms by code).
* Synchronized match start.
* Automatic spawning and management of player nodes.
* Includes a ready-to-use Node.js server example.
## How to Start (Quick Guide)
### 1. Install the Addon
1. Copy the `SimpleMultiplayer` folder into your project's `addons/` directory.
2. Go to **Project -> Project Settings... -> Plugins** and enable the "Simple WebSocket Multiplayer" plugin.
### 2. Set Up & Run the Server
The addon requires a Node.js server to run. The example server is in a separate repository.
**➡️ [Find the Server Repository Here](https://github.com/welson-rodrigues/ServidorWebSocketGodot)**
To run it locally, open the server's folder in a terminal and run `npm install`, then `node server.js`. For online play, a full tutorial on deploying to Render.com will be available in the video guide.
**➡️ [Full Video Tutorial (Coming Soon!)]**
### 3. Configure the URL in Godot
1. In the Godot editor, go to **Project -> Project Settings... -> Simple Multiplayer**.
2. Set the `Server Url` property:
* **Local:** `ws://127.0.0.1:9090`
* **Online:** `wss://your-server.onrender.com`
## How It Works
The addon provides two global Singletons:
* **`WebSocketClient`**: Manages the connection and communication with the server. It emits signals for key events like `connection_succeeded`, `room_created`, `room_joined`, and `start_game`. Connect to these signals in your lobby script to manage the UI flow.
* **`MultiplayerManager`**: Automatically listens for server commands to spawn, remove, and update player positions. It requires a node named `PlayerContainer` in your game scene to function.
## Example Project
For a complete and functional example, explore the `/demo` folder in the addon's main repository. It contains all the necessary scenes and scripts to see the addon in action.
## License
This project is distributed under the MIT License. See the [LICENSE](https://github.com/welson-rodrigues/GodotWebSocketMultiplayer/blob/main/LICENSE) file for more details.
---
*Created by Zee GameDev.*
*Visit my YouTube channel to learn how to use this addon!*
**➡️ [YouTube Channel]**
View files Download Submit an issue Recent Edits