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"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

create a p2p or dedicated server

Hi everyone, I have a request today. I try to make a network for my game, but I don't know how to process to setup this.

there is difference between setup dedicated or "normal" server?

Product Version: UE 4.9
Tags:
more ▼

asked Oct 31 '15 at 11:03 PM in Blueprint Scripting

avatar image

QuinoneroPaul
10 2 5 6

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

"normal" server is when one of the clients is a host (client acts as both server and client), host starts the game on it own computer and the rest connects to it, commonly used in LAN but can work beyond that. When host leaves games ends as host worked as server

P2P (or rether the thing that is called that way since it not always real P2P) is same as "normal", but connectivity methods are different in the way so players can connect to eachother even behind NAT and Firewall by using varius tricks, like host connecting to client, proxying (client side or provides by some proxy server), session migration when host leaves, in other words make it fell that everything runs on dedicated where in reality everything is hosted by clients, i think to better word this, it feel that everything is run by the "cloud" ;]. It's also managed by session server, which is more advances master server which manages connection between devices as well as do match making, some online services provide that for you. UE4 does not support P2P but it is in road map, it's on the roadmap since long time and it untouched, so some day.

https://trello.com/c/o7mHCkGK/263-p2p-support

Still you can make session systems with what UE4 has and i think it is possible to make it migrate host, but i don't think you could do that with just blueprints. IT won't be comftible thru, 2 players behind NAT and Firewall won;t be able to connect to eachother, UE4 simply need to know diffrent connectivity methods.

dedicated server (don't mistake with all-purpace server service) is server running sepretly from client, it simply can run alone without client and rendering, it just manages game state and host the game even when there no players. As it usally runs on server machine (but it can run anywhere on any machine) it's not behind NAT or firewall, so anyone will be able to it. It's best quality but it a lot more expensive, usally game devlopers relese dedicated server version (or client can turn on dedicated server mode, UE4 can do that by default, you would need to built "Client" build to prevent that) so users can host there servers, manage them.... and pay for them :p So server cost won't be devloper issue.

Session management can be done on dedicated servers too, developer host group of dedicated servers and session server simply connect all client to currently empty server, prime example of this method is Rocket League, you can even see cryptic server names being display before game starts ;]

As long as you set up replication in you game right, your game can do both (except P2P for now)

more ▼

answered Nov 01 '15 at 02:07 AM

avatar image

Shadowriver
36.6k 931 169 1111

avatar image QuinoneroPaul Nov 01 '15 at 01:26 PM

so for make a "normal server", how to process? We need special bp for make a connexion?

avatar image Shadowriver Nov 01 '15 at 02:20 PM

You start the game with ?listen url

https://docs.unrealengine.com/latest/INT/Gameplay/Networking/Server/index.html

From blueprint you can use open console command also with ?listen

I'm not sure but maybe you can do this with session nodes too, they will work in null onlinesubsystem too

https://docs.unrealengine.com/latest/INT/Engine/Blueprints/UserGuide/OnlineNodes/index.html

avatar image QuinoneroPaul Nov 01 '15 at 02:43 PM

I make this but don't work, Do you have an idea?

alt text

avatar image Shadowriver Nov 01 '15 at 05:22 PM

It executes console commands not system command line :p also i said in console it is "open" command anf you type ip or map, so for example "open MapName?listen"

avatar image QuinoneroPaul Nov 01 '15 at 05:34 PM

I'm very sorry, I'm not good in english, I don't unterstand what you try to say

avatar image QuinoneroPaul Nov 07 '15 at 07:45 PM

Ok now I sucess to create a server, but I have a little problem, my player Server work fine, but my client don't be render, is a camera in air ans my 3D widget doesn't detect. I think that replication work.

avatar image Shadowriver Nov 07 '15 at 08:27 PM

That means you 2nd player is ADefaultPawn, which means you didn't pick default pawn. Or manually spawn some pawn for 2nd player and make his PlayerController to possess it

avatar image QuinoneroPaul Nov 08 '15 at 11:20 AM

I think that is good, I create a gameMode with my own pawn alt text

avatar image Shadowriver Nov 08 '15 at 04:54 PM

Try setting it in Project Settings, also place PlayerStart

