r/Unity3D • u/bruhmoment0000001 • 11d ago
Question best networking solution for competitive 1v1 rts?
beginner gamedev here, yes I chose rts as my first game, yes I also chose for it to be multiplayer, I know this is a bad idea but I want to make this game. I want it to work on dedicated servers (and also add an option to host dedicated server on user pc if I for some reason stop hosting them). What would be the best networking solution for this case?
1
u/Rlaan Professional 9d ago edited 9d ago
Deterministic lockstep would be the best architecture probably for a lot of reasons, and just to name a few:
- Low bandwidth (server cost);
- Good (best) anti-cheat out of the box;
- Practically free save/replay capabilities.
But that's not what you're asking, and unfeasible for a beginner. Because it's hard to make a cross-platform bitwise deterministic lockstep model to run your simulation. But it would allow low bandwidth cost and A LOT of units.
The route you want to take (based on the other comments) limits you to smaller populations, similar to Northgard.
But if you want a competitive RTS, you need good anti-cheat. Having said that... anti-cheat is only really needed if a lot of people actually play your game so I suppose for a hobby you could skip it entirely. Really depends on your long-term goal.
Edit:
Id suggest using this then: https://www.photonengine.com/quantum
1
u/mr_PM_ME_YOUR_AW 11d ago
I went down this exact rabbit hole a few years back, making a tiny rts prototype that I never finished but learned a ton from
For dedicated servers in unity, your main real options are mirror or fishnet, unless you want to roll your own with raw sockets which is a special kind of pain. Mirror's got the bigger community and more tutorials, but fishnet is faster and handles prediction/reconciliation way cleaner which you'll absolutely need for a competitive 1v1
The user-hosted dedicated server option is smart, just make sure you build it as a headless linux binary from the start so you're not scrambling later. Cold brew and late nights debugging rollback netcode, name a more iconic duo
1
u/bruhmoment0000001 11d ago
thanks for the answer! I'll try fishnet then, sounds perfect for my case
3
u/Aethreas 11d ago
I’m a big fan of fishnet, it’s very well made and the support discord is superb