#multiplayer

1 messages ยท Page 525 of 1

winged badger
#

๐Ÿ˜ฆ

dawn nova
#

Hello everyone, having an issue getting the server to show up in game, were using Steam and it is showing perfectly in the steam server browser with public IP, but it doesnt show up in game, I have no idea why it worked before perfectly

#

Does it have anything to do with that our app is in prerelease state and our dedicated server is not?

chrome bay
#

@thin stratus Yeah I still do that! Just be sure to "round" the input locally as well before simulating, otherwise you can cause corrections there too.

meager horizon
#

i build my dedicated server with automationtool from the command line. is there anything i can do there to exclude textures and sound files from the packaged output?

#

they have no relavance to a headless deployment

#

and if i do exclude them does it break anything?

rich ridge
#

@meager horizon How do you build using automationtool?

meager horizon
#

like this:

#

c:\ue\engine\binaries\dotnet\automationtool.exe -ScriptsForProject=C:/Users/brain/TowerBattle/TowerBattle.uproject BuildCookRun -nocompileeditor -nop4 -project=C:/Users/brain/TowerBattle/TowerBattle.uproject -cook -stage -archive -archivedirectory=C:/Users/brain/Desktop/TowerBattle -package -ue4exe=C:\UE\Engine\Binaries\Win64\UE4Editor-Cmd.exe -nopak -prereqs -nodebuginfo -targetplatform=Linux -build -target=TowerBattleServer -clientconfig=Development -utf8output -compile
in a windows batch file

#

i then rsync it up to a linux server

rich ridge
#

I have build my dedicated server and if I exclude my contents, then my server won;t run

meager horizon
#

i dug through the logs that ue4 outputs to see how it was doing it, and copied that

#

the important bits there for me are the -target, -archivedirectory and -ScriptsForProject

rich ridge
#

YEah u r right for dedicated server we should not need content assets, but still it asks to run.

meager horizon
#

perhaps theres a way to trick it

#

im sure someone here has the answer

#

e.g. some way to package a dummy asset

#

i guess it also depends on what you do with the assets

#

i know that some assets in my game are needed by the dedicated server too

#

e.g. the blueprints of the player controller, pawns, etc

rich ridge
#

I m OK for blueprints, but materials or textures doesn;'t make sense

meager horizon
#

yeah same with sfx

#

does it just plain refuse to start if you do it?

#

or do you get errors in your console about null references?

#

how are you excluding assets from the build?

rich ridge
#

I get error logs that material not found

#

and server will terminate

meager horizon
#

fatal errors that stop the server? ah.

rich ridge
#

yes fatal errors.

#

then if I copy assets then it works fine

meager horizon
#

whats this do, i wonder

#

time to go source diving ๐Ÿ˜„

thin stratus
#

@chrome bay Did you ever run into corrections just from sending more data along the ServerMove calls?

#

E.g. not serializing it

meager horizon
rich ridge
#

Nope first time I m seeing it

#

@meager horizon I will give it a shot today

meager horizon
#

how were you doing it then, removing them somehow by hand? ๐Ÿ˜ฎ

#

i are confuss. ๐Ÿ™‚

#

@rich ridge i added Material and Texture to that list on my build, cooked the project, 216mb total size.

#

im uploading it now, i'll try and run it and let you know what happens ๐Ÿ™‚

#

i just hope it doesnt have some unforseen side effect like line traces failing beucase theyre relying on something like the transparency of a pixel for complex trace shrug we'll see

rich ridge
#

Cool man

meager horizon
#

i cant imagine that would be a thing in the dedicated server, as that would need some kind of RHI to render it to know the opacity of any pixel in 3d space

chrome bay
#

@thin stratus I don't think so but then I was sending pretty much the same thing

rich ridge
#

So when you used that automation script to build the Dedicated Server does it include texture and materials inside the binary??? @meager horizon

chrome bay
#

Location, Rotation, Ang Vel, Lin Vel, Input & delta time

#

Ang Vel is hyper sensitive to corrections though

#

This was the psuedo-physics version, not actual physics ofc

thin stratus
#

Yeah not doing any drone hover stuff anymore :D

#

Was sending 2 floats and one Normal Vector.

chrome bay
#

Ah as far as characters go I've never sent any extra info

thin stratus
#

And the floats weren't -1 to 1, so they can be bigger.

#

Test was with 0.f and FVector::ZeroVector though

chrome bay
#

yeah the quantization only works if you know the min/max range of the float

thin stratus
#

So basically 2 floats and a netserialized Normal Vector (Epics FVector_NetQuantizeNormal)

meager horizon
#

@rich ridge it seems to have excluded the materials and textures from the pak

#

theres a crapload of png's in the Engine folder, but im not too bothered about that

#

they seem UI related

thin stratus
#

I'll have to test it later again. The floats and the vector aren't 100% needed. I can hide the vector in the Acceleration and keep the floats the base values.

meager horizon
#

it seems to upload zero byte placeholders of the excluded textures and materials

rich ridge
#

Lets hope it goes well

meager horizon
#

well i'll know in about 5 mins

#
[2020.02.26-09.07.27:167][  0]LogWorld: Bringing up level for play took: 0.009822
[2020.02.26-09.07.27:168][  0]LogLoad: Took 0.104256 seconds to LoadMap(/Game/VehicleCPP/Maps/VehicleExampleMap)
[2020.02.26-09.07.27:168][  0]LogLoad: (Engine Initialization) Total time: 0.49 seconds```
#

seems fine to me

#

unfortunately i cant test and play... im no at home

#

did you get an error booting it up before you could even connect a client before, @rich ridge ?

rich ridge
#

Nope I didn't get any error

meager horizon
#

hmm one sec

#

i may be able to connect something

#
[2020.02.26-09.11.40:954][585]LogNet: Join request: /Game/VehicleCPP/Maps/VehicleExampleMap?Name=BRAINWAVE-38F0A9964F08B410AD2966BA7C946B3D?SplitscreenCount=1
[2020.02.26-09.11.40:954][585]LogOnlineSession: Warning: OSS: No game present to join for session (GameSession)
[2020.02.26-09.11.40:987][585]LogNet: Join succeeded: BRAINWAVE-38F0A9964F```
yup im on, it works!
#

so you can do what i did @rich ridge to cut down the dedicated server side

rich ridge
#

Yeah I will do it today all thanks to you

#

@meager horizon are u sure that dedicated server is running RHI thread???

meager horizon
#

no problem... and iirc a dedicated server doesnt have any display at all

#

so no RHI

#

is yours built as dedicated server, or are you just running a listen server on a remote machine?

rich ridge
#

Dedicated server

meager horizon
#

because i was running a listen server on there for a while and didnt realise where i'd gone wrong, it wouldnt boot without -nullRHI... ive fixed that now

twin juniper
#

do I need to use cpp to create sessions for steam or can I use advanced sessions plugin to do it in blueprint ?

#

its a dedicated server

#

steam dedicated server api failed to initialize

#

any idea why I am getting this error ?

drifting geode
#

Hi can anyone by any chance tell me what the problem may be here? Every client but client one works in PIE. If I use 4 players 3 work but client one does not. Character spawns but it breaks somwhere after.

meager horizon
#

i have an actor which has components on it, those components all have positions which update frequently, so ive set those components as replicated using component replication.

#

the actor moves smoothly, its using character movement

#

however, the components of the actor move in jumps, one or two times per second

#

i think this may be due to lack of interpolation, can this be turned on for replicated actor components?

#

they only seem to jump once theyre set to simulate physics

drifting geode
#

@lament cloak I ran it as dedicated server. The window says client one (window header, also in the screenshot above). And also server wouldn't be able to draw the widget seen in the screenshot?

median marten
#

heyya. PlayerController->IsLocalPlayerController() false means simulated actor? whether client or server

quaint tendon
#

Need advice on synchronizing origin shift for 2 pawns at once (replicated). A character pawn inside of a spaceship pawn and the spaceship executes an origin shift. How would you make the character origin shift at the same time?

thin stratus
#

If the Client combines two moves, shouldn't the DeltaTime on the Server be the sum of the two combined moves?

#

Why would one want to delay sending a move in the first place?

chrome bay
#

Reduce the amount of RPC's being sent

#

Can quickly flood the move buffer otherwise

#

So it combines them to reduce the # of sent ones if they are considered "not important"

thin stratus
#

Right, but I get DeltaTime issues on the Server :/

chrome bay
#

The delta on the server is the delta between packets IIRC

#

It doesn't use the clients delta time but calculates it based on the last time it received a packet I think.

thin stratus
#

Client Performs Move 1 Move 2 and Move 3.
Delays Move 2 and later combines it with Move 3.
Server Performs Move 1 and Move 3, but Move 3 has the DeltaTime of the Client's Move 3

#

Yeah I know, it uses the last TimeStamp and the new one

#

Which makes even less sense to me, cause Move 1 and Move 3 are the only two that make it to the Server, but the DeltaTime is the same as the Client's move 3

#

Hmpf

#

I can fix the issue if I forceNoCombines

#

But that's shite

#

It's a move in a straight line, so it's totally fine if they are combined. It even makes sense more or less.

#

But not if the freaking Server doesn't move the same distance in the same time.

