So I’m DEEP into making my multiplayer game with netcode for game objects. It’s a third-person over-the-shoulder game with stylized graphics in the looter/extraction genre. The core feature of the game is PvP but I’ve just read the comments on this post linked below and am panicking that I’ve chosen the wrong network architecture to achieve my goals. Is using netcode for gameobjects for a competitive game impossible? Has anyone done it before? I’m willing to learn how to do “client side prediction, lag compensation etc. to deal with the latency” but I really want to know if its impossible or just hard. I’m okay with hard but is it just foolish? Like I said I’m deep into making this game at this point and I don’t know anything about DOTS (I imagine updating all my code in DOTS would amount to remaking the game from scratch).
https://www.reddit.com/r/Unity3D/comments/1602sl1/multiplayer_options_netcode_for_game_objects_vs/
Thanks,
yamm
Let’s clear the air on the DEEP statement. If you have not been play testing your core pillar, pvp shooter, you’re not actually deep into game development… even if you feel you are. If you have been testing with real players across the Internet, what are the actual problems you’ve encountered? This post doesn’t give us much information beyond genre.
You’ve mentioned “competitive” but it’s not clear if you intend to release a competitive title. A pvp game can exist without having competitive integrity which is what most people mean by “competitive” e.g. harder to cheat, meaning dedicated servers and no client authority are mandatory (though Photon Quantum and Tashi networking have attempts at solving this without servers).
For shooters you’ll usually want some client side prediction, snapshot interpolation, and server lag compensation / rollback. Netcode for GameObjects doesn’t provide those, Netcode for Entities does.
If you’re unfamiliar with Entities and deep into development you’ll need to make the call on a rewrite. Probably best to make that leap on your next game, but only you can decide. If you have noticable gameplay issues caused by the lack of netcode features you can still salvage monobehaviours via a number of options:
-
Migrate to a different monobehaviour netcode solution with the features you need. Photon Fusion (paid and proven solution) and Mirror (open source, historically less performant) have similar API to NGO and the features mentioned. FishNet and Netick (freemium) supposedly have the features needed, FishNet is already mentioned in that reddit post. KinematicSoup Reactor (paid) would be a bigger refactor, but does the job. Photon Quantum (paid) takes a deterministic physics approach. Tashi protocol (paid) takes a distributed consensus validation approach.
-
Modify Netcode for GameObjects. The reddit post has a detailed comment that mentions using NGO for competitive pvp. Note that NGO has an anticipation API that would allow you to code some prediction logic, but you need to do it yourself. You could look at Mirrors snapshot and rollback implementations and adapt them to NGO. They intentionally abstracted the c# code so the algorithms could be used elsewhere: Snapshot Interpolation | Mirror and Lag Compensation | Mirror
-
Write your own netcode solution specific to your game. Lots of research, lots of learning, likely little payoff given multiplayer is not just hard from a technology standpoint but also uphill challenge to grow a playerbase. Start with a lobby based approach so friends can play together, only try matchmaking if you’ve clearly got a playerbase.
2 Likes
Thanks for the thorough response!
This has been very helpful and I appreciate you providing so many options for me to consider.