P2P without dedicated servers, only good old LAN.

Godot 4.2 (mono-stable)

Godotovchans! Good people!
I want to consolidate the thoughts and seen in the guides material “about multiplayer”.
All poked, thought and did not fully understand how exactly creates a network game without using Steam, Web and other platforms.
Only good old local in Radmin, Hamachi. I want to start trying P2P for there are no resources to install their own servers or even more forces to sort out the connection with Stim, it is already self-same time.
Very, straight I will be very grateful if you find an answer to my question.
I am grateful for the answer in advance, bless you the Spirit of the Machine.

You kinda need a server, also it can also be a client. Just one of the peers has to keep track of stats, connected clients and a like. The godot docs have some goodies for you

Îf you want to do something old school in multiplayer you don’t need a third party like Radmin, Hamachi. You only need a host and client. You use the same game for every player. One player should be the host, its godot game will listen to a port you configure, and then other player can connect to its game using its computer ip (if you are on lan you just need to open the port on windows (by default it should be blocked)). Yuo can also doing it online with some port forwarding on the host box.

You can checkout this tutorial to understand basics of host/client code on godot

It explains the basics well, but i advise you not to copy paste his code it’s not so good :stuck_out_tongue:
Also like soupstitute said you should checkout the doc also it’s really well written.

About the port blocked and port forwarding, just start looking on google i think with those keyword and you will find tones of stuff explaining how it works. Also chatGPT explains it well :wink:

Hope that helps you

Operating without a server nowadays is extremely difficult. Most internet service providers (ISPs) block UDP ports in many countries, preventing direct connections. In Brazil, for example, opening ports and gaining full network control requires a business-grade internet plan with a fixed IP and dedicated bandwidth, making access more restricted and costly. This situation complicates the deployment of self-hosted services and local solutions.

1 Like