winged badger
#

you sure? any DeltaTime reported would be very inaccurate because you're running a debugger

chrome bay
#

we solved in in teh DM's ๐Ÿ˜„

lime sorrel
#

I'm apparently not understanding Multicast events..
I have a level blueprint where I call a multicast event to draw a debug point in the middle of my level which works fine for both server and client (but..)

#

What gives?

#

(the left window is the server, right window is the client and the blueprint to the right is where the debug point is being called)

meager spade
#

server/client rpc's need a owning connection

#

level has no owning connection

#

so a server rpc will just fail

lime sorrel
#

Right so if I wanted to call a multicast event from the server it would need to be called someplace else?

#

Like an actor with an owning client perhaps?

meager spade
#

normally for things like debugs

#

i pass through the PlayerController

#

but yeah the actor has to have a owning connection

#

this shows it clearly

#

Server owned actor - > Server RPC -> Dropped.

#

Owned by a different client -> Server RPC -> Dropped

#

Unowned actor (Level actor in your case) -> Server RPC ->Dropped

lime sorrel
#

So how do I define an owning client for an actor? I have a sword that I'm spawning on beginplay on the playercharacter class. Would it be enough to set the owner of the sword to the playercharacter?

mental geode
#

has anyone else experienced that their steam doesnt work on unreal anymore?

meager spade
#

yes

lime sorrel
#

aah okay this clears things up, thank you

mental geode
#

I have all the subsystems in place and plugins enabled but it wont show my steam name anymore in a blueprint I made

mental geode
#

Its working when I build my game and run it

#

but when I'm in the editor and launch a standalone it doesnt seem to get the steam overlay

#

anyone have an idea how to fix this or what I should start checking first

#

I;m launching standalone game with 1 player

#

steam is on and connected

#

my subsystems are both enabled in the plugins

#

I have the text that needs to be in the defaultengine.ini

mental geode
#

anyone have an idea what would cause not being able to use steam in the standalone play in unreal?

thin stratus
#

@winged badger Issue was I wasn't resetting my own data back to the start of the OldMove when they were combined. So the client performed the old move and the combined move. It's solved now.

#

I basically didn't know that the client actually reverts the old move and performs the combined one too. I thought the combined info is only for the server.

#

@mental geode Steam only works outside the PIE. Are you sure you are playing outside of the editor?

mental geode
#

yes. I have the standalone selected

#

if I go to my uproject file and right click launch game then steam works

meager spade
#

yes that standalone

#

not in pie

#

the screenshot you are showing is PIE

mental geode
#

but I'm using the standalone function at the play ??

thin stratus
#

Name might be misleading, but that Standalone is more about the window than the game

plush wave
#

I don't need a HasAuthority() check on an Server function right?

rich ridge
#

no

meager spade
#

i mean a server RPC is for the server, which is automatically authority

rich ridge
#

virtual void SetupInputComponent() override; Inside this function GetPlayerState() is NULL, why?

#

virtual void OnPossess(class APawn* InPawn) override; But inside this function GetPlayerState() is not NULL, why?

#

OnPossess() is called first and then SetupInputComponent() is called.

meager spade
#

cause SetInputComponent is called before player state is replicated back

#

client side

#

if you are doing it cause of GAS (ASC on PlayerState), then check the fix i made for @thick creek sample project.

rich ridge
#

Yes for GAS

meager spade
#

i do mine very differently

#

i build the input stack manually

#

and inject it in

#

but that is a lot more work

rich ridge
#

can you elaborate a bit, I can code thats not a problem.

meager spade
#

when the PlayerState reps back

#

in the controller, i create a InputComponent (AbilityInputComponent)

#

set the binds, and add it to the Input component stack

#

which allows me to remove ability binds any time or swap them based on what i am doing (Driving a car? change input stack), etc

rich ridge
#

this seems cool way to handle, I will evaluate this before coding directly, because I m more focusing on managing my code design. If it fits well then I will go with it.

meager spade
#

sure ๐Ÿ˜„

#

check PlayerController

#

has functions for handing inputcomponent

#

i can literally change all inputs for different modes in the game

#

like edit mode, if i wanted too

rich ridge
#

i can see its more flexible

meager spade
#

i know that is how Fortnite handle inputs, they have multiple input components and push/pop them when needed

rich ridge
#

ohhh I didn't know that

#
    virtual void OnRep_PlayerState() override;

    // Called from both SetupPlayerInputComponent and OnRep_PlayerState because of a potential race condition where the PlayerController might
    // call ClientRestart which calls SetupPlayerInputComponent before the PlayerState is repped to the client so the PlayerState would be null in SetupPlayerInputComponent.
    // Conversely, the PlayerState might be repped before the PlayerController calls ClientRestart so the Actor's InputComponent would be null in OnRep_PlayerState.
    
void BindASCInput();``` So these were things you fixed in dan's project right?
#

This is what I was looking for, timing couldn't have been more better.

meager spade
#

yes

plush wave
#

I'm getting a TravelFailure: PendingNetGameCreateFailure, Reason for Failure: 'Error creating network driver.'. Shutting down PIE. every time I try to play my game in editor with server and client...

#

Never seen this before.

ember gale
#

So I figured out with my issue that in game mode base, player controller fires off the client version and will add the widget to the viewport but if I switch to agamemode, the client version of my player controller event begin play never fires. Is there some extra steps I need to do when using the agamemode versus the agamemodebase ?

meager spade
#

you have to call StartMatch

#

if you use GameMode not GameModeBase

ember gale
#

So I did that, but no dice.

#
bool ARPSGameMode::ReadyToStartMatch_Implementation() {

    //Super::ReadyToStartMatch();

    if (MAXPLAYERS == PlayerControllerList.Num()) {
        StartMatch();
        return true;
    }
    return false;
}```
#

but maybe this isn't correct?

meager spade
#

does it get called?

ember gale
meager spade
#

ok then without really knowing how your setup works

#

im lost

#

cause we use AGameMode

#

and we don't have thee issue you have

ember gale
#

Gotcha. Yeah I'm just trying to get a widget to come up on my player controller for both server and client (listen server setup)

#

Fires on the server just fine, but the client version of the player controller never fires event begin play.

#

This is as far as I've come lol.

meager spade
#

i find PlayerController begin play too early

#

i use a custom AHUD

#

for my widget stuff

ember gale
#

Roger that.

meager spade
#

works flawlessly

#

but the fact its not being called

#

concerns me

ember gale
#

Yeah, never calls event begin play on AGameMode but on AGameModeBase works flawlessly.

meager spade
#

i mean if you had a missing Super call somewhere

#

that could explain it

ember gale
#

Ah yeah you know what I have the ReadyToStart_Implementation not calling the super because it causes a null pointer exception.

meager spade
#

yeah but that should be ok

#

i always check what the super does

#

before i explictly disable calling it

ember gale
#

Right.

ember gale
#

well the workaround right now is setting up a client rpc to act as the begin play that I call from game mode, that seems to work lol. oh well.

rose prawn
#

Hi people, I was wondering how to set those variables in DefaultEngine.ini I've just copied them to my project from another example project so I don't really have much idea how to use them. I'd love to hear some explanation.

#

I'm using AdvancedSteamSessions plugin.

royal isle
#

Hello everyone. My steam dedicated server shows up normally on the steam server browser but it doesn't show up on FindSessions. FindSessions reutrns 0 results. Any ideas?

half jewel
#

@rose prawn you set them by changing them what you mean?
also to explain the variables, it means that is the maximum bandwidth allowed per player... pretend theres like a thousand players fighting each other, this is massive amount of data flowing from server to client and what not... if there was not a limit then the servers connection would be saturated completly just sending data to one player! the entire game would fail... but with these limits each player gets a set amount of bandwidth allowed. now the game can continue, although laggy as you would expect but some things like reliable RPC's and some high priority variables would make it threw vs the bulk of the action.

#

as for the steam stuff i dont know what that does

ripe sky
#

Anyone know how I can make a game mode (similar to battle royale) where I start the game and then end when there is only 1 player alive?

#

not sure how to approach this with blueprints

#

I would think it has to do with destroy event and then somehow returning all players back to lobby.

#

been struggling for a bit

royal isle
#

@twin juniper Hey, if you still have an issue with it you can send me a pm

random verge
#

looking for feedback. So my game is currently a standalone single player game but I would like to leave the option open for the possibility of adding online multiplayer support in the future. Because of that, obviously I need to made certain design decisions now to make refactoring online support reasonable.
Should I be designing this as full-blown local authoritive server design now or what?

royal isle
#

@random verge if you wish to make your game support multiplayer then you should really make a multiplayer game to begin with. Singleplayer then becomes a listen server with just 1 player, the player. Otherwise, adding multiplayer support on top of a pure singleplayer project is qutie tedious and error-prone

random verge
#

Yeah that's what I'm meaning

#

and just put code in place for now that makes sure no outside clients can connect until time to add multiplayer support

royal isle
#

Exactly

#

This is not new either. I know of a few games that do this. The other option would be to build a separate SP and MP but if your gameplay doesn't change between SP and MP it is more efficient to just make it the way I mentioned I guess

#

If, however, your game has a SP campaign mode but the MP portion is just quick battle then you should separate the 2 entirely and build them on their own

