Hello, I have little experience with networking, especially in Unity, therefore I am asking how to do it and if it is possible by default Unity means.
The structure I thought is following: Game ↔ Dedicated Server ↔ SQL Database.
Basically, I want to know if it is possible to make a dedicated server for a game in Unity. The server mostly should only answer client’s data requests and process data submissions and sending small files (1 - 5 MB) to clients upon request. The data submissions are not frequent: around once per 10 - 60 seconds per client. The data requests should not be very frequent too. There will be no real-time interactions between clients. There will also be many clients, for example, around ~1000.
Is it possible to realize it using default Unity networking features and, if not, what would be a best way to do it?
I apologize if my question and language are not very clear, I am not native English speaker and my English is not very good.
Its absolutely possible. The fact that Unity standalone apps can be exported for Linux, even without any graphics computing (headless mode, so in fact it becomes a console application), makes it very much able to handle a setup you are describing. The greatest advantage is maintainability and the easiest implementation of authoritative server setup and server-side collisions possible.
In fact my Asset Store package uMMO ( Unity Asset Store - The Best Assets for Game Making ) is very much optimized for the use with UNet (default Unity networking) and dedicated servers. Developing/testing happens on the local developement machine whereas production-ready servers can be deployed on any machine on the Internet. We are working on databases at the moment, it is not part of the package yet. We tried to keep the functionality general for we know there are many kinds of game/simulation setups, but flexible enough so to be able to work with as many 3rd party solutions as possible.
I talked to the UNet developers in person and they confirmed to me that a single server instance with around 1000 players is being seen as something that should be possible and viable, of course the physical hardware of the server needs to reflect the resource requirements.
Hi @Goxatu, it’s not very clear what the server is supposed to do, will it send real-time game updates as well (player positions, animations, etc)?
If it only sends files and data about players etc, you can implement the server in whatever language you want, as long as the Unity client can understand it.
For example: you can write your server using nodejs and websockets. Then on the Unity game, you use a websockets library to communicate with the server. Then you can run the server on linux, mac, etc.