Hi, in this post I will be discussing Godot and how we can use our own UDP implementation to make online/multiplayer games.
Implementations using ENet
Godot comes with its own implementation of connectivity using its built-in ENet. It has a lot of good features, like sync data, RPC, and others that I didn’t use. Since it’s its own system, this means we have to use a Godot executable to act as the server or peer-to-peer implementation. Sometimes using these implementations can be a bit annoying and underwhelming.
Peer-to-Peer (ENet) — Godot
There are a lot of functions that we can do with this implementation, like very basic games and player games where data is given and received between each other.
This implementation has many weaknesses:
- Sometimes restricted by local networks.- Functionality outside of the local network becomes more difficult. For example, we don’t want the player to expose their game host across the internet to another peer. It’s possible, but not ideal.
 
- All of the data will come from Peer A (the host), while the rest of the peers simply join that host.
- For simpler games, this implementation can be a good idea, but in more complex cases there’s a different approach:- A wrapper service acts as the middleman, assigning peers and providing a connection between them (similar to how matchmaking or relay services work). It’s the same but it has extra steps to allow online connectivity