So I’ve been making a game in unity that has multiplayer. The issue is that the host would have a lot of lag as it has to load a lot. As well has he has to stay afk on the server to keep it online. So I would like to know of you can make dedicated server and how to work with it. For example you can call rpc’s to the host but what about to the dedicated server. Oh and some examples of what I have in mind is in game like: Ark, Minecraft, Garry’s mod and Starbound. Also as well as being able to type in commands into the dedicated console. Thanks for your time!
I believe with the new Unet in 5.1 you can use the network manager to build one. I have stumbled across settings and such that would hint to that.
A way I was thinking about doing it, warning this is theory that might help your thought process, is to write a script that handles all of your spawning of players, but does not do it on server launch. It would pretty much just be a server with a camera above your map, like a lobby. On the ‘client’ build, it would have a connection script, once it connected to the server, it would tell the server, hey I’m here and spawning at this transform, the server would then tell all the other clients where you are and update you as to where they are. You will have to do some scripting for smooth moving and syncing, but there are lots of tutorials on that. (if you need some let me know, Ill post links)
Essentially making the server just a relay that all the clients have to check in with.
Both the client and the server would be the same build, but when you launch your ‘server’ you would just tell it, you are the server, await connections, and it would render nothing, but what ever your main camera is looking at (lobby scene).
I wrote a proof-of-concept websocket server and Unity client. One implementation in Python and one in Golang. Maybe this will help!?
Did u ever get this working if so I’ll love look at it for I’m trying figure out same thing as well but having little issues getting codes work new update has messed with my stuff so doesn’t all work 2 well