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!