half jewel
#

@random verge build the game with multiplayer in mind, adding it later is a nightmare in hell

#

your single player component can use the same code with proper use of authority & localplayerController etc

sleek current
#

Hey, how can I replicate an variable on USceneComponent?

meager horizon
#

how resilient is the UE4 networking code?

#

ive managed to crash it a couple of times by connecting to the game with a map thats newer than the servers

#

but i dont know if the fault is my own, or youre just 'not supposed to do that'

#

and if youre 'not supposed to do that', how can i put checks in place to stop it?

rich ridge
#

So how does server comes to know that the client is connecting with new map?

#

Does it maintain version internally? some kind of hashcode.

#

If server is maintaining some kind of version then it should ideally refuse the connection instead of crashing either client or sever.

#

@meager horizon If we consider your observation, then for every map update we should release new dedicated server and we should manually put hard check for clients after matchmaking regarding to which version of dedicated server they are connecting to avoid crash.

meager horizon
#

yeah i would have expected some kind of version control of the map, a check when connecting and joining the server

#

or some version control of the pak file or even the whole cooked game

rich ridge
#

if epic games is putting version check then it should refuse connection

meager horizon
#

in this instance though, i connected to it with uncooked game from the editor with PIE

#

maybe it didnt like that

#

did you try the "dont cook materials" thing btw? ๐Ÿ™‚

rich ridge
#

I didn;t try out , I will do that.

meager horizon
#

curious to know if that worked for you

rich ridge
#

I tried to connect and it worked fine, but un luckily I didn't change my map and connect again.

#

this I missed.

#

I m stuck with GAS at the moment. Once that is fixed I will start.

meager horizon
#

GAS?

twin juniper
#

it's the bread and butter of modern multiplayer, with Dan and Kaos spoon-feeding the Mini-Me legions, such as myself, with invaluable information ๐Ÿ˜„

meager horizon
#

oooooooooh something new to learn!

#

see, im pretty clued up on networking in general, and how multiplayer games work as a whole, but im a complete newbie to how UE4 does it all

#

my problem isnt making it work, its making it work the right way following the design ideals of unreal engine

rich ridge
#

GameplayAbilitySystem

meager horizon
#

i wonder if this is useful to my game

chrome bay
#

It's a good tool. Got to know when not to use it as well though.

meager horizon
#

yeah, all the attributes of my players characters are set once, before match start

#

but i guess taking damage takes away those attributes...

chrome bay
#

UE4's networking is good btw. Bias aside it's still miles better than anything else.

meager horizon
#

it seems extremely efficient

#

i found a plugin yesterday called Smooth Sync that makes it even better ๐Ÿ˜„

#

anyone else here using it?

chrome bay
#

nah. prefer doing my own. not really sure what purpose it serves

meager horizon
#

extrapolation, and tweaking of values

#

im curious how much rubber banding might occur in extreme lag though

#

and im still also not sure why client side prediction doesnt have the same effect

sleek current
#

Hey, how can I replicate an variable on USceneComponent?

meager horizon
#

tick component replicates, iirc

#

then tick replicates on the variable

#

that worked for me, but generated a lot of net traffic, as i have a lot of such components

#

what i did instead was had the state of a set of uscenecomponent managed by the actor that owned them, and synchronised its state from within the actor as one

winged badger
#

@sleek current what variable, one that is defined on USceneComponent and not by default replicated?

sleek current
#

It's variable that tell whether or not the component is enabled to work. It's a variable inside component

#

I tried OnRep

#

RPC's

#

etc

#

nothing worked for me

winged badger
#

whats the name?

sleek current
#

UPROPERTY(EditAnywhere, BlueprintReadWrite, Replicated, Category = "Interaction")
FInteractable InteractableStructure;

#

Or just

#

UPROPERTY(ReplicatedUsing = OnRep_SetEnability)
bool Disabled;

winged badger
#

so its a custom scene component

sleek current
#

ye

winged badger
#

and is the component itself replicated?

sleek current
#

yes

winged badger
#

on a replicated actor?

sleek current
#

yes

#

"Insert awkward silence"

winged badger
#

it is in ReplicatedComponents array on the actor at runtime?

sleek current
#

I have no idea, haven't implemented that

winged badger
#

its AActor

#

so you wouldn't have to

sleek current
#

the actor that holds it is just a basic blueprint based on aactor with replicated boolean set to true

winged badger
#

all actors keep all replicated components in an array

#

so its either your actor doesn't replicate, or your component isn't on that list

sleek current
#

so unreal's dont have ike dynamically generating array of that components and I have to hardcode each one?

winged badger
#

it does have it

#

you just put a breakpoint in the actor and take a look at the contents

sleek current
#

for some reason

#

the breakpoint doesnt trigger in blueprint

#

It literally does every single node added print string to make sure

#

but the breakpoint is not triggered

#

whaaaaaat

meager horizon
#

if i want to take screenshots of a multiplayer game, not from the perspective of one of the players, am i best to implement spectators and use a spectator for it? and can a spectator just be free-cam?

sleek current
#

@meager horizon Press F8 while playing in editor

meager horizon
#

thanks @sleek current ๐Ÿ™‚

random nymph
#

Is there a way to replicate actor movement but not to update the location of the actor to the replicated location on client?

#

NVM just figured out how get what I want

rotund whale
#

I'm using a framework that has this code. It's to set the visibility of a HUD element. I'm confused how executes on server -> widgets work. Doesn't this blueprint only call on server? It currently only works for player 0 (host) and is bugged on connecting client (player 1)

steep cipher
#

you can't execute server stuff in widgets

rotund whale
#

What does the "replicated to server (if owning client)" mean in this case? Does it mean this function will be called on the client, then called on the server?

#

I'm not trying to execute server stuff in widgets

chrome bay
#

RunOnServer makes no sense there

rotund whale
#

that's what I thought

#

it came like this, on a very popular framework

chrome bay
#

Not familiar with it but a Run On Server event in a widget makes no sense.

rotund whale
#

it should just be not replicated right?

chrome bay
#

They can't be let alone shouldn't

rotund whale
#

what? hah

chrome bay
#

Server and clients know nothing about each others UI

#

And they can't, you can't replicate widgets.

#

Epic should really disable the ability to mark functions as RPC's or properties as replicated in classes which don't support it... would help avoid that confusion.

rotund whale
#

fair enough

#

however, my issue still remains

#

the unit->getOwner gets a player controller that doesn't equal getPlayerController

#

I'm trying to only show this HUD, for the player who has ownership of the unit

#

getPlayerController (with index 0, on connecting client means itself right?) does not equal unit->getOwner()

#

how does multiplayer typically handle this sort of situation? where you need to show a HUD only for a specific player?

#

I'm also pretty confused by this, when calling print on this widget, both server and client prints something LogBlueprintUserMessages: [WBP_AbilityBox] Server: BP_PlayerController_ATBTT1 LocalPlayer_54
LogBlueprintUserMessages: [WBP_AbilityBox] Client 0: LocalPlayer_53

fossil veldt
#

Does anybody know if Animation Blueprints by default sync animation times? (Obviously with delay by the RRT)

#

I know technically the animations should sync up because the replicated states should change around the same time but is there anything to make sure the animations are running at the same time on client and server?

chrome bay
#

@rotund whale HUD should be managed by the client locally, that's how MP games handle it.

#

Multicasts won't work either

#

You literally can't do anything related to the network in or on a widget

#

@fossil veldt And no animations do not syncronise

#

Syncing them is pretty much impossible

fossil veldt
#

Is it?

#

I figured they wouldn't

#

But I thought you could just rewind the anims by the network clock

#

and sorta just interp them

#

so that they sync up

chrome bay
#

Given that the client and server are probably running at different rates, and given that dedicated servers don't usually run or evaluate animations at all yeah.

fossil veldt
#

ah can you not do framerate independent animations?

chrome bay
#

Well, the issue is that animations are framerate independent because they run and are evaluated on different threads.

fossil veldt
#

ah right

chrome bay
#

They're not synchronised with the game thread at all. Dedicated servers are usually single-threaded too so you don't tend to run them server-side unless you really need to

fossil veldt
#

yeah that makes sense

#

I'm trying to work out some lag comp with state rewinding

#

but one thing I can't work out is the hitboxes

#

because the server wouldn't match anims with the client

chrome bay
#

When it comes to animated hitboxes to that degree, you just have to trust the client to some extent

meager spade
#

thats why a lot of new games do client side hitboxes

chrome bay
#

We do lag compensation, we just interpolate the capsule back a little and check the clients "hit" was near the capsule

meager spade
#

and tell the server look i hit here

#

server does some validations

chrome bay
#

yeah, tis the way

fossil veldt
#

yeah

meager spade
#

for things like (arm, head, etc)

#

server can just do a broad trace

#

to make sure it was in that kinda range

fossil veldt
#

I think CS:GO's lagcomp somehow does manage to sync up the player animations

#

I guess maybe they take the local time of the animation and offset it against the server time of the animation

meager spade
#

but your adding a layer of complexity

chrome bay
#

Well for characters, animations don't actually play on the server between client packets

meager spade
#

for a simple system

rotund whale
#

