Unity's game server hosting (Multiplay) vs Netcode for Gameobjects

Hi everyone,

I’m want to start working on a multiplayer game that includes several mini-games. I’ve decided to use Unity’s solutions. I’ve come across Netcode for GameObjects (NGO) and Unity’s Game Server Hosting (Multiplay), but I’m having trouble deciding which one to use for my project. From what I’ve learned so far, NGO is beginner-friendly, while Multiplay is for when the game needs dedicated servers. However, I’m still unclear about the differences between using the two [aren’t they both doing the same thing (multiplayer stuff)?].

Additionally, my game will have in-app purchases (IAPs), virtual currencies and leaderboards, so anti-cheat measures are a top priority for me. Could anyone provide clarity on the differences between NGO and Multiplay and suggest me the better option for my needs?

Sorry if this is a stupid question, I’m just starting out and I don’t know where else to ask for help. Thanks in advance!

I suppose this is because they are complimentary technologies, not some where you chose one or the other. Read the manuals‘ introductions again. :wink:

NGO: network connection, client synchronization
GSH: your game server executable runs on this cloud service

Anticheat is not something you just turn on or chose the right technology. In almost every case, cheats (rather: exploits) are possible due to how you design and program the game.

1 Like

NGO and Multiplay are completely different parts of the multiplayer infrastructure.

If you need to communicate with clients, you should use NGO and/or Lobby. If you are familiar with RPC and NetworkVaribales, they are part of NGO and almost every online multiplayer game needs them.

If you need to connect clients, you should use Multiplay or Relay. Also, if you are using NGO, you should use Multiplay or Relay. Of course, there are some technologies that you can use with NGO other than Multiplay and Relay, but I think they are harder to use than these two.

As @CodeSmile said, anti-cheat depends on how you program the game, but Multiplay has anti-cheat because you can keep all computations on server side.

1 Like

Thank you for your replies.

I did some research on Unity Relay (which I now realize would be a better comparand to Multiplay than NGO in the og question). Correct me if I am wrong about my learnings and deductions:

  1. Unity Relay service removes the need of dedicated servers (Multiplay) by acting as a proxy.
  2. Multiplay is the opposite. It hosts games in dedicated servers to which the players can connect through Matchmaking.
  3. Since Unity Relay is based on P2P connections, the host might have an unfair advantage (ping and maybe even cheating)?
  4. Therefore to prevent the possibility of that, I need to use Multiplay with NGO (of course, assuming that I will properly implement anti-cheat?

I think it’s okay, you got a better perspective on these technologies.

  1. Relay allows client to client communication regardless of their router settings (NAT). Some games still require a dedicated server, mainly for authoritative reasons and to provide a consistent play experience.
  2. Yes.
  3. This is often confused but technicall, Relay only emulates P2P because the peers are never talking directly to each other. All traffic is routed through the Relay server. Consider the Relay as a dumb dedicated server that only passes traffic along, and the end effect is sort of like P2P while that‘s technically not the case. The host always has 0 latency.
  4. Yes. But again, anticheat isn‘t something you implement. It‘s about designing the game in such a way that players can‘t exploit loopholes in the game mechanics and also properly engineering each feature to prevent at least the easiest hacks. None of this matters however if your user base is just a few hundred players a month. So you could as well just respond to issues you are made aware of.
1 Like