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"

Online Sessions - "GameSessionName"

Hi everyone,

I'm doing some work with sessions at the moment, and I don't get how to use "GameSessionName" - It's const, but seems to be used all over the place for creating/joining sessions. Whenever I try to use different variables for named sessions, at some point or another, "GameSessionName" pops up and causes some errors.

Could someone please explain how I would be expected to use GameSessionName or get around the problem of it always appearing, since as far as I am aware, you need uniquely named sessions.

Any help/comments on this would be appreciated!

Product Version: UE 4.10 Preview
more ▼

asked Oct 26 '15 at 04:19 PM in C++ Programming

avatar image

8 2 4 7

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

2 answers: sort voted first

Session names are just a simple way to implement a basic matchmaking system that handles two states: game and lobby. UE4 expects to have your Game session use an FName("Game") while your lobby session FName("Party"), the name for the lobby session is a legacy from XBox Live where you gather a Party.

Long story short, if you are not up to creating a full lobby/game system and you only want to use a simple find/join system just use the "Game" session name, UE4 already knows what to do for the Game session.

more ▼

answered Oct 31 '15 at 02:25 PM

avatar image

6.4k 127 98 607

avatar image PBKS Nov 02 '15 at 01:22 PM

Thanks for the explanation, this was really helpful! Say I wanted to persue the full lobby/game system, does this mean I would need end the "Party" session, then create a new session for when the "Game" starts?

avatar image Moss Nov 02 '15 at 05:27 PM

You would have both sessions on at the same time, the game session would be there to hold all members of the game session while the party/lobby session would hold your party or team. For example you could build a team based matchmaking system where your party would be your team finding pvp matches againts other parties.

avatar image PBKS Nov 02 '15 at 05:51 PM

That makes sense! Thanks a ton!

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

hi for better understanding take a look to "Advanced Session Plugin" by mordentral (https://forums.unrealengine.com/showthread.php?69901-Advanced-Sessions-Plugin)

you get the gamesessionname by the onlinesubsystem when you create a session or as a sessionresult when you search for sessions. for steam it is equal the steamname..take a look at multiplayer shootout sample

so if you want to use custom servernames you have to add a custom session property (https://docs.unrealengine.com/latest/INT/Programming/Online/Types/index.html) and use that info in your server browser instead of using the gamesessionname

more ▼

answered Oct 31 '15 at 05:23 AM

avatar image

434 26 17 43

(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