Advanced Sessions Plugin

[QUOTE=HughieDM;344020]
Im getting a build error on the mac

How should this be fixed?

Comment out that line it is not required as the same variable was already declared and initialized above, I was using it twice over for two different reasons and must have blanked and re-declared it :p. I’ll post an update with that fix in a moment after I look into the dedicated server playercontroller-less session question.

The code will still run fine but obviously VS doesn’t care as much about declaration efficiency with default settings as GCC does so it passed by and is throwing a warning to you.

Edit Re-did the advanced sessions node to support the dedicated server boolean from the session settings and to allow for the playercontroller to be optional, will upload today. Keep in mind that without a player controller there is no UniqueNetID to send to the subsystem so it will be passing through NULL/0. Not passing a playercontroller WILL NOT WORK with client builds with Steam, as it initializes the steam api and expects it. However from what I have read dedicated servers should be fine without it being passed in.

This includes removing the line that is throwing a warning for you.

I will only upload for 4.8 on this release as my 4.7 install is gone, if anyone needs 4.7 I can upload it eventually but would have to re-install 4.7. At this point 4.8 seems like a far more stable build overall anyway.

Edit2 Uploaded

Thanks for the information. :slight_smile:

Maybe a stupid question but…
What about Android compatibility with google play and Google Online Subsystem? Can I use it with that as well? And will the new features work?

[QUOTE=Z-enzyme;346162]
Maybe a stupid question but…
What about Android compatibility with google play and Google Online Subsystem? Can I use it with that as well? And will the new features work?

Everything that Subsystems have in common will work. Subsystem specific things will need the header files of the specific subsystem. Creating and joining
sessions should work, as long as the Subsystem is supported.

[QUOTE=Z-enzyme;346162]
Maybe a stupid question but…
What about Android compatibility with google play and Google Online Subsystem? Can I use it with that as well? And will the new features work?

This should answer your question I hope, it is from the google play subsystem header file, all things that return a null_ptr are not implemented (including sessions).

Please note that I do not have a leaderboards or achievements interface implemented…yet…I might pick it up when I have some free time.

Both friends and sessions don’t have a google implementation, looks like just store / leaderboards / Identity / achievements. My plugin would be fairly useless to you at the moment.


IOnlineIdentityPtr FOnlineSubsystemGooglePlay::GetIdentityInterface() const
{
	return IdentityInterface;
}


IOnlineStorePtr FOnlineSubsystemGooglePlay::GetStoreInterface() const
{
	return StoreInterface;
}


IOnlineSessionPtr FOnlineSubsystemGooglePlay::GetSessionInterface() const
{
	return nullptr;
}


IOnlineFriendsPtr FOnlineSubsystemGooglePlay::GetFriendsInterface() const
{
	return nullptr;
}


IOnlineSharedCloudPtr FOnlineSubsystemGooglePlay::GetSharedCloudInterface() const
{
	return nullptr;
}


IOnlineUserCloudPtr FOnlineSubsystemGooglePlay::GetUserCloudInterface() const
{
	return nullptr;
}

IOnlineLeaderboardsPtr FOnlineSubsystemGooglePlay::GetLeaderboardsInterface() const
{
	return LeaderboardsInterface;
}


IOnlineVoicePtr FOnlineSubsystemGooglePlay::GetVoiceInterface() const
{
	return nullptr;
}


IOnlineExternalUIPtr FOnlineSubsystemGooglePlay::GetExternalUIInterface() const
{
	return ExternalUIInterface;
}


IOnlineTimePtr FOnlineSubsystemGooglePlay::GetTimeInterface() const
{
	return nullptr;
}

IOnlinePartyPtr FOnlineSubsystemGooglePlay::GetPartyInterface() const
{
	return nullptr;
}

IOnlineTitleFilePtr FOnlineSubsystemGooglePlay::GetTitleFileInterface() const
{
	return nullptr;
}

IOnlineEntitlementsPtr FOnlineSubsystemGooglePlay::GetEntitlementsInterface() const
{
	return nullptr;
}

