TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Making peer-to-peer multiplayer seamless with Godot (2022)

126 pointsby dulvuialmost 2 years ago

7 comments

Laremerealmost 2 years ago
&gt; If you’re looking for a way to have peer-to-peer multiplayer without setting up your own server, have a look at Steam’s Networking API which also has a Godot integration via GodotSteam, or have a look at the Epic’s NAT P2P API. Both provide NAT hole punching support with relay services as a fallback.<p>Steam used to work this way iirc, but they now always use a relay. This is user friendly, because with normal peer to peer your IP address is given to other players. DDOSing, bringing down Twitch streams, and all sorts of unfun things can result from that. Of course, this does give steam your users&#x27; IP addresses.
评论 #37008326 未加载
评论 #37011785 未加载
jasonjmcgheealmost 2 years ago
(2022) - specifically January. This is particularly relevant as Godot 4 released in March 2023, and multiplayer was overhauled.
jscottmilleralmost 2 years ago
I’m not familiar with Godot networking primitives in 3.X, but 4.0 contains WebRTC support which, combined with a STUN&#x2F;TURN server, solves the hole-punching problem. You need to run a signaling backend to pass connection info between the peers, but you’ll probably want to build a messaging service anyway for matchmaking.
ktbwrestleralmost 2 years ago
This is awesome! As someone new to Godot that wants to learn how to build multiplayer asteroids, should I try to build something standalone or browser based? Do you recommend any tutorials to get started?
评论 #37010960 未加载
评论 #37009791 未加载
jesprenjalmost 2 years ago
So they don&#x27;t need a server, but they need a server at the same time (:<p>One could abuse BitTorrent&#x27;s existing DHT infrastructure (:
评论 #37011104 未加载
turpialitoalmost 2 years ago
Wait, Didn&#x27;t Quake and Unreal used to network by self-hosting?
评论 #37008816 未加载
评论 #37010511 未加载
评论 #37009076 未加载
grumpy_coderalmost 2 years ago
The cost of servers these days, you really shouldn&#x27;t be playing with NAT hole punching except for your own interest&#x2F;fun.<p>The number of simultaneous players on your little indie game are just not going to cause one medium sized server to break a sweat.
评论 #37012863 未加载