@chrome bay ok so basically I should not be checking for unit ownership, player indices, etc on widgets?

chrome bay
#

I'm not really sure what you're doing tbh but the TL;DR version is that clients should manage what's on their screen locally

meager spade
#

@rotund whale widgets should pull the info they need, it knows its owning local player

#

anything widgets need to see either should be local or replicated via a replicated actor and pulled into the widget client side. Widget should do 0 replications, No replicated variables or functions.

fossil veldt
#

Yeah I get what you guys mean

#

Tbf I guess the client could just tell the server what time the animation was in when the hit occured

#

and then the server rewinds with that animation state and creates the hitboxes

meager spade
#

server really shouldnt play animations

#

if its dedicated

fossil veldt
#

It wouldn't be playing animations

meager spade
#

so why not just accept the clients hitbox?

fossil veldt
#

It would just create a pose from the animation time

#

create hitboxes at the socket locations

meager spade
#

Fortnite do it

#

they have DamageZones

fossil veldt
#

and then trace

chrome bay
#

It's not even worth the 32-bits per hit IMO

rotund whale
meager spade
#

32bits?

chrome bay
#

(float)

#

Sorry, I meant the extra 32 bits for the float snaps was saying

meager spade
#

in my game, client shoots, sends target data (which is hit results) pakaged.

#

this contains all hit info

chrome bay
#

Hell I don't even send hit results :d

meager spade
#

yeah but client produces the hit result

#

server does 0 trace

#

except for checking if a wall or somehting was in the way

#

a basic trace

fossil veldt
#

yea I would just want to send trace Start, End, Anim, Anim Time Float

meager spade
#

it works for Fortnite with 100 players

#

client sending in hitresult for every shot ๐Ÿ˜„

fossil veldt
#

Really?

meager spade
#

yes

fossil veldt
#

I figured that would be kind of expensive

meager spade
#

not if you serialize it properly

#

server doesnt even control weapons

#

server doesnt even know if a player started shooting till the first shot comes in

#

then it activates the ability, and monitors for target data

fossil veldt
#

Doesn't Fortnite use the same system as UT4?

chrome bay
#

Nah not anymore

fossil veldt
#

ah

chrome bay
#

They used to I think, but it's using GAS now

fossil veldt
#

huh.

#

For guns?

#

Wut

chrome bay
#

yeah

fossil veldt
#

That's not at all what I was expecting lol

#

I guess it makes sense as that system is built for MMO games

#

One thing I never understood about networking in UE4 was the network clock

chrome bay
#

well there isn't one really

fossil veldt
#

Everytime I use it I have had problems

chrome bay
#

What you mean by network clock?

fossil veldt
#

AGameStateBase::GetServerWorldTimeSeconds()

chrome bay
#

AFAIK there's no syncronised clock system in the engine outside of GameState::ServerWorldTimeSeconds - but even that doesn't work properly

fossil veldt
#

Yah

chrome bay
#

Problem with that clock is that it's still offset by ping

fossil veldt
#

Yea I don't understand why though, It shouldn't be hard to eliminate that surely?

#

Just offset the result you get back by the half ping

#

and it should be matched perfectly

chrome bay
#

Well.. the trouble with ping is it's not necessarily a perfect 50/50 split

fossil veldt
#

Yeah but you can send a local time

chrome bay
#

Probably relatively close 80% of the time, but not perfect

#

Yeah but even then - you don't know if the packet took as long to reach the server as it did to get back

fossil veldt
#

hmm

chrome bay
#

You also don't know how long the server took the process the packet and send another back etc, so there are still small delays you can't account for

fossil veldt
#

ah yeah that makes sense

chrome bay
#

All that being said, I do the same thing to get a rough time sync'd clock - it's just about good enough for most things

fossil veldt
#

You use GameState's one?

#

Or your own

chrome bay
#

my own but it's the same basic idea

fossil veldt
#

Ah fair enough

chrome bay
#

I have a little component on the player controller that I use for it

fossil veldt
#

Ah

#

I need to implement one of those

#

I think I would probs put it in the PlayerState though

chrome bay
#

So the reason I didn't do that is.. it's replicated

#

And players don't care about other players' prediction/clock etc.

fossil veldt
#

ah fair enough

#

that makes sense

#

How do you guys even know how Fortnite's networking works for stuff like this

#

have they showed it off in Devlogs or something?

chrome bay
#

They've done some very brief explanations of it but the info is kinda spread out all over the place, some on UDN, some on the forums etc.

#

Never anything particularly official AFAIK

fossil veldt
#

ah

chrome bay
#

Kaos probably knows best where that stuff is

fossil veldt
#

Riot's new FPS game they say has pretty much eliminated peeker's advantage

#

but I don't understand how that would be possible

chrome bay
#

ah no idea.. maybe they have some kind of lockstep hit detection or something.

#

Mind you... be interesting to see if they support those claims when they finish it ๐Ÿ˜„

fossil veldt
#

ha ha, I'm interested to see

chrome bay
#

Did roll my eyes a little when they said the game was "built from the start to prevent cheating".. as if other games aren't..

fossil veldt
#

yea

rotund whale
#

components can replicate right? I set my component to replicated, and its own variable inside to replicated, however the replication seems to not end on on client-side

fossil veldt
#

they can replicate yes

winged badger
#

they do need a replicated actor to be on

rotund whale
#

ah good tip

winged badger
#

there is no such thing as an unhackable game

#

claiming it just makes you fall flat on your face more spectacularly when it gets hacked

fossil veldt
#

Aye, There's always some nerd somewhere with IDA and a stupid amount of brains

drifting geode
hexed merlin
#

Hey guys, is there a way to know if an actor is destroyed due to no longer being relevant in replication graph?
We want to play effects when an actor gets destroyed but not if it's being destroyed from going out of relevancy

idle flame
#

Hey, Someone knows how to start a dedicated server via command line ?

#

And join it ?

#

The -server flag start the game, I don't understand why

hoary lark
#

like UE4Editor.exe ProjectName MapName -server -game -log?

idle flame
#

When I do this command the game start and a window open with the player and stuffs, I'd like to only start the dedicated server

#

@hoary lark I have package my project for win64, and I'm trying to start a dedicated server with the .exe from the package

idle flame
#

Here is what I have done after packaging the project : " .\MazeLegends.exe FirstPersonExampleMap -server -log -nosteam"
But for some reason, when I start this command, the game start, a game window is open and a player spawn in the world ...
Do you know the right way to start a dedicated server and to join it please ?

sleek jackal
#

Is the player controller Index on ervery client 0 ?

hoary lark
#

@idle flame disclaimer: I don't need a dedicated server for my project so while I have looked up how to do it, I don't have any real experience with it. having said that, did you actually build a dedicated server, or did you just build the game? are you aware you have to explicitly build a dedicated server?

rotund whale
#

When I'm testing multiplayer, the line trace debug visualization no longer works, is there a way to make that still visible?

idle flame
#

@hoary lark I didnt know that. Thx for the help ^^

viscid escarp
#

Hello guys! Do someone know how/where UE4 pass SteamGameServer_Init value?

viscid escarp
#

by AdvancedSteamSessions plugin btw

solar halo
#

Anyone have any info on adding in voip?

twin juniper
#

this is what pubg uses

solar halo
#

Yeah. I'm curious if the voip stuff in the engine is good or not.

twin juniper
#

no lol

coarse shadow
#

(zoom in (tell me if discord compression makes this imposible to read)) im trying to make it so that if you get close to another player there hover ui gets shown but its not replicated to other clients and it only shows the server's hover ui anyone knows what went wrong?
(the server's cast always fails and i dont think making a wdiget visable is replicated)

edit: replication works now but the cast only works for the opposite chactor

#

ima try to rewrite this to use triggers insted

half jewel
#

yea more like a: i can hear these players around me because i had triggered overlaps on them... and if they are bReplicatedIsTalking (repNotify) enable their ui

#

and for any reason if my overlap ends on this player, hide their ui

#

idk how well this works with any voip system, and their might be better ways or this functionality might even work out of the box with voip system... just gatta find the right delegate

coarse shadow
#

@half jewel hey i got it to work 90% ;) but this function dose not change the target ui's visablity it changes my own any idea?

#

(and yes i tested it the other object is not the one with the hover ui trigger)

coarse shadow
#

i need to project it to the player that owns it and not the cleint

dusty brook
#

how can I change the owner of a replicated actor?

#

I mean, once it's spawned

bitter oriole
#

SetOwner() on server

dusty brook
#

ah, from the server

#

as a client I can't request ownership

half jewel
#

just make an rpc that calls SetOwner, beware that this is needs to be protected as you can imagine

#

if its a pawn, and you want to call rpcs on this newly owned pawn, make sure the pawn's ::GetNetConnection() is overridden to call AActor::GetNetConnection() so rpcs can work

unique kelp
#

Are reliable RPCs still UDP?

#

I assume so, as I only open port ranges for UDP on my servers, but just to be sure

half jewel
#

๐Ÿค”

chrome bay
#

@unique kelp yeah

#

Nothing at the game level uses TCP

unique kelp
#

Thanks, that's what I thought, since someone referred to a reliable rpc as a "tcp rpc" and it sounded so wrong

chrome bay
#

