I want to make a small game where me and friends can play together. Does it cost money to host a server or something like that. It’s ok if people just have to connect to my pc over local network if that’s possible. I dont’ know a lot about this.
look into logmeinhamachi. I used to use it back in the day to host minecraft servers. Idk if it’s still a thing that exists and works well but if you already have the game and everything and just need the server, that might be a way to do it.
yes, it is possible, yes it “could” be free. I don’t know how to show you how to set it up though
I accomplished this in a relatively easy way for those wondering. I made a dedicated server .bat file and a client .bat file.
The server.bat contains:
“C:\Program Files\Epic Games\UE_4.22\Engine\Binaries\Win64\UE4Editor.exe” “D:\unreallinuxtoolchain\Unreal engine\Multiplayer\Multiplayer.uproject” Level1 -server -log -nosteam
In which the first path is the path to your ue4 editor .exe
the second path is the path to your uproject
the 3rd is your startup levelname
the last 3 you just copy paste.
Then the client.bat file, which you run to connect to your server should be run by you and your friends to connect to the server.
That contains “C:\Users\klaer\Desktop\mult\WindowsNoEditor\Multiplayer.exe” 192.168.0.10 -game -ResX=800 -ResY=900 -WinX=0 -WinY=20 -log -nosteam \k
The first argument is the path to the packaged game .exe
After that your own ip address. This ip address should be your intern ip if you connect with it inside the same network as your server. Your extern if someone wants to conenct from outside your network.
then again just copy the rest of the arguments.
Now that’s almost all.
The last thing to do, if someone needs to connect from outside your network, is port forwarding. You have to expose port 7777 on your router so other PCs can connect from outside your network. You do that in the settings page of your router. You find that page when you type in the address bar the ip of your router, often 192.168.0.1 or something like that. Hope this helped.
Yes you can host server yourself, internet works the same on all devices so anyone can host server as long as oyu got static public IP (with dynamic you can do so too, thing is your IP will be changing, this cna be solved by using dyndns domain)
UE4 also support non-dedicated hosting with one client running as host, you start up by putting ?listen aster map name Level1?listen. It saves up memory if you not planing to run server 24/7 on your computer reas about it here:
You can also use steam on test game id 480 (you game will be visibale as “Space War” in steam), it is dedicated id for game in development but can be used in throw away/prototype demo projects to like game jam entries. Then you can use normal session system. One note, all players need to be in same region download region as hoist player. UE4 implementation of Steam also only support seamless level switching (using level streaming) your code (blueprint included) need ot be aware that some things won’t reset on level switch,
@mightyenigma I had already previously build the engine from source because i wanted to package a game for linux. I don’t know if that is required to be honest.
@Abdul Hasan Ali did you have to build from source to get dedicated server working?