Game Instance with mulitple Dedicated Servers

I’m trying to make a multiplayer game that spans across multiple levels and need to use dedicated servers. Basically, from the lobby the player begins play and enters their “home” level. During the game they can bring up a widget that displays a list of other levels in the game and a player can choose one from the list to travel to. The idea is that while the game is running players can be in different levels and the only way I can think of do that is with a dedicated server for each level.

I’ve been able to make it work by packaging, launching all of the dedicated servers, then launching the clients. I just specify the port of the corresponding server in the clienttravel url based on the level they want to go to.

What I’m trying to figure out is- is there a way to launch a dedicated server for a level a client is requesting client travel to if one isn’t running already? I’d really prefer not to have the servers running when no players are in the level. In other words, shut them down when the last person leaves and spin them up when the first person requests travel to the level.

Either that, or if there is a better way to structure it as whole I’m all ears. Thanks!

You could probably do that via beacons. Basically beacons let clients speak to a server they are not connected to.

1 Like

@WizardCell Thanks! I wasn’t aware of Beacons, it appears like a promising solution. With Beacons I can probably have separate non-game server that operates as a “server manager.”

You should check out Open World Server (OWS2) - it sounds like it’s a perfect match for what you are looking to do and they have a very helpful discord if you have questions.

Is there a way to launch a dedicated server for a level a client is requesting client travel to if one isn’t running already?

In my opinion, instead of using client travel instantly when you press the button, first send a HTTP request to your backend in the cloud (eg serverless function) that will manage shutting down and launching servers, then await until the server launches, then client travel.