yeah everything is UDP, Epic have their own system for "reliability" as such

#

much more game orientated ๐Ÿ™‚

pallid mesa
#

is there any diagram for their "reliable" UDP communication pipeline?

chrome bay
#

don't think so

#

But the TL;DR is that reliable are added to a per-actor buffer, and the client sends an ack for each one it receives

#

If that buffer overflows, the client gets kicked

pallid mesa
#

ack for each one? seriously?

#

why not a NACK based model?

chrome bay
#

Well maybe it's smarter than that, but that's just the general idea

pallid mesa
#

Oh yeah I guessed something along the lines, I was looking more on the low level details on it

#

good to see what I assumed was spot on

chrome bay
#

I'm not sure how NACK's would work anyway, the client/server couldn't send a NACK for something it doesn't know it's meant to receive

#

But I'm sure it batches ACK's together when it can

pallid mesa
chrome bay
#

There's no client-client communication in UE4 though.

#

And since reliable's aren't necessarily called in a known order, or regularly etc.

#

Dunno, maybe there's more to it

pallid mesa
#

totally, didn't think about it!

lean river
#

hey!
can i get a brainstorming?
anyone have some idea how to trigger movement speed modifiers from the server to work with client prediction but also be "hackproof"?
i mean if i trigger movement speed change on the server (reduce max speed technically), clients still try to move with original speed until replication happens..
only idea i got: wait for the answer come from the client he got the modifier. if server do not get any answer packet, server would enforce the speed modifier (to make it "hackproof")

chrome bay
#

Yeah but.. how does Receiver know it missed 24 until it receives 25?

pallid mesa
#

That's the thing, it doesn't until a timeout

chrome bay
#

Yeah, so I'm not sure nack is probably enough for something time-sensitive like a game

#

Reliables are garaunteed to be executed in the order they are called too (per-actor anyway)

#

I dunno.. Epic are smart, maybe there's more going on underneath ๐Ÿ˜„

pallid mesa
#

these both models guarantee order

#

yes I would like to know that specifically, because I found somewhat fascinating the low level of their networking layout

#

In distributed algorithmia, there are lots of algorithms worth exploring for networked games

chrome bay
#

@lean river So long as the client predicts the speed change it should be fine, the packet to change the max speed should arrive at roughly the same time as the predicted movement packet.

#

Ultimately the Client should change the max speed in advance of the Server, the server would then also change the max speed, then replay the clients' move. if the server didn't agree that the speed could change, the move would be "corrected" and returned to the client.

#

E.g, sprinting is a common case

lean river
#

yup thats fine, i mean increasing movement speed works.
decreasing movement speed on server causing the issue. if that happens the predicted movement from client would bad always (and corrected by server) until client gets the modify

#

ill try to eliminate this problem

chrome bay
#

Yeah, you will have to decrease it on the client as well

#

You can't really avoid the correction issue otherwise

#

Everything you do to modify character movement should be predicted by the client. If you can't do that you should expect a correction.

lean river
#

thought the same thing.. :/
i cant really do anything because of player's ping (speed mod change trigger xx ms later on client, so correction would always happen atleast in that short time) except if i wait before ill enforce

#

or i ignore the whole thing ๐Ÿ˜„

chrome bay
#

What I mean is you want to do the speed mod change on the client, and tell the server what you did

#

If the server is applying it - you don't really have any alternative other than to just accept a few corrections until it replicates.

winged badger
#

you could ramp it down "slowly"

#

instead of applying it instantly, that would lessen the correction

lean river
#

gotcha, but im not sure i can predict that always..
i mean some effects might applied directly on the server.. in this case correction happens always..
but i get it.. everywhere i can i should apply movement mod to predict the speed before i actually trigger the effect on the server

#

hmm ramp is also a good idea maybe

half jewel
#

can that experimental predictive plugin help with this?

chrome bay
#

Nah not really

#

It's more of a design problem than a technical one

lean river
#

back info: movement mod is a part of a buff/debuff system..
seems the ultimate solution is to predict if the given effect modify the speed or not and apply it before ill do / check / apply buffs/debuffs on server

chrome bay
#

Are you using gameplay abilities for it?

lean river
#

nop, custom system

chrome bay
#

kk

#

But yeah the idea is you predictively apply the effect client-side in the hope that the server will do/has done the same

#

GAS has it's prediction system for that kind of thing

lean river
#

thanks for the help.. :)
ill check gas and experiment with client prediction / handle things if somehow the effect is not applied on server...
yey lot of work \o/ ๐Ÿ˜„

velvet dune
#

Anyone know how to do dedicated server console commands?

pallid mesa
#

what for?

#

@velvet dune

#

anyways, one way to do something like this would just be to roll your own type of RESTful API that the server can handle. As a quick and hacky way, you could use something like GEngine->Exec(GWorld, <YourCommand>, GLog()); Where would be some string you've received via your API.

velvet dune
#

@pallid mesa want to make a command that runs thr kick blueprint and a server shutdown that removes all players.

pallid mesa
#

so... who is going to execute this

#

a player?

#

inside the game?

#

outside the game?

velvet dune
#

Outside on a dedicated server console

pallid mesa
#

forget about the console idea

#

and focus on doing an authentication system you can ensure

#

on top of that authentication system you can enable a set of users to fire commands

#

like I commented above

velvet dune
#

But I want to do stuff like you can do on like minecraft how you can type a command in the server console so you do not have to have the game open.

pallid mesa
#

I'll point out that this opens you up to huge security issues, so you'll likely want something more advanced and use authentication. E.G., it would likely be safer to have your server reach out to a known IP rather than accept any incoming traffic. Better yet, depending on how hosting your dedicated servers, there may be APIs you can use to do more direct communications with them (e.g. AWS has management console which may be able to trigger events on a server, which you could then likely hook into).

#

you don't need the game open with a restful api

#

it is what we used on GiT

#

any staff member can execute any set of commads on any client

#

or if needed on the server

#

for that you'd need to use any rest plugin

#