IOnlineAchievementsPtr FOnlineSubsystemGooglePlay::GetAchievementsInterface() const
{
	return AchievementsInterface;
}

Well, all I want is to have the ability to NAME THE SERVER. Nothing more. Pretty basic.

Any hopes for that to work?

Anyways, great work, keep it up, and thanks a lot mate. I’d even consider a small donation if that worked cause this would be a think I used a lot.

[QUOTE=Z-enzyme;346301]
Well, all I want is to have the ability to NAME THE SERVER. Nothing more. Pretty basic.

Any hopes for that to work?

Anyways, great work, keep it up, and thanks a lot mate. I’d even consider a small donation if that worked cause this would be a think I used a lot.

Well according to the file google play doesn’t support sessions AT ALL, and you can’t rename one if you can’t host one…so you are out of luck as far as I am aware.

Wait… Maybe I’m just dumb like a stone or something but, does that mean that Google doesn’t support sessions at all? Like, neither the standard Unreal Engine built-in sessions?

[QUOTE=Z-enzyme;347321]
Wait… Maybe I’m just dumb like a stone or something but, does that mean that Google doesn’t support sessions at all? Like, neither the standard Unreal Engine built-in sessions?

They don’t have anything at all for google play for sessions, so no I wouldn’t think so unless you filled it in yourself. They might have plans for it at a later point?

[QUOTE=Z-enzyme;347321]
Wait… Maybe I’m just dumb like a stone or something but, does that mean that Google doesn’t support sessions at all? Like, neither the standard Unreal Engine built-in sessions?

You may want to check if Google even has Sessions and Server Hosting. The build in Session System from UE4 wouldn’t help you, because it would be limited to LAN Games or direct IP connection (if it even works).

Hey, Does this plugin work with the NULL subsystem?, because the Create Advanced Session always Fails to create a session when i use it.
I did exactly as you did in the example blueprint. I really dont want to rely on steam because i have to get greenlit to release my game.

[QUOTE=tfrom222;347532]
Hey, Does this plugin work with the NULL subsystem?, because the Create Advanced Session always Fails to create a session when i use it.
I did exactly as you did in the example blueprint. I really dont want to rely on steam because i have to get greenlit to release my game.

Yeah it works fine with it, what is it doing? Just passing to failed?

Edit

Here this thread should solve your problem, it isn’t because of the plugin, you have to set up the project correctly first:
https://answers.unrealengine.com/questions/153965/when-i-try-to-use-the-new-create-session-node-it-f.html

1 Like

Thanks, ill try to add the onlinesubsystemnull dependency in my build.cs

EDIT
Nope, it’s still not working. The create advanced session is just passing to failed. I can succesfully use the build-in Create Session node. I have already added


[OnlineSubsystem]
DefaultPlatformService=Null

to my DefaultEngine.ini file

This is all my OSS modules in the build script.