avatar image QuinoneroPaul Nov 10 '15 at 09:06 PM

Don't work too... I don't know why alt textalt text

avatar image Shadowriver Nov 11 '15 at 05:09 AM

You have any spawn code?

avatar image QuinoneroPaul Nov 11 '15 at 11:22 AM

How, is that, I think that was automatically added... so I try to find how to process and I comme back if this don't work

avatar image Shadowriver Nov 12 '15 at 08:17 PM

Thats why i'm asking if you maybe write your own code for that, as you cna od that :p Then i dont know whats wrong, if you pick default pawn defualt spawn system should use this pawn exclusivly. You might try override GameMode functions which selects Pawn which is "GetDefaultPawnClassForController". Place to PlayerStarts. Maybe it indeed replication problem, but it kind of not make sense as GameMode class runs exlusivly on server and it spawn objects in server state which is replicated to clients

avatar image QuinoneroPaul Nov 12 '15 at 08:31 PM

I have already change the default pawn by my player bp, il the gamemobe bp u make this: alt text

now when my client was connected to the server, he was not see by the server but is in the spawn position, but he can't move (like a crash) and I must press echap for quit playing mode

avatar image Shadowriver Nov 12 '15 at 08:41 PM

Hmm ok try default GameMode class and set default pawn (and other classes if you need) in world settings place 2 playerstarts and see what will happen

avatar image QuinoneroPaul Nov 21 '15 at 07:09 PM

With the default GameMode/Pawn, client can connect to server but I think that is not replicated because is a free camera (no gravity)

avatar image Shadowriver Nov 22 '15 at 04:50 AM

you set the pawn?

avatar image QuinoneroPaul Nov 22 '15 at 01:06 PM

I think: with my custom GameMode (client crash): alt text

with default gamemode (client don't crash but no replicated): alt text

avatar image Shadowriver Nov 23 '15 at 04:51 PM

Ok try set default pawn in project settings. The "DefaultPawn" set here is that spectator like flying camera

avatar image QuinoneroPaul Nov 23 '15 at 07:47 PM

Ok I just forgot to check Global Default Server Game Mode, so with the default GameMode my client was replicaterd, but my custom gameMode always crash

avatar image Shadowriver Nov 24 '15 at 12:36 AM

check the log then in saved/log in project directory, always do that on crash because anwser is usally there

avatar image QuinoneroPaul Nov 24 '15 at 06:42 PM

I get this:

  [2015.11.24-18.41.10:124][374]LogLinker: Can't find file for asset '/Game/DungeonRush/Level/UEDPIE_1_Lobby' while loading NULL.
     [2015.11.24-18.41.10:151][374]LogAIModule: Creating AISystem for world Lobby
     [2015.11.24-18.41.10:155][374]LogWorld: Bringing World /Game/DungeonRush/Level/UEDPIE_2_Lobby.Lobby up for play (max tick rate 0) at 2015.11.24-19.41.10
     [2015.11.24-18.41.10:155][374]LogWorld: Bringing up level for play took: 0.003192
     [2015.11.24-18.41.10:167][375]LogNet: Client netspeed is 10000
     [2015.11.24-18.41.10:168][375]LogNet: Join request: /Game/DungeonRush/Level/Main?Name=DESKTOP-T6BH7HM-E0186B2048B15AE48ED007A65AB9D8C5?SplitscreenCount=1
     [2015.11.24-18.41.10:168][375]LogOnline:Warning: NULL: No game present to join for session (Game)
     [2015.11.24-18.41.10:169][375]LogNet: Join succeeded: DESKTOP-T6BH7HM-E018


But I don't know why my game is null

avatar image Shadowriver Nov 25 '15 at 05:56 AM

Thats how your log ends? there is no crash log?

avatar image QuinoneroPaul Nov 27 '15 at 05:12 PM

it's my complete log: http://pastebin.com/ifNWWT74

I find some log with Network key-word, I think that is here: http://pastebin.com/dMPCnS6F

avatar image QuinoneroPaul Nov 29 '15 at 09:41 AM

do you have an idea why I have this?

avatar image Shadowriver Nov 30 '15 at 12:36 AM

No, cut log means it null or wrong cast crash

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