(in the case you are more comfortable wit BP's I would recommend va-rest

#

and If you want to get all fancy, you can broadcast messages from server to clients using the ULocalMessage system included in the engine

#

it will require a bit of work, nothing comes out as free

velvet dune
#

Is it just me or did somthing just go flying over my head at 100m/h

pallid mesa
#

well I have some experience on the field xD

#

do not hesitate on make any question

velvet dune
#

I just started geting mp to work and I'm still working bugs that I do not understand

pallid mesa
#

then forget about the remote commands idea until you get more comfortable with the engine

#

it's a cool thing but requires too much setup of multiple different things yada yada yada

velvet dune
#

One of my problems is when I shut the server down players do not get sent to main menu. And I have the server running on a 2nd pc.

pallid mesa
#

dc server?

velvet dune
#

Yea

pallid mesa
#

okay, so if you look at the player controller functions

#

there should be anything that firebacks delegate the moment the server connection gets closed.

#

I've done this before but I can't remember right now the right call

#

@winged badger this

velvet dune
#

i think i need to also say im using advanced session.

pallid mesa
#

so you basically need to hook to the session destroy delegate pretty much

#

maybe these keywords help for your google searches

velvet dune
#

also i already use VaRest for geting account info from a database

pallid mesa
#

that doesn't make much sense. Where are you calling that

velvet dune
#

that code is in the ThirdPersonController

#

the Kicked event is not being called at all at the moment was a Future Code i added for a admin menu.

pallid mesa
#

I'd forward you to any resource for you to understand why that doesn't make much sense, but the networking series of wess bunn has some flaws here and there...

#

you are destroying the server session

#

from a player controller

velvet dune
#

well was manly designed for local hosted server from with in the game so when the host leaves and go back to the main menu it destroys the session.

#

so any player on the session get removed

pallid mesa
#

oh listen servers... okay

velvet dune
#

i just do not know how to call it on a dedicated server at the moment i just hit the X on a dedicated server

#

but dus not send players to main menu

pallid mesa
#

okay, I'll take a look this afternoon at home so I can point you to the right function

velvet dune
#

ok also if you want you can just PM me because i sum times miss the pings for server

pallid mesa
#

take a read to cedric exi networking compendium

#

in the meantime

velvet dune
#

because i love to be able to put a command in here to shut the server down correctly

pallid mesa
#

nah you cant

#

that's a read only console

velvet dune
#

how do i get one i can type in like ARK has?

fossil veldt
#

hmmm, I seem to be getting this error on my GameChat actor when trying to send the Server an RPC from a client

LogNet: Warning: UNetDriver::ProcessRemoteFunction: No owning connection for actor BP_GameChat_C_0. Function SendMessage will not be processed.
#

The actor is replicated though so surely when I call the function on the client because it's a RunOnServer function it should be calling on the server?

#

It's always worked like that for me in Blueprint anyway

chrome bay
#

The client doesn't "own" the GameChat actor so they can't send the RPC

#

Only one client can "own" an actor at once

#

The SendMessage RPC needs to be in an actor the client owns, like controller or player state

fossil veldt
#

Huh.

#

I wonder why this only applies with C++ tho

#

I will do that tho, Thanks

#

So wait can clients not call server RPCs on the Gamestate? I thought the whole point of that actor is that it was shared between clients and server

winged badger
#

they can't, they don't own the GS

#

and it doesn't apply only to c++

fossil veldt
#

Yeah you're right I just tested it

chrome bay
#

GS shares data and is always relevant but clients still don't own it.

fossil veldt
#

ah

#

What's a clean way to contain all of my server RPCs then

#

do you just chuck em in the player controller?

chrome bay
#

Put them in the player state / player controller

fossil veldt
#

fair

chrome bay
#

Common thing for game chat

fossil veldt
#

I guess PlayerState makes more sense

winged badger
#

they can go into components on either of those

chrome bay
#

Might be worth considering making a UGameChatComponent

#

(or something)

#

So you can still compartmentalize it, and just add that to the player state.

fossil veldt
#

yeah, not a bad shout

#

Yeah for some reason it only gives you the owning connection error in C++

#

in BP it doesn't give an error, it just doesn't work

chrome bay
#

I don't want to discourage anyone but I avoid BP networking with a barge pole ๐Ÿ˜„

fossil veldt
#

I agree it sucks

#

I only ever had problems with it

#

It's refreshing to hear that C++ networking with UE4 might not actually suck

sleek jackal
#

I have a question currently im working on a name system wich shows the name of a player the variable is replicated so ervery client knows the name of every player. But the server doesnt seem to get the client names replicated only the server the ones from the clients! Whats the problem here?

chrome bay
#

FYI the players name is already replicated in the player state

#

That's where you're meant to get it from

sleek jackal
#

Oh ok ill try that! Thanks

#

But how can I change the name i cant find set player name ?

chrome bay
#

Doesn't look like it's exposed to blueprint

sleek jackal
#

Cant I just replicate the variable in my character bp?

winged badger
#

@chrome bay @sleek jackal it is, only its a function on GameMode

#

ChangePlayerName or some such

chrome bay
#

Ahhh kk

#

@sleek jackal Strings are expensive to replicate so ideally you want to use what's already there.

sleek jackal
#

Oke but how would you handle something like health

#

?

chrome bay
#

probably a replicated float in the character BP.

#

depends

brittle karma
#

i added $(DXSDK_DIR)Include and $(DXSDK_DIR)Lib\x86 to the project

#

based on the tutorial it has to work after including those include paths but it gives me these errors

velvet dune
#

@chrome bay hey was wondering if you can help me a bit i have a few things that pull players name works fine on Player List and Chat Window but Name Tags Show up with your own name on all players

stable kindle
#

Hey guys was just wondering i ran an editor build with the -game argument and hit netprofile. the .nprof file doesn't seem to load in network profiler. Is there something I'm doing wrong. Should i have a debug or test build for it to work correctly ?

chrome bay
#

make sure you stop the netprofile as well

#

otherwise the headers aren't written properly

#

start netprofile and stop netprofile

sleek jackal
#

@velvet dune screenshot?

stable kindle
#

@chrome bay thanks does this work with the editor or do i need a debug version

chrome bay
#

works with editor too

stable kindle
#

ah great thanks ^_^ @chrome bay much appreciated

velvet dune
fringe sinew
#

Does anyone here have any experience working with SocketIO Client plugin.

sleek jackal
#

@velvet dune i think controllers arent replicated

#

I saved my settings in the players state so these are replicated

#

So try to save it in a custom player state .Create a replicated variable there and then in your player blueprint cast to it.

zealous saffron
#

Player Controllers are only relevant to the owning client and server.

#

They don't exist on non owning clients

sleek jackal
#

But player states work in this caste ?

solar stirrup
#

Is it better to check if we're on the server before calling a server RPC (to execute the implementation ourselves), or does the server RPC automatically check and execute the implementation immediately if so?

winged badger
#

@solar stirrup server RPC when called from server is just a normal function

solar stirrup
#

๐Ÿ‘Œ

#

anything I should know about when calling RPCs with a struct as an argument?

#
USTRUCT(BlueprintType)
struct GAME_API FFunctionifyCallData
{
    GENERATED_BODY()

public:

    FFunctionifyCallData()
        : Inventory(nullptr)
        , SlotPosition(0)
        , Invoker(nullptr)
    {}

    UPROPERTY()
    UInventoryComponent* Inventory;
    UPROPERTY()
    int32 SlotPosition;
    UPROPERTY()
    AGameCharacter* Invoker;
};

This should work right?

winged badger
#

const &

azure karma
#

Hey guys, I don't know, what I have done, but I built a dedicated server for linux, deployed it on another machine and now im only able to connect to it from the editor, not from my windows client build. Everything shares the same code. Could that be because I build it as "Development Server"? was it supposed to be "Shipping Server"? Thank you ๐Ÿ˜„

half jewel
#

maybe, that raises another question actually.
can different builds of a game connect to the same server ?

royal isle
#

Hey guys can someone walk me through how to properly handle when a player gets kicked from a dedicated server due to a network error? Cause at the moment what happens is when my dedicated server crashes the clients get kicked to the main menu but they cannot rejoin the server unless they restart their game. I am guessing I need to do some local cleanup?

narrow prairie
#

hello, im working on a server/client way of multiplayer but i ran into some weird issue "or maybe not weird for the experts out here"; i have a projectile that has a event hit, with a switch has authority.. when it hits on client (all server codes works fine, enemy goes down etc) however on the remote execution pin it seems to fire at random or sometimes not at all. Is there anyone who guide me in the right direction?

#

so the visual feedback on the client is not working all the time if that makes sense

#

when i print string directly afterwards the switch has authority on remote exec, it sometimes print and sometimes it doesnt print

fleet raven
#

wtf, why when I replicate a subobject of a subobject, on the client the outer is set to the actor, and not the same object as on the server?

winged badger
#

yes

#

i ran into that gem, had component replicate subobjects and when it arrived outer was the actor owner

fleet raven
#

any way to fix it?

#

how does that even work, doesn't that make the full name different?

#

can I just like SetOuter() or something?

pliant ember
#

Someone please help getting this error "LogOnline: Warning: STEAM: Failed to initialize Steam, this could be due to a Steam server and client running on the same machine. Try running with -NOSTEAM on the cmdline to disable.
LogOnline: Warning: STEAM: Steam API failed to initialize!"
On a dedicated server

chilly mason
#

does ue4 have nat punchthrough capabilities, something like a punchthrough server and/or client code to enable peer to peer networking?

#

I've started looking at the webrtcproxy program but would appreciate any directions on where to look

#

I'm guessing something with libjingle is what I'd need

#

or is it more common to use Steam's nat punchthrough service (forget what it's called)

spare glade
#

steam sockets

chilly mason
#

nothing in ue4?

fleet raven
#

there is nothing in unreal

#

only online subsystems like steam or eos

royal isle
#

Unreal's own networking only supports the strict Client-Server model. If you wish to make P2P systems like this you need to implement your own solution afaik. You can use whatever library suits you or even build your own system by utilizing unreal's socket library.

chilly mason
#

sure - I'm just trying to figure out at what level will I have to start rolling my own code

#

I'm guessing ue4 must have a reliable udp transfer mechanism etc. so probably higher level

royal isle
chilly mason
#

cool - is this directly one level above winsock on windows?

royal isle
#

It sure wraps it, I am not sure if it is the direct wrapper though, knowing unreal this probably wraps a few more wrappers underneath but you'd have to look into the source code to find out

chilly mason
#

sure thing

#

thanks!

royal isle
#

good luck!

chilly mason
#

actually, what would be the layer on top of this?

#

would that be the messagebus or is that something entirely different?

royal isle
#

Steam Sockets is a layer above inheriting from this, dunno about anything else tbh

chilly mason
#

got it

orchid harbor
#

How to deal with spectator mode? I searching for some information in documentation. (game mode/spectator class in ue4). Thank for helping i can not find correct doc.

fossil veldt
#

Hey so, Because of UE4's variable tickrate what is the best way to handle replication of player movement? I would expect most games call a ServerMove() RPC at a fixed rate, Say 60hz or something. You could do this by attaching ServerMove() to a looping timer at 60hz, However i'm guessing this isn't the way to go in ue4?

#

As I guess if you were to do this in UE4 and the tickrate didn't match the ServerMove() update rate you would just be sending a bulk of movement RPCs in one go which is probs not optimal.

fleet raven
#

most games use the default character movement which means ServerMove is called at a variable tick rate, every frame for the client

fossil veldt
#

That's interesting, If you ran a UE4 game at 144fps would it be sending packets at that rate then?

fleet raven
#

I think there is actually a limit that prevents it from sending more than 120 a second

#

otherwise, yes

fossil veldt
#

Ah ok

#

I didn't want to use the default character movement as it feels a bit stock imo, I have built a custom movement component based on Quake's movement system however just trying to work out the best way to network it

#

Is the networked movement in character movement or pawn movement?

fleet raven
#

character movement

#

it is an absolute nightmare

fossil veldt
#

Ah

#

I always hated using it as there's a ton of clunk that I just don't need

#

So calling ServerMove() RPC on tick is the way to go I guess?

#

Also does UE4 happen to heap RPCs together into one network update?

#

So say you do 3 different RPCs per tick would you be sending 3 different packets?

#

Or 1 packet containing the 3 rpcs

fossil veldt
#

