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"

Can't find LAN hosted session

Hello!

I'm currently attempting to set up networking in Unreal Engine 4. Right now, I have a button to create a session using LAN (which works fine). Then, I have a timer set up to try and find sessions (also using LAN) every half second. However, find sessions fails every time, with or without me running a session. Here's my steps that I've been using to test:

  1. Start game

  2. Click the "Start Server" button: it prints out the text saying that the session has been started.

  3. Read the text being printed to the screen: it prints the text that is sent out on failure.

This is my blueprint for creating the session: I know that this (supposedly) succeeds because the "On Success" print string is fired.

This is my blueprint for finding the session: I know this fails because the print string under the "On Failure" pin is fired.

I have attempted many variations on both DefaultEngine.ini and Gravity.Build.cs, but nothing has worked. Here are those files.

 // Gravity.Build.cs
 using UnrealBuildTool;
 
 public class Gravity : ModuleRules
 {
     public Gravity(TargetInfo Target)
     {
         PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "InputCore" });
 
         PrivateDependencyModuleNames.AddRange(new string[] {  });
 
         // Uncomment if you are using Slate UI
         // PrivateDependencyModuleNames.AddRange(new string[] { "Slate", "SlateCore" });
         
         // Uncomment if you are using online features
         PrivateDependencyModuleNames.Add("OnlineSubsystem");
         PrivateDependencyModuleNames.Add("OnlineSubsystemNull");
         if ((Target.Platform == UnrealTargetPlatform.Win32) || (Target.Platform == UnrealTargetPlatform.Win64))
         {
             if (UEBuildConfiguration.bCompileSteamOSS == true)
             {
                 DynamicallyLoadedModuleNames.Add("OnlineSubsystemSteam");
             }
         }
     }
 }

[placeholder text, to split the two code files... :) ]

 // My WHOLE DefaultEngine.ini, because I'm not sure if I messed something up.
 [URL]
 [/Script/Engine.UserInterfaceSettings]
 RenderFocusRule=NavigationOnly
 DefaultCursor=None
 TextEditBeamCursor=None
 CrosshairsCursor=None
 GrabHandCursor=None
 GrabHandClosedCursor=None
 SlashedCircleCursor=None
 UIScaleRule=ShortestSide
 UIScaleCurve=(EditorCurveData=(Keys=((Time=480.000000,Value=0.444000),(Time=720.000000,Value=0.666000),(Time=1080.000000,Value=1.000000),(Time=8640.000000,Value=8.000000))),ExternalCurve=None)
 
 [/Script/Engine.RendererSettings]
 r.MobileHDR=True
 r.AllowOcclusionQueries=True
 r.MinScreenRadiusForLights=0.030000
 r.MinScreenRadiusForDepthPrepass=0.030000
 r.PrecomputedVisibilityWarning=False
 r.TextureStreaming=True
 Compat.UseDXT5NormalMaps=False
 r.AllowStaticLighting=True
 r.NormalMapsForStaticLighting=False
 r.GBuffer=True
 r.GenerateMeshDistanceFields=False
 r.Shadow.DistanceFieldPenumbraSize=0.050000
 r.TessellationAdaptivePixelsPerTriangle=48.000000
 r.SeparateTranslucency=True
 r.TranslucentSortPolicy=0
 TranslucentSortAxis=(X=0.000000,Y=-1.000000,Z=0.000000)
 r.CustomDepth=1
 r.DefaultFeature.Bloom=True
 r.DefaultFeature.AmbientOcclusion=True
 r.DefaultFeature.AmbientOcclusionStaticFraction=True
 r.DefaultFeature.AutoExposure=True
 r.DefaultFeature.MotionBlur=True
 r.DefaultFeature.LensFlare=True
 r.DefaultFeature.AntiAliasing=2
 r.EarlyZPass=3
 r.EarlyZPassMovable=False
 r.DBuffer=False
 r.ClearSceneMethod=1
 r.WireframeCullThreshold=5.000000
 UIScaleRule=ShortestSide
 UIScaleCurve=(EditorCurveData=(Keys=),ExternalCurve=None)
 
 [/Script/HardwareTargeting.HardwareTargetingSettings]
 TargetedHardwareClass=Desktop
 AppliedTargetedHardwareClass=Desktop
 DefaultGraphicsPerformance=Maximum
 AppliedDefaultGraphicsPerformance=Maximum
 
 [OnlineSubsystem]
 DefaultPlatformService=Null
 PollingIntervalInMs=20
 
 [/Script/OnlineSubsystemUtils.IpNetDriver]
  InitialConnectTimeout=120.0
  
 [/Script/Engine.GameEngine]
 NetDriverDefinitions=ClearArray
 ;+NetDriverDefinitions=(DefName="GameNetDriver",DriverClassName="OnlineSubsystemUtils.IpNetDriver",DriverClassNameFallback="OnlineSubsystemUtils.IpNetDriver")
 ;+NetDriverDefinitions=(DefName="GameNetDriver",DriverClassName="OnlineSubsystemSteam.SteamNetDriver",DriverClassNameFallback="OnlineSubsystemUtils.IpNetDriver")
 
 [/Script/EngineSettings.GameMapsSettings]
 EditorStartupMap=/Game/Gravity/Levels/StartScreen
 LocalMapOptions=
 TransitionMap=
 bUseSplitscreen=True
 TwoPlayerSplitscreenLayout=Horizontal
 ThreePlayerSplitscreenLayout=FavorTop
 GameInstanceClass=/Script/Engine.GameInstance
 GameDefaultMap=/Game/Gravity/Levels/StartScreen
 ServerDefaultMap=/Engine/Maps/Entry
 GlobalDefaultGameMode=/Script/Engine.GameMode
 GlobalDefaultServerGameMode=None

