x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Understanding Lobbies in UE4

Hello everybody,

So that's the thing, How the lobbies works in UE4?. Well, we've using some code of the Shooter game for implementing the basics of an online game. We get working, the Creation, the Find and the Join of any online Session, but now, we want to implement a lobby before a match starts. By the way, I'm using Steam, NOT Null system, because the Null system doesn't has support for lobbies (Correct me If I'm wrong).

I've been trying to leave the session creation in a kind of pending state. How?, well, taking as example the ShooterGame, in the ShooterGameSession, we have a code similiar to this:

     void OnCreateSessionComplete(FName SessionName, bool bWasSuccessful)
     {
         IOnlineSubsystem* OnlineSub = IOnlineSubsystem::Get();
         if (OnlineSub)
         {
             IOnlineSessionPtr Sessions = OnlineSub->GetSessionInterface();
             Sessions->ClearOnCreateSessionCompleteDelegate(OnCreateSessionCompleteDelegate);
         }
         
         CreatePresenceSessionCompleteEvent.Broadcast(sessionName, bSuccesfully);
     
         if (!bWasSuccessful)
         {
             OnDelayedSessionComplete();
         }
     }

The way I've been trying to implement a lobby (in a dirty way) is postponing the broadcast message. We try this first because the broadcast message was the one that triggers all the Travel sentences in the code.

It didn't work.

Like I can't get any documentation about the subject, I'd like to get any clue before continuing with other heavy implementation. I thought that the way to achieve a lobby state (represented as a UI) is doing an explicit Travel to an Empty map. For example:

I begin the game in my Menu.umap, from here when I click on "Create match", the game travels to a Lobby.umap. This .umap is just an empty map that is displaying a Menu with all the lobby stuff. Finally, when the players has joined in the lobby (i.e., the Login method of the GameSession has been executed in the client-Host side for each player), then the host, clicks on 'Start Match'. Finally all the players travel to the Desired.umap with all specific parameters in the URL.

Am I having a good understanding? or maybe sor far of it?

Cheers

Product Version: Not Selected
Tags:
more ▼

asked Jul 14 '14 at 02:38 PM in Using UE4

avatar image

Juanma.elx
39 3 5 14

avatar image Juanma.elx Jul 18 '14 at 08:15 AM

I'm finishing my implementation, once I've finished it, I will post here my experience.

avatar image Devero Aug 06 '14 at 05:48 PM

did you get this finished?

avatar image ronaldk Aug 16 '14 at 04:00 PM

Hey, did you get it to work?

avatar image Omberone Sep 22 '14 at 11:49 AM

Like the two other comments, did you get it to work?

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

2 answers: sort voted first

[SOLVED]

Well this is just for documentation purposes. Basically I was right, with create find and join session you can find any online match, but you MUST travel to the server in order to get connected.

With the last version released (4.11) you have the opportunniy to create a lobby session in your main menu (without travels) and send invitation to your friends. Those friends don't need to travel in order to get connected to your party.

After you and your friends get connect to the party, you can now begin to matchmake any server available. If a match is found, alll of you will travel together to this server.

The code involved on those tasks is mainly inside the Module Online/OnlineFramework, {Lobby, Party and Qos}. I'm going to integrate in 4.8.3, because we can't move to the 4.11 yet. If someone is interested in something related with this topic, please feel free to ask here.

Thanks, Juan

more ▼

answered Apr 04 '16 at 11:36 AM

avatar image

Juanma.elx
39 3 5 14

avatar image Giuseppe Portelli Apr 22 '16 at 05:31 PM

Hi, I'm in the process of creating a Lobby for my game. I'd like to give a try to the new lobby classes in 4.11 but it's very hard because of the lack of documentation and examples. Can you tell me more about these classes or, if you know, some place where I can find examples or documentation? I'm digging inside the Unreal Tournament source code where I have found some Lobby beacon based classes, but still I can't figure it out.

Thanks,Giuseppe

avatar image Juanma.elx Apr 25 '16 at 08:42 AM

I've made the integration of the Lobby and Party Module. The real problem was the lack of implementation of the OnlinePartyInterface.

This module is based on this implementation, and now a days, there isn't any public OnlineSubsystem wich implements this interface.

So, my decision was to integrate Photon 3rd Party. It's a bunch of services that basically allows you to create parties, to do matchmaking on server side (this gives you the ability of matching people that is in a matchmaking process and send all of them together to a new server), etc. I'm doing the implementation of OnlinePartyInterface based on Photon.

I think Steam has all of those services, I'm using Photon because an internal decision of the studio. So I encourage you to research about rooms concept in Steam in order to implement by yourself the OnlineSteamPartyInterface.

Any doubt feel free to ask.

Juan,

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

We are currently working on other tasks. But a month ago, I accomplished a first try with lobbies. Let's suppose that we have those umap files:

  • Entry.umap (Where a main menu is displayed).

  • Lobby.umap (Where the lobby menu is displayed).

  • FFA.umap (A map to play).

So, from my Entry.umap a player can creates an online game session that will travel to Lobby.umap. Once you are inside a Lobby.umap (this loading process should be so fast becuase the Lobby.umap will be created from an empty template map and it will only render the UI).

The other players can search for this session and they will join into you Lobby.umap. At this point you have been able to detect all the players that have joined inside you Game Session using the Login method of the game mode. For example, If your game mode is: ALobbyMode, you can reimplement the login method in order to get the name of a player connected to the session, and display it in the lobby menu.

Now, the last step. You are in a session over the Lobby.umap with other 3 clients, but now you want to travel with your 3 clients to the FFA map. How Can I achieve this objective?

The tip is, "bUseSeamlessTravel". This is a member of the AGameMode class. In the constructor of the ALobbyMode, you should set this to true. If you look into the comment in code, you will find this:

" perform map travels using SeamlessTravel() which loads in the background and doesn't disconnect clients @see World::SeamlessTravel()"

Take into account that this boolean will change the way the players appears into the FFA.map, the Login method of the AFFAMode will not execute, because the players has already been log in this session in the lobby. You should read documentation about the seamless travel in order to complete the flow "Menu->Lobby->Game". Here are some interesting threads to read:

[SeamlessTravel and TransitionMap][1]

I will post here once I have fully accomplished the task. That's a way to implement a Lobby feature, maybe is another one, but I don'w know yet.

I you have any questions, post them here.

Thanks

more ▼

answered Sep 22 '14 at 01:31 PM

avatar image

Juanma.elx
39 3 5 14

avatar image Juanma.elx Sep 22 '14 at 01:33 PM

https://answers.unrealengine.com/questions/57860/correct-use-of-transitionmap-and-seamlesstravel.html

This was linked supposed to be in the line '[SeamlessTravel and TransitionMap][1]' Sorry :)

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question