Is it possible to run a peer to peer PC in an Unreal 4 game without the need for 3rd party servers

I am considering building a VERY SIMPLE peer to peer FPS mp in Unreal 4 over the Christmas period.
I want to know if I can do this with my own computer hosting and acting perhaps as dedicated server and
The goal would be a zero budget little game that I can play with friends, FPS with maybe only 3 on each team for TDM games.
Very light and simple.
Is it possible to set it up to work in UE4 without having to go rent servers somewhere?

Thank you! :slight_smile:

So the answers that I am getting so far is that it is possible but only if the game is super small like 1 v 1 or 2 v 2 and one player must host at all times.
Data packages need to be very small for home networks / wifi to handle them.

and I see a dev setting up and running a mp game through a Steam account. Confused by this. How can you use Steam servers free of charge? Can you? Or are you simply interfacing and you are still hosting from your own computer?

Hey There, No you cannot use the Steam servers without paying Gabe this would be too good. And yes he’s simply interfacing and you have an PC hosting the server and that’s exactly what a large number of games do, like northgard (RTS) for example. You have an amazing tutorial on the UR4 YT channel about how to implement Steam features it in your project. But be careful they are a few mistakes in the tutorial here and there that are being corrected later in the videos. If any question feel free to ask, I think I still have the tutorial completed on my old computer

O.k. great thanks for that answer. My only question would be can you do it without the help of Steam? Can you simply interface between computers with one of them hosting and maybe use the networking plugin that you can download and install into Unreal 4? I am trying to do something really small and simple and would prefer not to drag Steam or any other third party into it. :slight_smile:
But then I was wondering how would you search or find a game if you buddy is hosting it? Is that why people use Steam interface?

Found gold here:
Now that makes it crystal clear to me.

Yes you need a “lobby” server so players can find games hosted by other players.

Note that if you let players host their own games (not using dedicated servers) then the Host will know the joining players IP address and the joining players will know the Host IP address which is a potential security issue.

A dedicated server is far more secure as it doesn’t expose the players IP addresses and the server can’t easily be tampered with by the players.

Steam is not the only option out there and with the proper knowledge you could create your own lobby server.

UE4 doesn’t use P2P (Peer to Peer) it uses the authoritative server model which needs a Host or a Dedicated server as the authority and everyone else connects to this Host or Dedicated server. The regular P2P model has no server, instead everyone is communicates with everyone with the same “authority” level.

O.k. great thank you :slight_smile:

You can open a level to a Listen-Server using just an IP. However its likely you’re going to need a tool like Hamachi to make it work. Hosting aside, have you gone into a lot of replication? There’s gotchas waiting… Its worth watching a basic YT tut on converting a basic FPS / TPS template to Multiplayer to see. While you can build a Blueprints-only FPS multiplayer game prototype that runs on a LAN relatively quickly, Internet Multiplayer is the stuff of 10 years C++ & Networking nightmares… :eek:… Even Level-Streaming is broken in Multiplayer right now for example… As regards gameplay elements… It’d be better if its a turn based game rather than something fast-moving with physics and vehicles etc. Better to leverage Characters too rather than Pawns, as Client-Side-Movement-Replication is included for free.

So what you are saying is that Steam is used as a lobby server basically right?
So that is what I see when I watch tutorials on YT and the guy is “running his game on Steam”?
Steam is just used to find matches of your game basically its a lobby system essentially?

Is this what you mean?

So it looks like what I will have to deal with is building the game in Unreal 4 and then somehow run this tool along with Unreal (on the same computer?)
So this tool would allow a lobby system between the players / host?
So I guess the next step is to ask how the hell to do incorporate this tool with Unreal 4?
I guess I will have to find a tutorial online do you know of any that will explain how I can fuse this tool with Unreal?

I did already discover that the character classes have replication included already and that is what I should use rather than pawns thanks :slight_smile:

Follow the link to Hamachi’s site from there, or use another NAT puncher. You’ll still need to create your own lobby system or borrow one from Community Tools / Marketplace. Honestly I wouldn’t waste much time on this part. Just try and get a player connecting to you on the listen-server asap. Threads like this may help…

O.k. thanks.
Yeah I found a thread where it looks like Hamachi is just a huge pain to deal with:

Can't play with Unreal engine 4, a multiplayer game, through hamachi ? "shootout example" - Unreal Engine Forums

Oh I see your link takes me to that thread LOL.
Yeah looks like a pain to deal with.
I am really trying to keep it super simple.

O.k. but if I want to keep it simple and just get players to connect to my hosted match, how do I do that?
Is there a tool inside Unreal 4 that makes that possible or do people have to email me with their IP ies or what?
Thank you :slight_smile:
So I assume what you are saying is skip a whole lobby creation right?
That is fine.
I am not trying to build anything fancy the simpler it is the better :slight_smile:

I guess what I then ask is how to get players to connect with my hosted game WITHOUT a lobby system?
Is there just another way of doing it then?

The truth is, networking over the internet is rarely simple. In fact, its usually a PITA to deal with, especially in a short time frame. That said, Adam Davis’ comments in the thread above are actually quite reassuring. The problem is, there’s no way to know what his system was or his partner’s. Most likely, you will need a NAT solution… Hamachi is just one option. But without that, you’re left configuring Routers and AV/Firewall permissions. If you turn all that off, you may escape 3rd-Party software, but its RISKY! Overall, I think you’re crazy trying to attempt this in such a short time frame. There’s just so many things that can trip you up… Instead, why not just do a LAN game?.. While the CMC will help, its still hugely flawed. Follow posts by TheJamsh etc, to understand what the playing field is like… EDIT: Yes just IP’s of friend’s routers. Remotely opening a level on a Listen-Server should just spawn a player iirc, but do some testing asap…

O.k. thanks for the warnings I believe you.
Grrrrr :slight_smile:
My friends are all over the world in different countries so LAN wont work :slight_smile:

We need a better internet :slight_smile: