How do I travel my connected players BACK into the lobby FROM my online Game Mode?

Hi folks. I used Wes Bunn’s excellent Blueprint Multiplayer tutorial and getting my players connected in a lobby and then having them server travel to a new map and online gamemode works GREAT!

But when the win/end condition occurs in my game mode, what is the proper way to get all my connected players right back into that lobby map so we can just select a new map and go there?

Simply calling the console command servertravel /etc… like we did to get to the game map just crashes the game. What is the proper way to get the host and clients connected to a new lobby map session?

if the servertravel use absolute mode, all clients are disconnected,
I personnally use a client travel to my main menu map on the client who want to leave, it works great for now :wink:

Hi Matt,

Jumping in here with a possible solution to your question. I’m not quite sure why your project would be crashing though when using the servertravel command, would have to look at your project to see what’s going on.

In any case, continuing from the end of the Blueprint Multiplayer Tutorial series you could make the changes in this video to achieve what you are after: Bonus - Blueprint Multiplayer Tutorial (Returing to Lobby from Gameplay).

I do use the servertravel and seamless travel inside the GameplayGM Blueprint but there are some other things that you need to do inside the LobbyGM Blueprint when returning to it from a gameplay map as you are not “logging” in at that point but instead swapping Player Controllers from the GameplayPC to the LobbyPC.

Have a look and let us know if you run into any more issues.

-W

Wow, thanks for making the extra video! I am sure combing through that will do the trick. I will report back and update how it went. Lobby travel is on my task list for next week. Thanks again!

Also, in your tutorial we set up everything to find multiple servers but only connected to one. Could you do a follow up video that shows how to populate an actual server list?

I am tackling the back-to-lobby travel today. Hoping it’s as straightforward as it looks! Thanks again!

Yikes. Still crashes. I attached the log.

Funny, I originally did it as a server list but switched to a similar approach to the way that Paragon does it. That could be something I expand upon down the road as an update to the series as it would require a little more modifications to the existing system. Take a look at the Multiplayer Shoot project on the Learn Tab of the Launcher, though, it is set up similar to the tutorial series but uses a server list.

As for the crash, I’m not quite sure what’s going on from the logs, will need to confirm with the team around here.

Thanks Wes! I ripped the Multiplayer shootout server row and server list functionality and got it working easily. ShapeRockets will have a “Play Now” that jumps people right into a lobby with no fuss and now also a choice to select specific servers. At any rate, thanks for taking a look at the crash issue.

Hey Wes, any update? We are getting close to release and I’ve combed through a ton and can’t seem to track this down.

Fixed. I think I know why my fix worked but since I don’t have any debug log proof or coding experience here, it’s just a guess. Posting my answer as an answer to be accepted!

SOLVED.
So on each of my Character Blueprints my Player Controller blueprint (GameplayPC) was selected under “Ai Controller.” I saw that as unnecessary since they are player controlled. So I set the AI Controller to none. This coupled with setting both the Lobby Game Mode and Gameplay Game Mode default character to “default pawn” so they would match for good measure. (My Game Mode blueprint was originally setting default character to none.)

Tested and working. My guess is that there were extra player controllers (GameplayPC) spawning in the level since each character blueprint had one pre-assigned under “AI Controller” which caused server confusion? I can’t quite say, but I know it’s fixed and working!

I hate to necro this thread but it is a thread which most resembles the problem I am currently having. I am simply trying to send my two players back to the lobby after they have reached a ‘game over’ event. This was a functionality that worked well prior to implementing a steam interface utilizing a hard ‘servertravel’ but once I implemented the steam subsystem I was forced to move to ‘seamless travel’ and things stopped working from there.

Using the steam subsystem as well as seamless travel, I am able to have both players go from the main menu to a static lobby level where character selection happens (only 2 characters may be selected). One player hosts the game, the other player finds and joins it…simple enough. Both players select their character and the host then begins the game using console command servertravel with map name. The lobby game mode has seamless travel enabled and the game begins and both players load perfectly and the game plays just how I intend.

After the players lose or win, a “game over” screen appears and now the problem comes up. The host clicks on the “Restart Button” and I try to get the players back into the lobby.

We call the “RestartTheGame” event and do another server travel back into the lobby.

From here, both players seem to disconnect from the session and both players just go straight back to the main menu screen. This is where I am stumped. Like I said before, prior to utilizing the steam subsystem, restarting the game wasn’t an issue as I was not using seamless travel. After being forced to use seamless travel with the steam subsystem, it won’t let my players both go back to the lobby to select their characters and then seamless travel back into the gameplay map and play again.

Both lobbyGM and gameplayGM have seamless travel enabled.

Any help here is greatly appreciated as to why it seems to kick both players our of the session and back to the main menu rather than using servertravel to take them both back to the lobby. THANKS!!!

Edit:

After removing the change state on game restart, my game session no longer gets destroyed and both players are taken to the lobby. Now my only problem is that the server has his lobby screen kind of squeezed into the middle of the screen like it was shrunken somehow. The clients lobby screen displays perfectly. Any idea as to why this might be happening?

1 Like

What do you mean by “change state on game restart”?

Currently I am developing multiplayer game for dedicated server which I am planning to implement almost same principle. How do you come with solution ?

Is it solved ?

After win/ loss or time up do players kicked out of server level to local main menu level ? If so in mean time if new players want to join the game ? How are you handling those without game sessions? Since it is not listen servers ?