Blabberbox » Multiplayer in Unreal via IPShare on Twitter

Multiplayer in Unreal via IP

June 23rd, 2018 | Posted by pftq in Blabberbox | #
Finally got #UnrealEngine connecting over the internet for barebones multiplayer.  Documentation on just getting direct IP-to-IP connection w/o Steam, etc was surprisingly sparse.



Here's a quick step-by-step:
1. Go to Editor Settings.  Set your port to a number like 7777.

1. Package your game (here, using Windows).

2. Create a shortcut to your game.exe called Host, and modify the shortcut target to add the following after "...game.exe" (rename the map + path as needed):
"/Game/FirstPersonBP/Maps/FirstPersonExampleMap?Listen" -game -log

3. Create another shortcut called Client, and add the following instead:
<hostIP>:<port> -game -log

4. The host computer would run the Host shortcut.  Everyone else runs the Client shortcut (which connects to the host's IP and port); make sure the host has the port opened up on firewall (in Windows, you'd want to add an inbound exception to the port and then only allow the IPs of the other players in scope).

There's still a lot of work after this, but at least now you are connected online.  From here, you'd look into guides on replication, etc which make sure all players are in sync and see the same things happening.  A good starting guide is here: https://forums.unrealengine.com/development-discussion/blueprint-visual-scripting/102591-turn-the-first-person-fps-template-to-a-multiplayer-experience
278 unique view(s)

Responses

  1. Troy Harris said,
    Sep-16-2020, 08:55am

    I'm guessing that you've gotten a lot farther with this since posting.  I was just wondering if you might have made a bit of a tutorial for some of us, uh... more "technically challenged"?  I'm aware of plugins that help in the process of connecting via services, but all I want right now is to set up a direct IP connect to test with some buddies that are scattered across the US.  I'm just shooting in the dark at this point.  Any help would be greatly appreciated.

  2. pftq said,
    Sep-16-2020, 12:46pm

    Did you try the steps I outlined? The IP is specified in the Client shortcut.

Leave a Comment

Name: (Have an account? Login or Register)
Email: (Won't be published)
Website: (Optional)
Comment:
Enter the code from image: