How to make a 3D game online/multiplayer

Online multiplayer is an advanced topic and will require knowledge of networks to facilitate proper multiplayer experiences.

But there are two things to manage.

First, the multiplayer peer, this is used to setup the low level communication between peers. This tutorial explains some of these aspects. You will ultimately need to setup two peers, one as host, and one as client. This can be done in a number of ways. But typically you can setup multiple debug instances to run as host and client on the same computer connecting over the localhost IP.

The second, is Godots multiplayer nodes and RPCs. These features will create packets of information about the game state to each peer. I recommend using the multiplayer nodes (MultiplayerSynchronizer and MultiplayerSpawner) over RPCs, but will require scripting patterns to utilize them correctly. I would also avoid mixing RPCs and multiplayer nodes to synchronize a node, unless you know what you are doing. This goes deeper when considering Godots multiplayer api and Node multiplayer authority and network topology.

For further information, Godot does not provide any network quality features to allow developers to define their own. Here is the first of five articles on synchronization basics that i recommend. But there are a lot of other resources out there to find.

I found this plugin that may make some of these things easier but i have never used it to know.

1 Like