[Dedicated Server] How to setup a Lobby and Sessions?

Hi everyone,

I am trying to create a Moba type game, and so I have to make a place where players can connect and join newly created sessions, on a dedicated server.
What should be the best way to do this kind of behaviour ?

I have already check the ShooterGame Example, but it seems to be for Listening server.
I read that OnlineSubsystemNull allows to create a custom master server, for the use of OnlineSubsystem, but what should I do with it ?

Cheers,

Any way would be really appreciated !

Dedicated Server need to be hosted somewhere, so if you want dedicated servers you would need to create sessions similar to shooter, where it restarts all the time. If you want to have sessions like in typical MOBA, one of the players need to be a host, or else some othersubsystem has system to host somewhere else but i don’t think so.

Hi and thanks for the answer ! :slight_smile:

I don’t really want a player to be the host of the session, because of cheats issues. Isn’t it possible to host a session on a dedicated server ?

bumping this, as Iam having issues with the same thing. Shootergame does not work under dedicated server.

So it appears not to be possible based on the lack of answers, but I don’t believe that, Some one must have done it.

One year later… no more anwser…

Same problem here. What i realized is that run a dedicated server it already create a session for you. When you try to create a customized session for example inside of your game instance it complains about player state… I feel im close to find a solution. Please mail me then we can discuss better about this topic

Have you solved this problem sir?

Well i’m concerned about this too and i found sth similar to what rsaz says, And below is my opinion.

In GameMode has a ‘AGameSession’ member, which represents a session in it. What rsaz says ‘a dedicated server already create a session for you’, that’s because the function ‘InitGame’ in ‘AGameModeBase’ defaultly create a session. So i guess you can override this function in your gamemode to do sth properly.

I think The GameSession member is for managing clients’ connection if you have only one dedicated server. When a client is asking for matching just let him login this default session. After that, your server waits for other matching requests until enough. Then open a new session for them and let them go into your MOBA game map. In AGameSession there’re several functions accepting SessionName as a parameter thru which i think can manage the session you created.

Am i right or totally wrong :stuck_out_tongue:

Or you can also maintain an array in your gamemode. When you create a session, add it into this array and you can manage multi rooms of game…

Any updates on this? I want to know how to host multiple sessions in a Dedicated Server too, as I have no idea how to setup the creation of a server for each match.