I am considering buying a copy of Unity Pro, however I’m unsure if it will fit my needs. I realize that it’s capable of running headless, so I could run it on a dedicated server without a gpu - but would this solution allow me to do the following?
Setup a master server that clients poll to find a game server, similar to what TF2 does.
If the master server can’t find a suitable server to connect the client to, it sends out a request to the various server (Machines) to see which machine can start a new dedicated server
Once a machine is found to start the server, it does so - it spawns a new Unity Pro headless server, and tells the master server it did so
The master server sends the information (IP, port) back to the client
The client connects to the new dedicated server and the server informs the master server that it has a player on it, allowing more players to join.
I’m not looking to make an MMO, however I want to be able to make 16, and maybe up to 32-player headless servers using just Unity, without any hacks. Is this at all possible? Because from what I’ve read, it seems like you can’t use Unity scene information, or physics or something along those lines… I’d really rather not have to spend months hacking together a new server side physics system or something like that - I’d rather be able to just use Unity Pro headless to read the scene information, and handle all the collision detection and all that so the clients can’t cheat.
Not sure about your question specifically, but have you looked at tasharen networking? Same dev as NGUI. I’m just starting to experiment with it, but pretty sure it can handle everything you listed. Or you could adapt some of the source if needed. (It can use a standalone server that runs on amazon etc)
You can create the server side of the game with unity and it can run in headless mode. The server list though is handled by another app called master server (google it). Now obviously you should be able to call up new servers, but doing so is not automatic, you will have to take care of it.
Unity has a separate thing called the Master Server (http://docs.unity3d.com/Documentation/Components/net-MasterServer.html) which is basically a lobby server for players to look for game servers. That will solve some of your problems, but it only works with existing instances of your game server (which can be the Unity Pro headless server). I don’t think it has a built in way to spawn new instances of the game server if it’s not already running. That shouldn’t be too hard to write custom code for though… you could have a little shell script that tracks how many server instances are in use and then launches the executable on an unused machine when it needs new ones. That executable (which would be using the headless server) could then register itself with the master server and players could connect to it.
The headless server can handle collision and physics and all of that correctly once you have the instance actually running.
Jonch also asked how much headless instances can run one one dedicated machine. I know that it depends of hardware configuration, unity complexity etc… but do you have some numbers that you can share?