Hello I have a question about headless servers. I have made games with photon before however I would like to create a game where it is full authoritive and no client is the server. So would I need to make a headless server in unity to act as my server side logic? And then upload that server to say AWS? Then how would I connect to that server? Would I need a networking library like Forge? Any info on how this all works would be great. Thank you.
In b4 close
Sorry I was posting this on my iPad and it posted before I got a chance to finish typing.
heh well ask away, I use unity headless with unet as dedicated authoritative servers.
So how does that work? Does the headless server act as the server side logic? Do you build and upload your headless server to a host like AWS or Azure? And then how do you connect to that server? Sorry for so many questions. I’ve been researching a lot but it would be nice to have some things cleared up.
Yep, write the server as a unity project, build to either windows or linux depending upon the host (I use ToggleBox, but there are many). Run the built server with the command line -batchmode -nographics to run it headless in the background.
As long as you have the desired port open, and allow the project access through the firewall, your client project should be able to connect to it.
Just for reference, I use NetworkServerSimple, and NetworkClient classes from uNet.
You rock! Thanks for all of the info. One more question. Do you use Unets matchmaking and have you used matchmaking that finds players with a similar level? I’ve only done random matchmaking that doesn’t take into account the players level. Do you have any advice on how to get started with that?
As I’m writing a multiplayer RPG, I don’t use matchmaking services. I have my own login/chat server, and a separate server for each walled-garden zone. Clients maintain the connection to the login/chat server, and connect to the required zone server for game play.
how do you handle multiple zone? i thought unet was limited to one scene per server ? do you use additive scene load or just have on server instance for each region ?
Do you mean on the client or on the server?
on the server
my login/chat server has only a single scene with half a dozen scripts running on it - mainly database handling, and uNet NetworkServerSimple.
each zone server runs a single zone (in one scene) with the identical map that the client has for that zone (in an assetbundle). When instantiating the map, it strips everything but the colliders as nothing else is needed on the server.
All the zone servers are the same project, but with different terrain assetbundle and config data file.
I’m sure there are many different ways to accomplish the same thing, this is just my method.