Also just thinking about variable tickrate with movement, How do you stop somebody on their potato PC running the game at like 8 fps having completely janky movement, I get that you can interpolate but at a low rate like that surely it starts to become noticable to other players?

hoary lark
#

just bear in mind the CMC is 11,000 lines long (14,000 if you include the header), I bet there's a couple thousand lines of stuff for root motion and a few thousand lines relating to navmesh / AI and physics-based movement stuff. the rest is just basic required stuff for a "good", networked, character movement solution. like, several thousand lines. make sure you're up for a long haul if you want to build something comparable

fossil veldt
#

I'd use the default CMC if I could get rid of all the default movement it comes with

#

But it's so damn bloated

#

I'm not sure why they don't offer a networked movement component with nothing fancy

hoary lark
#

supposedly there's something in the works, but don't hold your breath, it'll probably come sometime between 2021 and cyberpunk 2077

fossil veldt
#

Hope so

hoary lark
#

i'm surprised you would pick those particular settings as "unnecessary" though, a good chunk of those are ... pretty basic for anything short of an airplane simulator

fossil veldt
#

I am after a properly bare metal component with pretty much nothing but the default physics options

#

like velocity ect

#

As i'm extending quake pmove for my movement component

hoary lark
#

well. it's basically a rite of passage for every indie or hobbyist game dev to try to make their own movement component at least once. i know i did HaroldHaha

fossil veldt
#

ha ha

royal isle
#

I once tried making an unreal like movement component that could work with box collision

#

that didnt go very well

fossil veldt
#

I wonder if a viable option would be to just copy the CMC file

#

and manually strip out all the default modes

#

seems like a horrible idea

royal isle
#

It actually is no joke

#

you can get away with removing pretty much half of the code in there

fossil veldt
#

Ah, that's surprising

royal isle
#

but you need to know which bits are really needed ๐Ÿ˜›

fossil veldt
#

Yeah that's fair

#

Perhaps someone has already done it actually

#

Honestly just looked at the CMC source code, Seems like it would just be easier to design from the ground up

#

Will just be working around Epic's code otherwise

royal isle
#

that is somewhat what they are trying to do but it is going to take them a while

fossil veldt
#

yah fuckit, I'm doing it

#

long haul it is, Gonna have to design the netcode from ground up

#

oof

royal isle
#

would you be so kind as to make it a public repo? xD

hoary lark
#

See you sometime between 2021 and cyberpunk 2077

chilly mason
#

what's so bizarre about a custom movement component

#

if one doesn't need root motion, jumping, crouching, are-you-on-a-ledge checks

#

and suppose it's an rts where the "landscape" is much more predictable than in an fps

royal isle
#

what if you do need all those but you need it to work with box collision as well though :/

chilly mason
#

then you're reinventing the cmc obviously

#

unless you figure out where to perform laser surgery on it

royal isle
#

I did try but never finished it

hoary lark
#

Well. Nothing bizarre about deciding to make a custom movement system if you have a use case that matches barely anything that epics cmc is made for, of course

fossil veldt
#

would you be so kind as to make it a public repo? xD
@royal isle
I'm going to build a "NetworkMovementComponent" that mines sits ontop of

#

so maybe I will with that part

#

depends

chilly mason
#

ue4 is pretty neat once you figure out what to drop

#

chief among them the cmc if you're not making an fps

fossil veldt
#

I am making an FPS

#

Hehe

chilly mason
#

too bad

fossil veldt
#

Ya

#

Problem I see with epic's CMC is that it probs has it's own alternative of "Categorize Position"

chilly mason
#

you probably know already but someone's made an almost 1:1 port of half life's movement system in ue4

fossil veldt
#

So stuff like Surfing and Ramp Jumping ect will always only ever be available via hacks

#

Yeah, Project Borealis

chilly mason
#

yes

fossil veldt
#

It's a bit hacky tho

chilly mason
#

well they had to match source's

fossil veldt
#

and doesn't include

stuff like Surfing and Ramp Jumping

chilly mason
#

also what's not hacky

#

there is no perfect nice clean code

#

only in the books if they manage to not misprint it

fossil veldt
#

It's not so much about the cleanliness for me as it is having to find workarounds for things all the time

#

When if I build it from the ground up then I don't need to do that

chilly mason
#

- Every software developer ever

fossil veldt
#

ha ha

chilly mason
#

:)

#

sorry

fossil veldt
#

it's true

#

you are right

#

It's just I already can foresee annoyances with trying to deal with stuff like surfing

#

as CMC probs handles everything to do with collision bumping by default

chilly mason
#

cmc is intertwined w/ ai and physics

#

therefore it's very ugly, ancient and slow

#

not to mention the movement comp

#

probably clears 100% of the instruction cache on any given tick, too

fossil veldt
#

yea eek

chilly mason
#

why don't you try finding someone to work with on the cmc?

#

seems like all the fps ppl need it

fossil veldt
#

Because it's half done

#

I just need the networking part

#

Honestly I don't mind open sourcing the network part of the component

#

I already have Quake's movement in UE4 working on my own component

#

Just tryina figure the best way to get it networked now, It would be fine but I don't fully understand how you deal with UE4's variable tick rate

chilly mason
#

is this for a retro game btw?

#

I mean why would you want old quake's movement

fossil veldt
#

Nah, I'm gonna extend it

#

It's just a baseline

#

But I think Source / Quake has really nice movement

#

Air strafing, surfing, trimp jumping all that jazz is stuff I need

chilly mason
#

do this

#

it's probably the hottest shit around

fossil veldt
#

Oooo nice

chilly mason
#

nice animated infographics too or w/e you call them

fossil veldt
#

Overwatch is actually one of my main researched games for this

#

I dunno how the hell I missed this vid

#

Tyvm

chilly mason
#

sure

#

also get your ticks under control

#

I think the sea of thieves devs did an okay talk on it

#

tick manager or something like that

#

of course you can (and should) always go full ecs

#

which is part of what overwatch is doing

fossil veldt
#

That's a good shout

#

I actually haven't any experience with ECS

#

Will have to do a bit of research into that first

chilly mason
#

wrt tick rate, aren't fortnite servers ticking at like 10hz or something?

fossil veldt
#

It's variable

chilly mason
#

don't think that they're variable

#

the servers?

fossil veldt
#

Yeah

chilly mason
#

If you're looking at Epic's official numbers, the tick rate for Fortnite is a stable 30hz.

fossil veldt
#

It changes based on the state of the game

#

Pretty sure it goes higher at the start of the match

#

Unless they changed it

#

Ah, It looks like they changed it

chilly mason
#

not sure how variable tick rate on a server works (or would work)

fossil veldt
#

I think it's more to do with the send rate

chilly mason
#

it's not running any graphics and let's suppose it's a beefy server serving 4 shitty computers: its fps would be much higher than that of its clients if left uncapped

#

and if they're capping it

#

then it's a fixed frame rate

#

so then networking comes in

fossil veldt
#

I guess it has some kind of buffer that stores states

chilly mason
#

but why would you ever want to have a variable net tick rate?

fossil veldt
#

and then they just up the throughput

#

I guess it's to do with server costs

chilly mason
#

keep it as low as you can

fossil veldt
#

I still don't understand why anybody thinks client variable tick is a good idea either

#

Makes everything a pain in the ass, Just another layer of complexity to think about

chilly mason
#

so don't do it

fossil veldt
#

Wait can u turn off variable tick rate wut?

chilly mason
#

you can set a fixed time step for the entire engine if you so choose

#

not sure about the netcode part

fossil veldt
#

The netcode part is what I meant

chilly mason
#

but there's a custom timestep provider as of late

fossil veldt
#

Ooo

chilly mason
fossil veldt
#

I hope you can turn it off, It's my least favourite part about the engine

#

I would WAY prefer a fixed network tick

#

Isn't that for Physics Substep?

#

wait shit when did they add this

chilly mason
#

physics substep is a different thing

fossil veldt
#

Can you seperate the gamethread's tick from the framerate with this?

chilly mason
#

can't tell, haven't used it

fossil veldt
#

Thanks for the heads up, i'm gonna take a look into this

chilly mason
#

sure

fossil veldt
#

Wait I think this is meant for video editing

#

I don't think the intended use case is what i'm trying to do

spare glade
#

So im having a bug in steam sockets or unreal, if i join a match between my laptop and desktop, this process continues on after i close the match, then when i load the clients back up on both, my matchmaking list shows 9999 ping and when i click join it has travel error

#

is there a way to fix this

#

idk if its 100% that

#

but there is a bug im having where closing the clients after being in a lobby then having them rejoin eachother in new lobby causes travel errors

stable kindle
#

@chrome bay hey so even after i profile it spits out the .nprof file but doesn't show me anything. when i use the networkprofiler.exe. Am i missing some setup? i have an editor where i ran the netprofile enable and netprofile disable commands

hexed merlin
#

Hey guys!
I have a volume in which characters will be moved a fixed distance per second using SetActorLocation/AddActorWorldOffset. This movement is performed on Tick on both the client and server. Enabling NetShowCorrections it is clear that a lot of network corrections are occuring. Furthermore, setting IgnoreClientMovementErrorChecksAndCorrection to true while inside the volume shows that the character is being translated much quicker along the ground than the client which causes the previously mentioned corrections.

