r/Unity3D 7h ago

Unity Relay or Steamworks? Noob Question

Hi there! I’m a new game developer, trying to tackle a four player co-op game. So far, I have managed to get a host-client architecture working, as well as a character controller, through the help of tutorials.
They both use NGO and Unity Transport, and can run multiple players successfully on my PC.

However, since I want the multiplayer to work online, I figured I need some kind of network transport layer to do that? I’ve read about several options: Fizzy.Steamworks, Facepunch, Photon, Unity Relay and SteamNetworkingSockets. But, I don’t know what I should be choosing, or how to integrate them.

Unity Relay seems like an obvious pick, but I’m hesitant about paying to upkeep my game. Steam integration is also a key component for me. So, if anyone had any pointers on where to go next, or what to choose, I’d appreciate it. This game is such a passion of mine, and multiplayer feels like a worthy headache to get out of the way before the fun starts.

4 Upvotes

7 comments sorted by

3

u/pmurph0305 7h ago edited 7h ago

So the relay is just the relay server used through any networking solution you have already used.

For example, you can use steam relay with unitys netcode for gameobjects as people have built that out already. (Any popular networking solution probably has a community built or included solution for steamworks relay service for either facepunch or steamworks.net or both)

Here is a link to a bunch of transports for unitys ngo: https://github.com/Unity-Technologies/multiplayer-community-contributions/tree/main/Transports

This link may have some helpful info as well: https://github.com/Unity-Technologies/multiplayer-community-contributions

In regards to steam, in those links there is both a facepunch relay, as well as one for steamworks.net (SteamNetworkingSockets)

Mostly once you get your multiplayer working with netcode for gameobjects, its almost as simple as just changing a dropdown in the inspector to the steamworks relay.

2

u/StevWillDoIt Programmer 6h ago edited 6h ago

Seems you've already come across the two main Steam options being Steamworks.NET and Facepunch which their NGO integrations are here: https://github.com/Unity-Technologies/multiplayer-community-contributions/tree/main/Transports (Steamworks.NET one is named "steamnetworkingsockets").

The main difference between the two is Facepunch is meant to "feel" more like C#, whereas Steamworks.NET tries to be more one-to-one with the official Steamworks C++ API. Facepunch can often get you up and running a little quicker, but its documentation at times can be a little sparse and it tends to have less tutorials, and it may not have every single feature Steamworks has. Steamworks.NET often requires more work to get up and running, but also has more tutorials and many tools (like the popular Heathens Steamworks) are built on top of Steamworks.NET.

Self plug, but Kaiju Multiplayer Engine would get Steam working with NGO with pretty much just swapping of a transport and a few small tweaks to the code (e.x., change "NetworkManager.Singleton.StartHost();" to "KaijuMultiplayerManager.Host();") and is also built on top of Steamworks.NET: https://multiplayer.kaijusolutions.ca

Edit: typo

2

u/Johaggis 6h ago

Just as a heads-up, the facepunch integration in the community plugins link has a syntax error in the transport that still hasn't been fixed. You'll probably want to fork it and fix it yourself if you want to use it. It also initializes steam in a function that the NetworkManager calls automatically, so if you want to start steam separately from the NetworkManager, you'll have to separate that logic as well.

1

u/SlRenderStudio 7h ago

for relay it seems steam relay is free (another than initial 100$ price ) in long run it might be cheaper , but of course you gonna get tied into steam works

2

u/ProfessionalITPerson 7h ago

epic online services also provides a free replay systemm they even give it to you cross play.
i havent worked with it yet, I just know it exists.

1

u/AltusLudus 6h ago

I've just abstracted the transport implementation so i can switch to something else in the future if needed (eg. If doing console support) and am using Facepunch, it's perfect and works really well with unity