[SIZE=2][COLOR=#bdb76b][SIZE=2][COLOR=#bdb76b]PublicDependencyModuleNames[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#b4b4b4][SIZE=2][COLOR=#b4b4b4].[/COLOR][/SIZE][/COLOR][/SIZE]*[SIZE=2][COLOR=#ff8000][SIZE=2][COLOR=#ff8000]AddRange[/COLOR][/SIZE][/COLOR][/SIZE]*[SIZE=2][COLOR=#dcdcdc][SIZE=2][COLOR=#dcdcdc]([/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#569cd6][SIZE=2][COLOR=#569cd6]new[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#569cd6][SIZE=2][COLOR=#569cd6]string[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#dcdcdc][SIZE=2][COLOR=#dcdcdc]]{[/COLOR][/SIZE][/COLOR][/SIZE]
[SIZE=2][COLOR=#d69d85][SIZE=2][COLOR=#d69d85]"OnlineSubsystem"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#dcdcdc][SIZE=2][COLOR=#dcdcdc],[/COLOR][/SIZE][/COLOR][/SIZE]
[SIZE=2][COLOR=#d69d85][SIZE=2][COLOR=#d69d85]"OnlineSubsystemUtils"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#dcdcdc][SIZE=2][COLOR=#dcdcdc],[/COLOR][/SIZE][/COLOR][/SIZE]
[SIZE=2][COLOR=#d69d85][SIZE=2][COLOR=#d69d85]"OnlineSubsystemNull"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#dcdcdc][SIZE=2][COLOR=#dcdcdc]    
       });
[/COLOR][/SIZE][/COLOR][/SIZE]

I have checked the logs and there is nothing else than my print string that is called when the Create Advanced Session node fails

Whoops, I was still checking for user ID in one section after I changed it to not require the user. It doesn’t do anything bad unless the interface is null.

I’m recompiling everything and re-uploading, not sure why I didn’t run into it before.

Edit Reuploaded

[QUOTE=;347908]
Whoops, I was still checking for user ID in one section after I changed it to not require the user. It doesn’t do anything unless the interface is null.

I’m recompiling everything and re-uploading.

Great!, Thank you so much for fixing it so fast :smiley:

*Edit I will test if it works for me when i get to my pc with the game project.

i have one more question.

How do i get the current running session’s properties? :confused:
Do i have to save all the settings in variables when creating the session?

I can retrieve the current session but I seem to remember it being pretty weird and backwards and leaving the functionality out. I’ll take another look at it tomorrow and see if I missed something obvious or if I can find a cleaner way around the problem. I have been really trying to avoid introducing too many workarounds outside of Epics session methods where I can. Some features I let sit to see if a better way came up eventually.

Edit Took another look and I remember why I left it alone, the session settings use FVariantData structs to store the information. converting from those in Blueprint requires a lot of extra nodes and is a huge hassle with how everything is setup, however I think I found a valid workaround. It will slow down searching through the extra properties slightly but will significantly increase flexibility with working with them and the array is never going to be all that large anyway. I’ll post details a post down so I can link to it in the updates section.

08/04/2015 - Updated the Advanced Sessions Nodes

  • Re-designed the GetSessionProperty nodes, now they take an array of ExtraSettings instead of the session search result. You can retrieve this array from a search result with the new node: “GetExtraSettings” (Example Blueprints are updated to show this).

  • Added an array of extra settings returned from the “GetSessionSettings” node that can be used with the GetSessionProperty nodes now. You can use this to retrieve the current sessions properties for modification or comparison.

  • Added a new case to the GetSessionProperty nodes titled “WrongType”, this is the result if it found the session setting you were looking for but the base type does not match the one you are trying to get back (IE: found GAMENAME but you were using the GetPropertyInt node and it is a String base type). This is important as the underlying data for session settings is FVariantData and can be of any type, should allow for some more robust handling of the properties in case of scripter mixup with base types.

[QUOTE=eXi;347417]
You may want to check if Google even has Sessions and Server Hosting. The build in Session System from UE4 wouldn’t help you, because it would be limited to LAN Games or direct IP connection (if it even works).

Okay… That makes me sad. Really sad. The direct IP connection works for android, that I am sure of. Thanks a lot guys. Gonna have to find a workaround.

[QUOTE=Z-enzyme;348916]
Okay… That makes me sad. Really sad. The direct IP connection works for android, that I am sure of. Thanks a lot guys. Gonna have to find a workaround.

Well it looks like it is possible to make an online subsystem that supports it from: https://developers.google.com/games/services/cpp/realtimeMultiplayer

But I haven’t played around with google play services before.

We are getting a crash when ever we try to create a game session now with the new version.

Not sure if that is because of how we have set up our session creation or something else?

here is the end of the crash log:

[2015.08.06-02.13.37:252][462]LogOnline:Warning: Async task ‘FOnlineAsyncTaskSteamStoreStats SessionName: Game bWasSuccessful: 0’ completed in 5.131915 seconds with 0
[2015.08.06-02.13.37:252][462]LogWindows:Warning: CreateProc failed (2) …\Engine\Binaries/Win64/CrashReportClient.exe -AppName=UE4-Get_Golden
[2015.08.06-02.13.37:252][462]LogWindows: Could not start CrashReportClient.exe
[2015.08.06-02.13.37:252][462]LogMemory: Platform Memory Stats for WindowsNoEditor
[2015.08.06-02.13.37:252][462]LogMemory: Process Physical Memory: 873.91 MB used, 1069.87 MB peak
[2015.08.06-02.13.37:252][462]LogMemory: Process Virtual Memory: 1688.34 MB used, 1779.61 MB peak
[2015.08.06-02.13.37:252][462]LogMemory: Physical Memory: 14921.17 MB used, 32735.09 MB total
[2015.08.06-02.13.37:252][462]LogMemory: Virtual Memory: 2177.55 MB used, 8388608.00 MB total
[2015.08.06-02.17.03:308][462]LogWindows: === Critical error: ===
Fatal error!

Get_Golden.exe {0x000000013fd97e60} + 0 bytes
Get_Golden.exe {0x000000014277902f} + 0 bytes
Get_Golden.exe {0x000000014276d996} + 0 bytes
Get_Golden.exe {0x000000013ff27f11} + 0 bytes
Get_Golden.exe {0x000000013fe8d455} + 0 bytes
Get_Golden.exe {0x000000013febb1b5} + 0 bytes
Get_Golden.exe {0x000000013fedae61} + 0 bytes
Get_Golden.exe {0x000000013febcf5d} + 0 bytes
Get_Golden.exe {0x000000013fe8de2e} + 0 bytes
Get_Golden.exe {0x000000013febcf5d} + 0 bytes
Get_Golden.exe {0x000000013fe8de2e} + 0 bytes
Get_Golden.exe {0x000000013febb1b5} + 0 bytes
Get_Golden.exe {0x000000013febcf5d} + 0 bytes
Get_Golden.exe {0x000000013ff27f11} + 0 bytes
Get_Golden.exe {0x000000013febc592} + 0 bytes
Get_Golden.exe {0x0000000140d6dcdf} + 0 bytes
Get_Golden.exe {0x0000000140d5c92f} + 0 bytes
Get_Golden.exe {0x0000000140d1c156} + 0 bytes
Get_Golden.exe {0x00000001406da0de} + 0 bytes
Get_Golden.exe {0x000000013fa14556} + 0 bytes
Get_Golden.exe {0x000000013fa03d40} + 0 bytes
Get_Golden.exe {0x000000013fa03d9a} + 0 bytes
Get_Golden.exe {0x000000013fa16269} + 0 bytes
Get_Golden.exe {0x0000000142afcac1} + 0 bytes
kernel32.dll {0x0000000076d159cd} + 0 bytes
ntdll.dll {0x0000000076f4b981} + 0 bytes
ntdll.dll {0x0000000076f4b981} + 0 bytes

[2015.08.06-02.17.03:437][462]LogExit: Executing StaticShutdownAfterError
[2015.08.06-02.17.03:440][462]LogOutputDevice:Warning:

Script Stack:
Tiki_GameInstance_C.ExecuteUbergraph_Tiki_GameInstance
Tiki_GameInstance_C.CreateGameSession
UMG_MainMenu_C.ExecuteUbergraph_UMG_MainMenu

[2015.08.06-02.17.03:888][462]LogPhysics:Warning: PHYSX: …\PhysX\src\NpScene.cpp (2977) 8 : PxScene::unlockWrite() called without matching call to PxScene::lockWrite(), behaviour will be undefined.
[2015.08.06-02.17.03:889][462]LogPhysics:Warning: PHYSX: …\PhysX\src\NpScene.cpp (2977) 8 : PxScene::unlockWrite() called without matching call to PxScene::lockWrite(), behaviour will be undefined.
[2015.08.06-02.17.03:889][462]LogWindows: FPlatformMisc::RequestExit(1)
[2015.08.06-02.17.03:889][462]Log file closed, 08/05/15 19:17:03

Thanks for the awesome pluggin