This has been reproduced in a Third-Person Template project with nothing more than a TriggerBox derived blueprint that performs the movement logic on Tick on characters that step inside it.

Unfortunately, using AddForce or similar Physics-based movement is not an option for us in this case. Is there any knowledge of why this difference is happening/how it can be dealt with?

potent cradle
#

Just a quick note that there's been wonderful stream this week that might help someone, sure clarified things for me: https://www.youtube.com/watch?v=09yWANtKmC8

Creating a networked multiplayer game isn't easy, but Unreal Engine's gameplay framework is designed to set you up for success. On this episode of Inside Unreal, Technical Writer Michael Prinke will cover fundamentals such as the server-client model, various features of replic...

โ–ถ Play video
tardy orchid
#

Hello everyone, I've just managed to make my game multiplayer and that's already a huuuge accomplishment for me as a 16yo and now I'm trying to fix some problems, like entering a vehicle. I tried everything and looked up on the internet but I just can't posses pawns in multiplayer.

#

the character just freezes ( instead of disappearing ) and the camera stays in place. Everything works fine in SP though

#

Can someone recommend a tutorial on possessing pawns in MP, cuz I couldn't find a single one

chrome bay
#

@stable kindle The game is actually running as a networked game right? I.e. you're not just playing as a single player in PIE?

#

But yeah it should be as easy as doing those two commands, and the .exe will open that file.

hollow ivy
#

Hello, everybody!
I have multiplayer, and I want 5 same map, but difference that people from world โ„–1 cannot meet a guy from another world. Should I use 5 different servers or what should I do?

#

Another words I don't want more than 50 guys at one world. If it exceeds the limit I'd like to create new world and push other guys there, but textures and buildings are the same. Looking forward for any piece of advice! ๐Ÿ˜ƒ

orchid harbor
#

@potent cradle I can help to understand with you. And i am not sure i not understand already.

tardy orchid
#

@hollow ivy I'm newbie to this stuff but I would probably do different servers and when you reach the max amount of players just automatically reconnect them to a different one

hollow ivy
#

How to?

#

Where can I get started?

orchid harbor
#

@hollow ivy you have post login info you can controll max player by that so will refused connection

hollow ivy
#

@tardy orchid thanks for answering

#

Is there a tutorial?

orchid harbor
#

@hollow ivy About multiplayer? lots of.

hollow ivy
#

For those who never write anything with server

#

@orchid harbor your favorite?

orchid harbor
#

@hollow ivy but its easy post login and you can posses controller by player. Controller is player is something very individual. Game mode is more as server. I find cool doc pdf what is very very good. But i have one big problem. I need to understand spectator actor in game mode. That is specific class. The controller not posses that actor on beginning. And i can not do instance on map. You can move to that actor by this code. in c++.
```c++
TestPC->PlayerState->bIsSpectator = false;
TestPC->Possess(OriginalPawn);
TestPC->ChangeState(NAME_Playing);
TestPC->ClientGotoState(NAME_Playing);

But do i miss something and that is can not be change in bp or editor.

I can work with posses and move to other pawn. But spectator actor not create instance on map. Its a frame. How to approach code with that element of frame.
hollow ivy
#

Any difference between multiplayer for PC and for Mobile?

#

If I have an endless map?

orchid harbor
#

@hollow ivy Yes big one

hollow ivy
#

@orchid harbor Could you clarify further?

orchid harbor
#

@hollow ivy You crate game on mobile to have money for game dev for pc. $$$

#

@hollow ivy I am not professional but yes that is ok. micro pay and other low quality.

#

@hollow ivy Server is one co you ask why to hire good coder or peoples. You need a custom server for micro pay

#

@hollow ivy And its no longer ue4. server staff

hollow ivy
#

I don't need a PC version

orchid harbor
#

@hollow ivy I am very poor knowledge or good .

#

@hollow ivy But the problem is the server provided by ue is more for fps game session. I do not know its good idea for micro game in mobile

#

@hollow ivy When you have session max something as 7 day game is ok

hollow ivy
#

I am working on a real Android project. The server must work for years, and need to deal with problem when amount of people exceeds 50.

#

For phones it would be complicated to hold 200 users and big map, so I am asking for any help. Maybe someone did multiplayer for mobiles? Should we divide the server to pieces, should we make a finit map?

tawdry pond
#

Hello, i am trying to just simulate the physics on the player that's dead but when i do it all of the player have there physics simulated how do i fix? (blueprints)

hollow ivy
tawdry pond
#

oh

#

ok

hollow ivy
#

What are my steps to create a multiplayer?

#

Should I care about the AmazonGameLift? Is there a template checklist?

thin stratus
#

AmazonGameLift is something for servers on demand. When you play a lot of games in a very short time and servers have to be spun up and down all the time.

#

UE4's network servers aren't made for more than ~100 players and that is also only reachable with the replication graph, like Fortnite uses.

#

Better code your own backend if it needs to hold for years

hollow ivy
#

What does that mean, "my own backend"?

#

Sorry I may sound stupid, but I am really Elementary in this

#

Therefore Fortnite uses the replication graph and can support more than 100 players in a map?

thin stratus
#

not more

#

100 is already pretty much it

#

I am working on a real Android project. The server must work for years, and need to deal with problem when amount of people exceeds 50.
If that is your scope and you don't know what 90% of this means I would suggest hiring someone who knows.

gleaming vector
#

while I agree that 100 is pretty much max players, I think you can safely get over 120 with repgraph

#

they are doing a lot of good optimizations in the networking area

#

and it sounds like they are working on a notification-based networking system rather than a 'scan all objects for changes' based networking system

#

which could bring about more

#

but generally, yes... if you are asking the question of how many players does UE4 support, odds are you don't know enough to get the engine to do more than 100 players

pulsar maple
#

I'm having an issue connecting to sessions using SteamOnlineSubsystem. I can find a ton of lobbies for other developers' games, I think, but none for mine. I'm getting a bunch of these kinds of errors:
[2020.02.29-22.43.37:379][278]LogOnlineSession: Warning: STEAM: Unknown or unsupported data type from Steam key data gamemode 1 [2020.02.29-22.43.37:379][278]LogOnlineSession: Warning: STEAM: Failed to parse setting from key gamemode value 1
Where the ending of lines ("gamemode", in this example) are replaced with information such as the name of the other developer's game. Some of the names I've seen are hoi4, eu4, and Stellaris, curiously, but most are jibberish. Connecting locally using NULL subsystem works great.

This was working for me a week ago -- I'd find my lobbies and no others. I haven't changed anything so I'm baffled as to what is wrong. Has anyone seen this before?

tame parcel
#

I have a dedicated Linux server and trying to get it to play at more than 30 tick, but nothing I do seems to do it; what am I missing to get it to that rate?

#

i'd like to do 60

rare gyro
#

My connection to a dedicated server is fairly laggy, and I get disconnected every so often. I'm thinking this is because of some dropped packets or maybe a network timeout. Is there a config value I could adjust?

winged badger
#

you can try console command log lognet veryverbose

#

and try figuring out whats going on

#

i have to warn you, it will be a shitton of logs

silent phoenix
#

If player is on dedicated server and exits back to the menu what should i be destroying?

Right now player character is destroyed and then login screen is loaded on client

#

will gc handle the rest or should i be deleting anything else specifically

tame parcel
#

Looks like just setting the NetServerMaxTickRate=60 in Project\Config\DefaultEngine.ini got pulled into the pak file when building the linux project, which is one i had not yet tried apparently

thorny saddle
#

hello guys i want test my game in dedicated server but i don't know how can do this :/
i want buy server for test any body any tips ??

silent phoenix
#

You can host it locally very easily to test

#

lots of good tutorials on ue4

#

youtube*

#

Can anyone recommend a method to keep a widget up in-between level loads? I'm keeping it up using a loop in game instance but this is sloppy and i don't like it

#

it also flashes briefly between the level loading and the looping adding the widget back into the viewport

twin juniper
#

anyone know how to replicate launch character? been working on a multiplayer grappling hook and it is such a pain

twin juniper
#

Mainly whatโ€™s happening is I got the cable to reach the wall but when I try to launch client to cable location it just glitches in place

thin stratus
#

Well server has authority. You will have to do that on the server

chilly mason
#

ha! wrote a simple nat punchthrough server which is nothing but I'm proud of it :P

chilly mason
#

vs remote compiling and debugging on linux is cool

chilly mason
#

trying to wrap my head around how to send & receive udp packets reliably for when there's a need (which is rare but still)

#

do I just simply use ids and put the reliable messages into a reliable queue until all their parts are received?

#

msg id + channel id

#

msg id for the constituent message chunks (up to 1200 bytes max b/c MTU I guess) and channel id to distinguish between reliable and default udp

#

(working with FSockets)

stable kindle
#

@stable kindle The game is actually running as a networked game right? I.e. you're not just playing as a single player in PIE?
@chrome bay yes it is ๐Ÿ˜„ actually been running two separate instances. But when I hit open file and select it nothing shows on the profile. I get a 300kb file from the server over several Seconds so I'm hoping it's writing something!

solar stirrup
#

Is it possible to force a net update on a component?