Download

Direct IP working but Find Session Not

Hello everyone…

I have a problem with creating a simple multiplayer game for mobile devices. Like Multiplayer Shootout project sample i made a menu for hosting and joining game. Hosting section works good and session created successfully with Use LAN true or false and level opened with listen option and everything was good.

I made a menu for search sessions like multiplayer shootout project sample and mobile devices can see host game in that menu but problem is here when i touch that host for joining i can’t join that host i know success node on join session was ran because i print a text log after that but device couldn’t join host without any error after about two or three minute level loaded without other player !!!

for test purposes i created button and run a console command Open [OtherDevice IP] and i could join to host device and everything was good.

I was surprised when i packaged game for windows for testing and run on a single machine two times one as host and other for joining everything was working perfect but only on single machine, when i tested on two PCs nothing happened and no session founds.

another thing I want to do is one device make hotspot wi-fi and other devices connect to him then a device become a host and other can join to him without modem … i tested my simple game this way but in the sessions menu there was nothing.

All devices(Mobiles and PCs) are connected to a ADSL Modem router with wi-fi connection.

Question 1 : Why i couldn’t join to host on mobile devices?

Question 2 : why PCs couldn’t see each other on find sessions menu ?

Question 3 : How i can connect device to each other without any modem ? (I mean after one device became Hotspot and other devices connect to that the multiplayer simple game can run and devices can see host in sessions menu)

What online sub-system are using?

Chances are you are using the NULL system or not using the system at all and therefore your find sessions will never work.

by default i use this because it’s noted for LAN base games :


[OnlineSubsystem]
DefaultPlatformService=NULL


but i also test :


[/Script/Engine.GameEngine]
+NetDriverDefinitions=(DefName="GameNetDriver",DriverClassName="OnlineSubsystemSteam.SteamNetDriver",DriverClassNameFallback="OnlineSubsystemUtils.IpNetDriver")

[OnlineSubsystem]
DefaultPlatformService=Steam

[OnlineSubsystemSteam]
bEnabled=true
SteamDevAppId=480
bVACEnabled=0

[/Script/OnlineSubsystemSteam.SteamNetDriver]
NetConnectionClassName=OnlineSubsystemSteam.SteamNetConnection

I think when join session Success node is running everything must be good … I’m so confused… I don’t why open [IP address] good working …

No one can tell me why Join session success node executed but i can’t join the game and level didn’t open ?
I wondering why console command Open {IP Address} works fine !!!
UE ver: 4.9.1
Android ver : 5.0.2

Hy Vahid, Did you get any solution for your problem?
I am following this tutorial: https://www.youtube.com/watch?v=ngBI40tjirE
pretty nice, but when Im trying to test between android and Laptop I cannot find any sessions… I have tried to use Null and Steam as subsystem, but I am only trying to connect via LAN ( same Wifi Network ).
thx in advance…

Hi @kornel.l.varga
No, I couldn’t … I can just connect between laptop - mobile or mobile - mobile just with typing IP address on local network

Run as a console command from within BP.

It sometimes can happen, that Find Session with Steam and Id 480 activated will return NO Session.
That’s because ALL Devs using that Id open Sessions there. So Find Session could return a few thousand of Sessions…

Try to get Advanced Session (free Plugin) and give your AdvancedCreateSession a uniqu GameName, which AdvancedFindSession is filtering for. (and perhaps rise the max result value to a higher number - like 1000).

Hi Vahid.Did you solve it ? Did you used Advanced session?

Hi Chaosgod_Espér.Dose Advanced Session have to works with filter a gamename? I just find Advanced sessions by the Plugin,and it returns 0 results.
By the way how to reply some one

I have exactly this same problem: Sessions do not appear between devices on the same LAN, except between one Android and another (but not the other direction for the same two Androids if the other one hosts and the other one Finds Sessions)! Also when I tell it to Join Session, it says it joined (printstring after Join Session node Success pin), but does not open the level.

Also I can’t seem to direct join by IP between android and PC in either direction.