- Home /
Authoritative server strategy
Hello,
I'm working on a multiplayer game and use uLink for the networking part. I'm kind of new to network programming so I'd like some help to make a wise choice about client-server strategy.
Each multiplayer game is composed of up to five players. One of these players has a very specific role to play, so it implies he evolves in a specific Unity scene with specific rules and behaviour.
To prevent cheaters I'd like to adopt an authoritative server strategy where every player actions are validated by the server. Because of the nature of Unity, and to make development as easy as possible, such a server would just be a special Unity scene. (As the game is planned to be released on console, I don't know if the choice of an authoritative strategy is wise).
If you think what you read so far is dumb, please shoot, I'm eager to learn about this topic. If you think what you read so far is coherent, then here are my questions:
Having a "special" Unity scene to act as an Authoritative server implies that each time players want to start a multiplayer game a new Unity instance is spawned (somewhere on a distant machine on the internet)... An empty Unity scene, even in headless mode on a Linux server, uses "a lot" of CPU. So if, let say, 100 players play the game simultaneously, it means that 20 Unity instances will be spawned and the server machine will surely not like it. Would it be relevant to do it this way?
Also what about server ports? 20 instances on the same machine obviously can't use the same port... so it would implies that every game session uses a different port? Would it be ok? Isn't there any wiser maneer to do?
Finally, what about match making? If my authoritative server is a game session in a Unity instance, it obviously can't act like a lobby. How to do such thing in a Unity context with an authoritative server? I've read about Master Server... but in my case the server can't be spawned before players are together...
What do you think about that?
If you have any experience with authoritative server and Unity, please tell me how you did it.
This post is surely not clear, and I'm sorry about that. Any help would be appreciated. Thanks for your advice.
Thanks.
Your answer
![](https://koobas.hobune.stream/wayback/20220613151854im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Unity networking tutorial? 6 Answers
Authoritative vs Non-authoritative server (turn-based) 0 Answers
Can a person be both a client and a server? (and more) 0 Answers
Authoritative server security? 2 Answers