I've tried many variations on all of these files, but nothing has really worked... I've probably been missing something obvious, but I'm not the most adept at networking... also, I'm not going to deal with Steam or other services right now, because I'm just attempting to get basic local multiplayer working. Don't know where to go from here... thanks!

Product Version: Not Selected
Tags:
more ▼

asked Apr 16 '15 at 02:38 AM in Blueprint Scripting

avatar image

AdamuKaapan
13 10 8 11

avatar image AdamuKaapan Apr 16 '15 at 05:31 AM

Update: I just tried the "Multiplayer Shootout" sample from the launcher, and that works fine in LAN mode... I'll try and look and see what's different, but I don't see anything obvious yet.

avatar image 江南烟雨 Apr 12 '16 at 02:58 PM

Did you try use one computer to find the host which is build by the other computer in LAN ?

I have try, but I cannot find any session which is created by the other computer in LAN.

Do you have the same problem?

avatar image ganeshpingale Apr 16 '15 at 06:12 AM

[OnlineSubsystem] DefaultPlatformService=Null

add this two lines in DefaultEngine.ini

avatar image AdamuKaapan Apr 16 '15 at 04:02 PM

Those lines are already in there, as you can see.

(comments are locked)
10|2000 characters needed characters left

1 answer: sort voted first

You do not have a player controller hooked into your find sessions.

more ▼

answered Apr 16 '15 at 03:48 PM

avatar image

Justin.Dooley
2.1k 103 67 158

avatar image AdamuKaapan Apr 16 '15 at 04:02 PM

I'll try that now, just a sec.

avatar image AdamuKaapan Apr 16 '15 at 04:07 PM

Aaaaaaand I feel stupid, because that worked... Thanks!

avatar image AdamuKaapan Apr 16 '15 at 06:29 PM

Actually, this now works, but it is still refusing to find any sessions: I'll make a separate post for this.

avatar image 江南烟雨 Apr 12 '16 at 03:03 PM

Did you try use one computer to find the host which is build by the other computer in LAN ?

I have try, but I cannot find any session which is created by the other computer in LAN. By the way, I can find session if I run the MutiplayerShootout game in one computer. That is to say, one computer run two game process is work, but it doesn't work in different computer, even through they are in the same LAN

Do you have the same problem?

avatar image Chris Gray Dec 05 '16 at 09:32 PM

Hey sorry to ressurect this post, but did you find a solution to this problem (Session can be found if the game is running on one computer, but not if running on a different computer - even when in the same LAN) ? I'm having the same problem

avatar image ENiari Games Jul 11 '17 at 08:08 PM

And the world will never know :(

avatar image Jason77 Mar 19 '18 at 07:15 AM

Is 2018 and still no body know T.T

(comments are locked)
10|2000 characters needed characters left
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