[4.8] HTML5 multiplayer connect

Have a tough question, I think.

I am currently setting up an HTML targeted multiplayer game and I am having some trouble with it actually using the HTML Socket Driver.

Steps that I have taken:

  • Project is a blueprint project converted into a c++ project.
  • HTML5 experimental plugin is enabled for the project
  • Have changed the baseengine.ini to use the WebsocketNetDriver, and have commented out the other 2 lines of NetDriver (Have tried to keep the DemoNetDriver previously)
  • Added the Settings for WebSocketNetDriver in the baseengine.ini
  • ^Those two steps are in the readme file for the plugin
  • I have added the Server.Target.cs file to my project, but I ran into the issue where BuildingRocket() doesn’t exist anymore (Have copy pasta’d from the ‘how to make a dedicated server’ wiki page; Also have built a windows server with the default drivers with no issue after removing the if/else lines)
  • I have rebuilt the Engine/Project from Source

Now for the actual problem: When using a dedicated server in PIE, It connects using 127.0.0.1 with a map attached. None of the WebSocketNetDriver log lines print in my output log; The IPNetDriver prints these out when using that driver…such as using port #. I can build a game for html5 and windows using the WebDriver, but they will only connect to a dedicated server using a loopback. IP+Port will never work.

I feel as if I am missing one step for this to actually work ;_;

TLDR:

My issue has to do with not being able to connect to my IP address from an HTML game to a Windows dedicated server. It works in the console of the HTML game with local IP, but not an internet IP.

My ports are open and my firewall has the ports open (the game works on a normal dedicated server setup with a normal windows client when not using the experimental HTML5 plugin)

Some code when attempting to IP connect using PIE:

LogNet: Browse: (IP Address here):53501//Game/MyContent/Maps/FFA_Castle
LogNet: World NetDriver shutdown WebSocketNetDriver_2 [GameNetDriver]
LogNet: DestroyNamedNetDriver WebSocketNetDriver_2 [GameNetDriver]
LogNet: UNetConnection::Close: Name: WebSocketConnection_1, Driver: GameNetDriver WebSocketNetDriver_2, PC: FishController_C_3, Owner: FishController_C_3, Channels: 1011, RemoteAddr: Aviendha-PC, Time: 2015.06.13-05.37.26
LogNet: UChannel::Close: Sending CloseBunch. ChIndex == 0. Name: ControlChannel_1
LogNet: GetLocalNetworkVersion: GEngineNetVersion: 0, ProjectName: myproject2, ProjectVersion: 1.0.0.0, InternalProtocolVersion: 8, LocalNetworkVersion: 2634024906

I also have a problem with my Server.Target.cs and BuildingRocket() not existing.

(I’m upgrading my project from 4.7 to 4.8)

Although I’m not doing anything else similar to what you are doing. (HTML Plugin, so on)

I was able to get 4.8 to generate Visual Studio files by changing the BuildingRocket() portion of GameServer.Target.cs to IsEngineInstalled(). However, it wasn’t clear to me from looking at the 4.8.0…4.7.6 diff whether it should be IsEngineInstalled() or RunningRocket() (or neither).

Haven’t tried to create and deploy a dedicated server, still upgrading the codebase.

I used IsEngineInstalled() as well. Not sure of the correct method but it worked so far.

This is a confirmation on a side-problem that wasn’t actually the main focus/solution of my question; Commenting on this to remove it as an answer.

To be more specific, my issue has to do with not being able to connect to my IP address from an HTML game to a Windows dedicated server. It works in the console of the HTML game with local IP, but not an internet IP.

My ports are open and my firewall has the ports open (the game works on a normal dedicated server setup with a normal windows client when not using the experimental HTML5 plugin)

*Edited main question with TLDR

Hmmm after many hours of tweaking various things, it now works -_-. If I am able to figure out which fix it was that I did that made it start working, I will post the answer here for the people of the future.

IsEngineInstalled() calls RunningRocket() which returns bRunningRocket, and bIsRunningRocket is only true if -rocket is found in the command line arguments, so it should be ok to just remove BuildingRocket()

Were you tweaking your project or the engine source? If the latter, you could post the results of git diff as a gist (and possibly for the former if you’re versioning your project).