#multiplayer

1 messages ยท Page 323 of 1

hasty adder
#

Hmm what about messing with render mode types could it just somthing you see but not happening

#

Mathwise

#

That makes no sense maybe

thin stratus
#

It's really teh spring arm

wanton gorge
#

@hasty adder ๐Ÿ˜ฑ

hasty adder
#

Shamma :0

thin stratus
#

Doing this here stops the lag

#

That's basically the same end location that the scenecomp would have

#

As the Spring Arm is +80 on z and has 140 (minus here to invert it) on the length

hasty adder
#

Sonic client is updating it its warping it to match frames

#

So if

#

Shamma you might be able to help ๐Ÿ˜‰ tis why I summoned you beast

thin stratus
#

it seems to have more to do with non-multiplayer though

#

So I might just move it away from here

#

Yop it's the tick order LOL

#

PrimaryComponentTick.TickGroup = TG_PostPhysics;

#

The Character is set to tick PrePhysics

hasty adder
#

๐Ÿ‘Œ

thin stratus
#

Well now how to solve that

#

I can't set the Character to Tick after PostPhysics

#

That might cause trouble or?

#

(setting it to after postphysics stops the lag)

hasty adder
#

The effect looks like it should be faked might as well parent a owner only see model of the ball

thin stratus
#

Yeah only having the SkeletalMesh visible on the Character and hiding the ball was the idea if I can#t solve this

#

I mean I could also hard code it

#

and ignore the spring arm

hasty adder
#

This is one of those puzzles you just hafta solve eh? ๐Ÿ˜ƒ

chrome bay
#

@thin stratus you could add a tick dependency

#

Make whatever it is you're doing wait for character to tick before doing your thing

#

Sorry not paid much attention :p

thin stratus
#

So currently the order is: Character ticks PrePhysics -> SpringArm ticks PostPhysics

chrome bay
#

yeah

thin stratus
#

Having both at the same TickGroup is also not solving it, as SpringArm still ticks after the Character then

chrome bay
#

So you need spring arm to tick before character actually moves?

thin stratus
#

So how does a TickDependency work

chrome bay
#

I think it means you can stop an actor from having it's tick processed until another actors tick function has run

#

I think they have to bve in the same tick group

#

I've not used it before but in theory that's what It's for I think

thin stratus
#

I need the SpringArm to tick (update its location based on the ControllerRotation) before the Character ticks (setting an actor to the SpringArm end location)

chrome bay
#

Ah

#

Wellllll.... could you set the SpringArm rot from the Controller?

thin stratus
#

But if possible only these two parts

#

So just force it ?

#

Hm, might also work sigh

chrome bay
#

So as soon as ControlRotation is updated, set the rotation of the spring arm

#

since control rotation is updated from about a million diff places

#

Hey lucky for you SetControlRotation() is virtual :p

thin stratus
#

Yus, lemme see

#

Thanks for all the help so far, peeps

hasty adder
#

๐Ÿ‘พ

chrome bay
#

two days later, finally have portals working with prediction

#

/rip my wrists

hasty adder
#

Portals I love em and hate em.

chrome bay
#

They're fun, but for multiplayer they add a ridiculous layer of complexity. Doing it did expose a few holes in my movement component too

hasty adder
#

They're a cool mechanic but since portal was done it's like. There's no escaping the comparison

chrome bay
#

yeah haha

#

I'm doing Gideon-Style ones like Paragon, so no crazy rendering trouble or anything

#

But it's a really fast paced game so they need to be super responsive for the client

hasty adder
#

You know what's a cool multiplayer mechanic.. Off hand grappling hook

#

Loki's minions/alliance ctf was fun stuff

chrome bay
#

This is more what I've got going on

#

Now that it works, I can make it pretty

hasty adder
#

Hash caught myself spacing out at that like a screen saver

#

That many holes imagine trying to render the viewing angles

chrome bay
#

yeah... pass haha

daring arch
#

if I check an object's "Replicate" checkbox

#

will that replicate its position automatically?

#

is there any way to check the Replicate checkbox without replicating that object's position?

bleak cloud
#

I'm planning on integrating steam and using seamless travel. If that's the case, the player controller and state persist through travel, correct? Do game mode and state switch to the overridden settings for the map?

#

Currently I have separate game mode/state, player controller/state for menus and gameplay. I'm assuming I should use the same player controller/state across all states of the game?

hasty adder
#

Replicated check box for things most of the time only means it's replicated to the server

#

You still need to replicate from the server to clients

daring arch
#

Okay. If I check replicate box, will it automatically replicate that actor's position and rotation?

#

Because it seems like even if I dont check the Replicate Movement checkbox, its still replicating its position.

#

What gives?

hasty adder
#

So you are trying to make the server unaware of your location? Or other players?

#

And is this a character or just a prop of some kind?

daring arch
#

ok, better yet

#

is there a way to spawn an entity in the client and replicate it to the server?

#

I want the client to have authority over an entity.

#

How can I do that?

hasty adder
#

For multiplayer best it's always on server unless it's for cosmetic reasons. But if you call just a spawn actor of class from custom event that is not replicated it will be client side only. Any replication in that actor only server will know about

lean cedar
#

is there a way to use unreal networking without having to follow the authoritative server archtecture?

#

I'm developing a vr application with no need for anti-cheat. Having to follow this model is causing me a headache

brittle sinew
#

Without editing the engine, I don't believe there's an out-of-the-box way to do that. With editing it, you can do anything ๐Ÿ˜ƒ

#

I would support using a server-authoritative design just as good practice however, even if you're not super worried about cheating or anything, simply giving power to clients can be really dangerous in any situation

neon mango
#

So I'm working off the Shooter Game Project and I'm surprised to find out that cheat engine works to change the ammo, health and other replicated variables. What is the correct way to ensure cheat engine doesn't work? Server Validation? Just really surprised the game wasn't released with some good practices like that.

slim holly
#

it actually is

#

now, you can get around that by doing bad programming

lost inlet
#

using cheat engine to change a variable clientside doesn't mean it's changing on the server

#

and if it doesn't match the server's value, then nothing will happen server side

#

also in standalone mode, you'll still be able to cheat like that as there isn't a separation between client and server

neon mango
#

Any tips on network replication optimization, I'm spawning a cube every .1 second that is betting replicated and slowly shrinks out of existance, the cube isn't dramatically important. Should I lower the net update freq from 100 to 50?

jolly siren
#

what is the cube for? why are you replicating it?

twin juniper
#

So for some reason, when I unpossess a mount while in the air. I set the movement mode to "Falling" so it falls to the ground (all on serrver).... it falls to the ground but for some reason the colliders arent moving with it

#

so theres an invisible wall, the size of my mount in the air

#

and i cant re-mount it

#

because im on the ground

#

anyone have any fucking idea why this would be happening?

#

ive been struggling with this

#

for like 3 days now

neon mango
#

@jolly siren For a game mechanic

thin stratus
#

Is the cube only a visible thing

#

Or can the player interact with it to a degree that it needs to be replicated?

#

Otherwise I would say, only replicate the event of start and stop spawning them

#

And do the spawning on the client

twin juniper
#

What tools are there for optimizing networki code?

thin stratus
#

Networkprofiler

bright valley
#

Hello!
as far as I know, in UE4 the character stays in place and the level is moving, is it true?

lost inlet
#

excuse me?

bright valley
#

?

lost inlet
#

what you said makes little sense

bright valley
#

idk where I got this from but what I mean is that the character actually running in place and the map is moving, is it how movement works in UE4?

lost inlet
#

probably nowhere becuase that's not how it works

bright valley
#

ah ok probably misunderstood docs ๐Ÿ˜ง

full bane
#

it kinda works like that with world composition

#

but not for multiplayer

lost inlet
#

origin shifting isn't quite that

signal lance
#

@bright valley Not sure if you are asking this but if the player is on a moving platform it won't fall off, it will stay on it

twin juniper
#

Does anybody else have issues with their dedicated server not spawning the defaul pawn? Or is it just me? It works fine when I try 'Run Dedicated Server' from the editor but not from the actual dedicated server ๐Ÿ˜ฆ

slim holly
#

are you sure your gamemode is set properly?

#

including from package settings

dawn ember
#

How can I run a function on client only in blueprints?

slim holly
#

using event that runs on client only

#

or, design the execution so that it cannot run on server side

#

really depends how the information required is available

#

or, when it has to be available

twin juniper
#

I am sure. Also, I found out why it is not spawned...Fo some reason the DS can't find /Game/Blueprints/MyCharacter_Bp/

#

But in the same time, I know it is packaged because I tried it on a listen server and client only without any problems

#

And disabling "Use .pak" does not help

dense citrus
#

Short question about peer2peer , how many Players would be posible and stable?

#

for example , Server have 100mbit connection

#

!?

hasty adder
#

It's all dependent on your upload rate tbh you'll be sending the data out.

lost inlet
#

peer2peer

#

server

#

pick 1

#

and with anything, the bandwidth requirements are dependent on your game

brittle sinew
#

Well I think he's inferring the server in this case is a person, but 100 mbit as a typical home connection is dreaming hahaha

#

Unless it's really that different in Europe D:

#

Especially upload, I get something like 80 down / 5 up or something stupid like that, yay US

thin stratus
#

It's quite common to have at least 20MBit upload in Europe

#

I got 100MBit down and 40 up

#

Anything higher is company internet

celest mural
#

the sad thing is company internet in canada is generally slower

#

unless you want to for over major money for a dedicated connection.. sounds weird? yeah,... it is.. really weird

chrome bay
#

There's an art form to making games take up less bandwidth, I enjoy it ๐Ÿ˜„

wary cedar
#

Are all the PlayerStates exist on a client, or only the PlayerState of this client?

lost inlet
#

every client knows about each playerstate

#

always network relevant iirc

wary cedar
#

thanks @lost inlet

lost inlet
#

for "secrets" that only the local player should know then you could put that on the controller or COND_OwnerOnly on the pawn

wary cedar
#

๐Ÿ‘

#

How can I find the PlayerState that belongs to the player (on a client of course)?
Or how to recognize that a PS is the local player's PS?

lost inlet
#

pawns and controllers hold a pointer to their respective player states (called PlayerState)

#

the game state also holds an array of PlayerStates

#

PlayerArray for the latter

wary cedar
#

In my case, if I try to iterate PlayerControllers each one has a nullptr PlayerState.
GetWorld()->GetGameState()->PlayerArray.Num() returns 0 as well.

May be it's because I try to find it in BeginPlay of an actor and PlayerStates isn't ready at this moment.
I tried to iterate PlayerStates and somehow it worked, but now even it doesn't.

lost inlet
#

in a networked game, only the client knows about their own player controller

#

networking order is not always consistent either so your game state might not even be valid on the client in BeginPlay for a pawn created on the first server frame

#

what use case do you have for player state? might be a bit easier to understand your problem

wary cedar
#

PlayerState contains information about it's team index. I want to locally hide some StaticMeshes (which also have team index) based on this team index.
So at begin play of these actors I try to find local PlayerState and check if they need to be hidden.

lost inlet
#

you can use an rep notify on the player's team index

#

then if it changes, iterate all the actors you need to hide or show and change their visibility

wary cedar
#

Ok, I'll try it.
Thanks @lost inlet

lost inlet
#

bear in mind you'll need to handle it differently for ROLE_Authority if you plan on having singleplayer or listen servers

wary cedar
#

I'm planning to have only dedicated server

thin stratus
#

Is this some sort of competetive game?

lost inlet
#

you can also override actor relevancy

thin stratus
#

Because just hiding the mesh on the client, depending on what you are hiding, might not be the best solution

thin stratus
#

yus, that's what I was aiming for

#

Then the Server simply stops replicating them and cheaters, even if they make the mesh visible again, don't see any updates to it

#

That's useful if you have, for example, an enemy that can make himself invisible

wary cedar
#

It's just signs, so showing or hiding them affects only visual part. They have no collision or triggers or something that affects game balance.

#

BTW thanks for the info

twin juniper
#

Anyone know how to do network profiling on the server

#

ive only managed to get it to work on the client

thin stratus
#

Isn't it just letting the Server call the profiler console command?

#

That should give you the file to work with

twin juniper
#

@thin stratus I haven't tried this, but I can.

wintry crag
#

Hello everyone. I'm hoping I can get some help on an issue I'm having with my Players Animation BP. I have a variable called AimRotation that is ued to allow the back to bend so that the player can look around. It works great in single player, but in multiplayer the other users don't see the vertical movement, just the horizontal. It is like my AimRotation Rotator is always 0 for everyone except the player. I tried setting the AimRotation variable to replicated and that didn't change anything.

mighty schooner
#

@twin juniper You can run the server with commandline "networkprofiler=true"

slim holly
#

@wintry crag I assume you're using "UseControlRotationYaw" which is replicated, thus you see the horizontal movement. what you need to do is set the aim rotation on client, then send it to server aswell so it can replicate it to everyone with replication condition "Skip Owner"

#

Or use control rotation pitch and yaw to drive the animation

#

which could be slightly more complex to set up with pawn rotation and stuff

thin stratus
#

ControlRotation is still not valid on other clients

#

He has to simply replicate the pitch

slim holly
#

it isn't?

#

I was under the impression it's tied to controller itself, which is replicated

#

(I wouldn't know, I never use it)

#

oh right

#

I misunderstood, ofc its not valid

lost inlet
#

controllers are never replicated except to the owner

#

you can either make the capsule follow the control yaw or replicate the control yaw separately

#

i added some interpolation to the replicated control yaw too so it would be smooth

slim holly
#

ye I forgot they are only owner replicated

thin stratus
#

He's needing pitch

#

Not yaw

#

Server has the value of the controller. So creating a pitch float variable with skip owner and onrep and setting the rot in there should work

lost inlet
#

same thing applies

#

override FaceRotation and set a replicated rotation value there. we actually replicated an FRotator as we made it so that the capsule never rotates

#

you can use FMath::(R)InterpTo if you want to implement some kind of smoothing on the replicated rotation

#

which would update in Tick

twin juniper
#

@mighty schooner Thanks

dapper galleon
#

Does anyone has experience with the Facebook API? I'm unable to make a status update, receiving the error "An active access token must be used to query information about the current user". Is there any limitations?

#

I'm trying to follow the Graph API by making http requests

wintry crag
#

Thanks. I'll give that a try in a little bit.

thin stratus
#

@dapper galleon Well I assume you are authenticated?

dapper galleon
#

Yes, I did the login the same way it is implemented in the original Facebook OSS

thin stratus
#

The error seems to state that it wants you to pass a token, which you usually get when login in

dapper galleon
#

It replies with my user token

#

I then use this token in the status update

thin stratus
#

Sure you formatted that correctly?

#

I haven't done fb stuff yet but can't be much diff from other apis

dapper galleon
#

It's possible I might have done some mess with it, but the same URL worked in the the Graph API Explorer

thin stratus
#

Does the response give you any other info?

dapper galleon
#

then I replace fields with the feed fields and token with my user token

thin stratus
#

Hm is there another request you could do that is as simple?

#

Usually the token shouldn't be outdated suddenly

dapper galleon
#

Yes, could try doing something else

thin stratus
#

See if it still response the outdated token. :/

dapper galleon
#

My full mesage at the log is like this:
Query feeds request complete. url=https://graph.facebook.com/me/feed?message=Teste&access_token={my user token} code=400 response={"error":{"message":"An active access token must be used to query information about the current user.","type":"OAuthException","code":2500,"fbtrace_id":"Gn0LMHOIW6I"}}

#

this formatting is killing me, how do I post code here? ๐Ÿ˜›

#

But yes, I'll try doing another type of request and see what it gives me

lost inlet
#

backticks

thin stratus
#

`

#

In front and behind for one liner

#

3 of them for a block

dapper galleon
#

Okay, thanks ๐Ÿ˜‰ will be back

lost inlet
#

discord not copied the text snippet feature from slack yet

#

once they do that'll be better for longer stuff

dapper galleon
#

yeah, that's a cool Slack feature

thin stratus
#

Yop, but

'''cpp

'''

#

Works quite well for now

#

With ` instead of '

#

No idea how to escape characters here

umbral terrace
#

How do i delete an actor on pickup

dapper galleon
#

took away the &

thin stratus
#

Awesome. It's often that the format is wrong when you get an error that you think can't happen

dapper galleon
#

Nice. Thanks ๐Ÿ˜

umbral terrace
#

Does anyone know how to make an destory an actor when i pick it up

twin juniper
#

@umbral terrace Call Destroy() on that actor

#

MyActor->Destroy();

hasty adder
#

Make sure your destroy function is last logic. And if it's a function on overlap might want to call a do once first to make sure it doesn't give you multiple of the same item each tick before destroying itself

#

You'd want to for multiplayer have the actor destroy itself it it's a oickup

#

There is a pickup example in the project I posted earlier in blueprints

raven holly
#

Can you execute commands on a server? E.g memprofile

wintry crag
#

@thin stratus You said "Server has the value of the controller. So creating a pitch float variable with skip owner and onrep and setting the rot in there should work" earlier. Where do I set the pitch? Currently I am doing this in my Animation Blueprint.

hasty adder
#

You want a pitch float on the actor which is set to your camera rot for pitch

#

And in blends pitch use the 90/-90

#

And in anim bluprint get this replicated value

#

And set pitch value in animblue print to that get value

#

And watch the magic happen

#

I set pitch on a run on server call after my mouse input but only if the axis values!= 0

#

This an aim offset right?

wintry crag
#

It's an Aim rotation.

#

I have it basically working.

#

Just one little bug though.

#

So basically I have an update pitch function that runs on tick.

#

I get the pitch from the Control Rotation.

#

My Pitch variable is set to replicated and skip owner.

#

Then in my AnimBP I have a sequence path off of EventBlueprintUpdateAnimation.

hasty adder
#

Must be some one of ik system or standard aim offset additives?

wintry crag
hasty adder
#

Ah I see

wintry crag
#

My solution works except there is this jitter. Like the rotation is being set back to 0 momentarily.

#

Can you see anywhere I'm making a mistake?

hasty adder
#

Well I wonder why it's snap to zero. Is there any particular points it does this or spastically?

#

If you can take a gif/vid I'd like to see what's happening

#

If the offset is to match the camera why not use the cameras world rotation pitch to just be a set as it'd be zero facing forward and 90 or -90 when going up and down

wintry crag
hasty adder
#

Ah insee

#

Again I think you'd be better of getting the world rotation from camera breaking the rot to get the pitch and set a value pitch value, replicated. And retrieve it in anim blue print.

#

I setup a aim offset in a project I posted to forums today

wintry crag
#

OK, I can give that a try.

hasty adder
#

The bonus is you stop using tick to set stuff and use the mouse events so if axis is not zero

#

It calls a custom event to get and set the value

wintry crag
#

Can I get a link to that?

hasty adder
#

Sec

#

Latest comment

#

4.15 FYI

wintry crag
#

Perfect!

#

Thank you.

#

I have some meetings right now, so I'll give it a shot later this evening.

hasty adder
#

Coolness hope it helps ๐Ÿ˜ƒ

paper furnace
#

I cannot successfully get multiplayer working with Oculus. I am using mostly blueprint, except for setting the player's unique net ID, which is done through C++. After successfully joining the session with the Join Session node, the connection to the host is immediately lost. Here is the output log:

PacketHandlerLog: Loaded PacketHandler component: Engine.EngineHandlerComponentFactory (StatelessConnectHandlerComponent)
LogNet: Game client on port 7777, rate 10000
LogNet: UPendingNetGame::InitNetDriver: Sending hello. [UNetConnection] RemoteAddr: 0.0.0.0:7777, Name: IpConnection_0, Driver: PendingNetDriver IpNetDriver_0, IsServer: NO, PC: NULL, Owner: NULL
LogNet: Host name resolution failed with 48
LogNet:Warning: Network Failure: PendingNetDriver[PendingConnectionFailure]: Your connection to the host has been lost.
LogNet: NetworkFailure: PendingConnectionFailure, Error: 'Your connection to the host has been lost.'
LogBlueprintUserMessages: [FPGameInstance_C_3] Pending Connection Failure
LogNet: DestroyNamedNetDriver IpNetDriver_0 [PendingNetDriver]
LogExit: PendingNetDriver IpNetDriver_0 shut down

I've been racking my brain trying to figure out why this happens, to no avail. I even created a brand new first person project and tried again, but it still happens. There's barely any information about this error online, except that others have also gotten the error. Please help!

thin stratus
#

Do you also get this in a new project that doesn't use oculus?

twin juniper
#

@thin stratus this problem...

#

been here since forever lmao

#

network profiler just breaks lul

twin juniper
#

hi, has anyone created a dedicated server with steam,

#

?

#

@twin juniper yep

#

@thin stratus Evidently, if you set your GetMaxSpeed() to 10,000

#

u just get this Hit limit of 96 saved moves

#

LOL

#

after like 30 seconds or so

#

if ur using it

#

Idk it seems so random

jolly siren
#

that is really fast

#

you sure you set it on both server and client?

twin juniper
#

@jolly siren Well it anywhere from 30 seconds, to like 5 minutes

#

It's very inconsistent

#

Its strange because I only have a few reliable RPCs

#

most of my RPCs are unreliable

#

Now its literally just spamming this shit: LogNetPlayerMovement:Warning: CreateSavedMove: Hit limit of 96 saved moves (timing out or very bad ping?)

#

lol

jolly siren
#

are you doing a multicast from playercontroller?

#

how are you changing the speed to 10k?

twin juniper
#

@jolly siren I turned that off and its still the same lol

#

its difficult because i cant debug this the normal ways

#

Logs only give that one "Hit limt of * number of moves"

#

and the net profiler looks fine to me

jolly siren
#

and my first question?

twin juniper
#

Uhm

#

lemme check

#

I have one multicast in my player controller

#
        void Multicast_UseDoor(AStructure* TheDoor, bool bOpen);```
#

but its for opening/closing doors lol

#

this is happening even when im not opening doors

#

lol

jolly siren
#

ok

#

well regardless multicast in pc makes zero sense

#

playercontroller's only exist on owning client and server

#

that should be a client rpc

twin juniper
#

Is this still relavant

#

lol

#

I looked at the last update of that wiki page

#

it was 2016

jolly siren
#

what about it?

#

you created your own custom character movement for this?

twin juniper
#

No

#

im using the default

#

but like

#

im wondering if i need to setup manual replication

#

i dont think i should have to

#

but like idk

jolly siren
#

no lol

twin juniper
#

hm

#

@jolly siren is there any other ways to debug this?

#

u know what

#

i think i may have just found it

#

lul

#

probably not tho

#

@jolly siren Could it have been because I was setting a replicated variable in my tick function? The thing is though... it has an if statement which was checking the char movement component to see if its falling

#

so it should only be setting it if u are falling

#

soo...

#

idk

jolly siren
#

there is already a function for that

twin juniper
#

because it seems like

#

when i removed that

#

it may have fixed it?

#

oh shit

#

thats useful

#

LOL

jolly siren
#

yeah

#

there is one for landing too

twin juniper
#

Landed?

jolly siren
#

yep

twin juniper
#

that may very well have been it

#

becuase like

#

setting a variable every tick

#

idk

#

then again

#

i had the if statement

#

so it shouldnt be setting it every frame

jolly siren
#

it would every frame you were falling. which can be when you spawn and fall to the ground and then any other times you jump or fall

twin juniper
#

yeah

#

so like

#

if i ever fall

#

could it be like

#

trying to catch up or something?

#

from like

#

200 frames

#

of setting a variable?

#

lol

#

idk i dont think that would cause that much of a rubberband effect tho

heady merlin
#

sooooooo....adaptive net update frequency in now enabled by default in 4.16....but it breaks bReplicateMovement and slows down UProperty replication. I checked in code and the only area canceling it early it is in character movement when movement needs to be immediate. However CancelAdaptiveReplication is listed as a temporary effect....

Do we really have to CancelAdaptiveReplication on the owning actor whenever an important time sensitive UProperty changes in a subcomponent now? Because for one, there is no access to that in Blueprint for users, and for two, even in c++ it is unwieldy.

#

Feels like it was pushed live a bit too early to me, but I may be missing something

twin juniper
#

Lol.

#

If that is true.

#

Then that's really lame.

heady merlin
#

I mean..ForceNetUpdate should also work...but still

twin juniper
#

What's not working for you?

heady merlin
#

there are new significant delays with it on with uproperty replication, understandable and I can force net updates on change if I need to. The main issue is that bReplicateMovement falls out of relevancy DURING movement and gets constant hitches.

#

a system that I don't touch and shouldn't have to

jolly siren
#

All I've heard is bad things about 4.16 and replication

#

heard it from Allar and someone else too

twin juniper
#

heh

#

big shame

#

one step forward, 1 step back

#

because like

#

they did fix a few things

heady merlin
#

Pretty sure this is the reason why

#

turn off adaptive and everything is golden again

#

I assume that it just didn't get much widespread use before

twin juniper
#

how did u turn it off?

#

where is it at?

heady merlin
#

Net.UseAdaptiveNetUpdateFrequency

twin juniper
#

What did that fix for you? The replicated movement hitching during movement?

heady merlin
#

and uproperty delays

#

i understand why its doing what its doing, but there isn't an "opt out" setting

#

every time there isn't something to replicate it sets the next replication time to 70% of how long it took to replicate

#

so if something suddenly changes after a long period of no replication you get a LONG delay before the next update it used unless you set MinNetUpdateFrequency to something fast

twin juniper
#

Idk my variables are replicating properly

#

and im using 4.16

heady merlin
#

meh, guess its down to setting MinUpdateFrequency on everything

pallid mesa
#

Here. @twin juniper

#

apparently the networking bug is caused because of the thirdpersonchar placed on the level, if you remove It and use playerstart, problem goes away.

#

Still i do think that is not an intentional behaviour

twin juniper
#

What?

#

lol

#

thats not my problem

twin juniper
#

Its interesting tho

#

im getting this same Hit limit of __ savedmoves warning

#

when i call

#

SetActorLocation()

#

as well

#

...???

#

wtf

thin stratus
#

Yo uare getting Reliable errors?

#

Like too many?

#

How often are you calling the reliable rpc?

twin juniper
#

honestly i dont even know what it could be

#

because all of the RPCs on my character class, that are reliable, i feel should be reliable

#
        void DB_Delete_All_Items_From_Table();```
#

delete items from database on death...

#

i think thats pretty important

#
        void Server_DealDamage(int healthAmount);```
#

i have a total of 3 reliable RPCs

#

on my Cahracter class

#

lol

#

idk how that could be too much O_o

#

@thin stratus Could it not be a RPC? Could it be something on a separate class? Could a replicated variable be doing this?

#

Also, I'm not getting any errors about "Reliability"

#

The only error I'm getting is: "Hit limit of 96 saved moves (timing out or very bad ping?)"

thin stratus
#

Have you looked into the source

#

Where and why it's calling?

#

That's warning and not an error

#

And it comes from your CharacterMovementComponent

#
FSavedMovePtr FNetworkPredictionData_Client_Character::CreateSavedMove()
{
    if (SavedMoves.Num() >= MaxSavedMoveCount)
    {
        UE_LOG(LogNetPlayerMovement, Warning, TEXT("CreateSavedMove: Hit limit of %d saved moves (timing out or very bad ping?)"), SavedMoves.Num());
        // Free all saved moves
        for (int32 i=0; i < SavedMoves.Num(); i++)
        {
            FreeMove(SavedMoves[i]);
        }
        SavedMoves.Reset();
    }

    if (FreeMoves.Num() == 0)
    {
        // No free moves, allocate a new one.
        FSavedMovePtr NewMove = AllocateNewMove();
        checkSlow(NewMove.IsValid());
        NewMove->Clear();
        return NewMove;
    }
    else
    {
        // Pull from the free pool
        const bool bAllowShrinking = false;
        FSavedMovePtr FirstFree = FreeMoves.Pop(bAllowShrinking);
        FirstFree->Clear();
        return FirstFree;
    }
}
twin juniper
#

yeah

#

I looked right at that

#

It looks like the engine automatically caches (sort of) your last "moves"

#

then if it goes above it

#

it will just clear them

#

i dont know why its overflowing though

#

because thats obviously whats happening... its overflowing

#

it doesnt actually "suicide" until like 1 min later

#

lol

thin stratus
#

Well new SavedMoves are added here:

// Add NewMove to the list
if (CharacterOwner->bReplicateMovement)
{
    ClientData->SavedMoves.Push(NewMove);
        [...]
}
#

That's inside:

void UCharacterMovementComponent::ReplicateMoveToServer(float DeltaTime, const FVector& NewAcceleration)

#

So I assume your SavedMoves aren't used

twin juniper
#

Yeah, but it only seems to happen

#

(currently, ive yet to determine a consistent reproduction of the issue lol), only when i call SetActorLocation()

#

I use SetActorLocation() when the player dies

#

to set them at a spawn point

#

is this not the right way to be doing it? lol

#

Like if you fall off a cliff, you should instantly die

#

you shouldnt be alive for 1 minute after dying

#

lmao

thin stratus
#

I still assume that you do something too often or so

twin juniper
#

yeah, is there a way I can find out what it is?

thin stratus
#

Maybe in a blueprint?

twin juniper
#

net.RPC.Debug

#

is supposed to print out the RPCs

#

net.RPC.Debug 1

#

When i set it to net.RPC.Debug 1

#

its printing out... only two RPCs

#

ServerMove() and ServerUpdateCamera()

#

i didnt make those...

#

lol

#

its just spamming it at me tho

#
LogNetTraffic:Warning:       Sent RPC: VeritexPlayerController_BP_C_0::ServerUpdateCamera [15.1 bytes]
LogNetTraffic:Warning:       Sent RPC: VeritexCharacter_BP_C_0::ClientAckGoodMove [9.0 bytes]
LogNetTraffic:Warning:       Sent RPC: VeritexCharacter_BP_C_0::ServerMove [29.1 bytes]
LogNetTraffic:Warning:       Sent RPC: VeritexPlayerController_BP_C_0::ServerUpdateCamera [15.1 bytes]
LogNetTraffic:Warning:       Sent RPC: VeritexCharacter_BP_C_0::ClientAckGoodMove [9.0 bytes]
LogNetTraffic:Warning:       Sent RPC: VeritexCharacter_BP_C_0::ServerMove [29.1 bytes]
LogNetTraffic:Warning:       Sent RPC: VeritexPlayerController_BP_C_0::ServerUpdateCamera [15.1 bytes]
LogNetTraffic:Warning:       Sent RPC: VeritexCharacter_BP_C_0::ClientAckGoodMove [9.0 bytes]
LogNetTraffic:Warning:       Sent RPC: VeritexCharacter_BP_C_0::ServerMove [29.1 bytes]```
#

millions of these

#

lol

thin stratus
#

Well that is def related

twin juniper
#

but like

#

why would it be that tho

#

I didnt even make that lol

#

im pretty sure thats inside of ACharacter and UCharacterMovementComponent

thin stratus
#

SavedMoves are only removed if a move got acknowledged

#

what ever that menas

#

I guess it means that it was used

#

And for what ever reason it doesn't use the savemoves

#

as if something blocks it from doing that

#

And you say it only happens if you call SetActorLocation for respawning?

twin juniper
#

yeah

#

like its really strange

#

i can place a structure

#

craft items

#

attak buildings

thin stratus
#

And it's a normal Character, nothing AI related or so?

twin juniper
#

all works fine

#

main character

thin stratus
#

Are you using the Teleport Version of it?

twin juniper
#

what do you mean?

#

teleport of what?

#

of SetActorLocation()?

thin stratus
#

The BP version of SetActorLocation has a teleport boolean

twin juniper
#

oh yeah

#

i might be...

#

lemme see

thin stratus
#

Otherwise it really moves the actor

twin juniper
#

yeah

#

using physics right?

thin stratus
#

Yeah

#

It's a splitsecond but it does move it

twin juniper
#

i should be using it?

thin stratus
#

That might explain (if the distance is huge) why so many updates are coming in

twin juniper
#

or i shouldnt be?

#

i think i should

#

lol

thin stratus
#

Well I guess you want to teleport

twin juniper
#

yeah

#

im gonna just try

#

and set it to teleport

#

@thin stratus yeah so, it spawns my bag of items on death

#

but doesnt move the player

#

lol

#

its literally... only movement

#

that messes up

#
        AActor* SpawnLocation = SpawnLocations[FMath::RandRange(0, SpawnLocations.Num() - 1)];

        if (Char->IsLoggedIn)
        {

            Char->SetActorLocation(SpawnLocation->GetActorLocation());
            Char->Health = 100;
            Char->Water = 100;
            Char->Food = 100;
        }```
#

thats all im doing

#

lol

#

Could it be the UGameplaystatics?

#

ima try messing with that

#

yeah nothing

thin stratus
#

No that's not it

#

So you tried using Teleport instead of setactorlocation?

#

Either this

/**
      * Used for adding actors to levels or teleporting them to a new location.
      * The result of this function is independent of the actor's current location and rotation.
      * If the actor doesn't fit exactly at the location specified, tries to slightly move it out of walls and such if bNoCheck is false.
      *
      * @param DestLocation The target destination point
      * @param DestRotation The target rotation at the destination
      * @param bIsATest is true if this is a test movement, which shouldn't cause any notifications (used by AI pathfinding, for example)
      * @param bNoCheck is true if we should skip checking for encroachment in the world or other actors
      * @return true if the actor has been successfully moved, or false if it couldn't fit.
      */
    virtual bool TeleportTo( const FVector& DestLocation, const FRotator& DestRotation, bool bIsATest=false, bool bNoCheck=false );
#

Or by using SetActorLocation's Teleport

/** 
     * Move the actor instantly to the specified location. 
     * 
     * @param NewLocation    The new location to teleport the Actor to.
     * @param bSweep        Whether we sweep to the destination location, triggering overlaps along the way and stopping short of the target if blocked by something.
     *                        Only the root component is swept and checked for blocking collision, child components move without sweeping. If collision is off, this has no effect.
     * @param Teleport        How we teleport the physics state (if physics collision is enabled for this object).
     *                        If equal to ETeleportType::TeleportPhysics, physics velocity for this object is unchanged (so ragdoll parts are not affected by change in location).
     *                        If equal to ETeleportType::None, physics velocity is updated based on the change in position (affecting ragdoll parts).
     *                        If CCD is on and not teleporting, this will affect objects along the entire swept volume.
     * @param OutSweepHitResult The hit result from the move if swept.
     * @return    Whether the location was successfully set if not swept, or whether movement occurred if swept.
     */
    bool SetActorLocation(const FVector& NewLocation, bool bSweep=false, FHitResult* OutSweepHitResult=nullptr, ETeleportType Teleport = ETeleportType::None);
paper furnace
#

Have any of you gotten a multiplayer project to work with Oculus using Unreal?

twin juniper
#

@thin stratus Isn't TeleportTo() the same as SetActorLocation() If you have "Teleport" checked on SetActorLocation()

#

@paper furnace Yes but it doesn't work well if you don't modify a couple of things

#

I would look into VRExpansionPlugin, it solves many headaches

#

And the developer is active and supports the plugin 110%

paper furnace
#

I'll check it out...thanks!

twin juniper
#

@thin stratus It's weird, if I think i figured it out

thin stratus
#

@twin juniper It might be the same

#

I only checked the header file

#

Feel free to check the definition

paper furnace
#

@twin juniper I don't think that plugin offers any multiplayer functionality unfortunately

twin juniper
#

That is exactly what it does

#

It gives you proper replicated motioncontrollers and HMD

#

Which UE4 out of the box doesn't do well

paper furnace
#

gotcha! I see that now

twin juniper
#

To host/join sessions etc has nothing to do with VR, just the design around it

paper furnace
#

@twin juniper I see, but Oculus has it's own nodes for creating and finding matchmaking games, but none for joining them. If I use the built in Join Session node, I need to add a unique net ID based on their Oculus ID to each player controller through C++, which I've done. However, after joining the session, connection to the host is lost immediately after, every time

dusty sleet
#

@paper furnace Are you trying to use the Oculus multiplayer system? (does it even work yet? havent tried) or are you just trying to use Ue4's default online subsystem.. or steam?

paper furnace
#

@dusty sleet I'm trying to use the Oculus Online Subsystem, but I'm forced to use the ue4 subsystem for the Join Session node

dusty sleet
#

ah.. ok. i havent tried anythign witht he oculus system.

wary willow
#

@twin juniper Probably unrelated, but I had an issue with TPing my pawns last week or so.

#

I had to put the TP event inside the Pawns themselves and just called it

twin juniper
#

hello, please has anyone created a dedicated server with steam?

lean river
#

Hey everyone..
If server running as dedicated server, ue4 can start session only with same map or can start with different map?

thin stratus
#

@lean river what exactly do you mean?

lean river
#

I mean dedicated server can start multiple sessions where players can connect and play as i read in the doc

thin stratus
#

One Dedicated = One Session = One Map

#

You can switch the level but there can only be one level (World) at a time afaik

lean river
#

Ahh.. i thought dedi can start multiple session instances with same map :)
Then thx thats answered all of my question

fossil spoke
#

@lean river I think you might be thinking of an single Dedicated Server Box (the physical hardware) can emulate multiple instances of an UE4 Server that maybe running different maps.

lean river
#

Something like that, missunderstod session concept :)
Then if im right for multiple instances on same server (physically) must be differrent ue4 dedicated server process on different port...
And if i want some kind of dynamic instance start/stop i need implement backend/master server solution :)

worn nymph
#

Yep it all depends on your game as well

#

How many instances per dedicated server

thin stratus
#

@lean river Ah yeah, physical pc can have more than 1

hasty adder
#

So mixed info about the internets on this. Dedicated server and messages such as no session to leave etc.. Wondering if by ip you can find the session of a dedicated server to actually join it. Not that I need the functionality curious if this is just a biproduct of dedicated over Internet

#

Mostly only curious because say I am using a list of widgets that console open ip there no connection failure check it just sits there. Unless t can connect

#

I figure a 20 second self made "error" ... Delay that long and assume if the connection isn't working it's safe to have a delay say connection failed.. Since connection would mean the widgets are unloaded so he delay would never complete

thin stratus
#

There are events for Travel/Network errors

hasty adder
#

Hm haven't seen any pop from my console open event through bp.. I'll take a look at my handlers I guess

thin stratus
#

They are located in the GameInstance

#

Network Failure

#

Travel Failure

jolly siren
#

anyone know how to check if on a listen server but not a dedicated?

twin juniper
jolly siren
#

thanks yeah that should work

rain rampart
#

*The destroy actor is unplugged for testing purposes

wary willow
#

@rain rampart Assuming you want the server to show the "slide' as well?

rain rampart
#

i want the body to stay in the same place

#

fixed

compact gulch
#

in a multiplayer game.... how would one prevent player from being kicked out at the end of the game when host quits

#

e.g post-match screen shows after game.... host quit.. the whole world close

#

is there a way to 'detach' players and the end of the game

versed socket
#

If it's a listen server, then the host controls everything and so when they leave it's kaput. No way around that.

#

A dedicated server is what you're looking for, I think.

severe widget
#

You can probably have your post match screen persist....

#

But yeah, I don't think you'll quite get the entire world to persist, but you can definitely go down into the UE4 source if you want to try making the entire world tear off on disconnect

#

Former option requires your end match screen to not be reliant on the map (or have a suitable fallback)

#

And then, you can store the stats of the last match and throw up a flag (bitmask flag) or something to have the widget re-added

#

If you're familiar with them, the wargaming games do something like that

#

In lieu of a post screen

compact gulch
#

hmmm

#

the fallback idea is to do it OUT of the currenct world

#

but i'dl ike to the option for payer to continue to view the world

#

currently the world freezes with a fly cam

#

@versed socket dedicated server needs to restart after some time , so that may not help

#

in UE4 there's a term called 'Tear Off' that works for Actor to indicate it no longer wants to be replicated. i'm wondering if an entire world can do that

#

@severe widget we currenlty have a way to view the post match from main menu as well. it's a copy of the entire strucutre. but getting player booted out halfway is annoying

severe widget
#

Yeah, I dunno if you can do that with the entire UWorld....

#

And you'd also end up with each player in a separate instance, too.

#

Else you need some logic to transfer hosts

#

Might be best to save data out and re-load

#

But it isn't going to be unnoticed

hushed garnet
#

total n00b question, but how can i password a dedicated server? seems to be a lack of info via google......do i need to put my own solution in?

past totem
#

Anyone knows why a Procedural Mesh Component thats on replicate will disconnect the clients when they enter the server?

thin stratus
#

Anything in the log?

#

LogVerbose maybe?

thin stratus
#

@hushed garnet Actually, I don't know. Are you able to use C++?

#

In general, you might need to set it up on your own.
I think Steam has a keyword for the session so the password protection is visible in the browser too

hushed garnet
#

arhhg its ok, ill just do my own solution...thanks @thin stratus

thin stratus
#

Question is still if you can use C++

#

Then you could easily use "ClientTravel" (PlayerController) and do "?password=123abc" for the options

#

And in the GameMode override "PreLogin"

#

There you can get the options that the client passes via the ClientTravel and check if the password is okay

#

If not, you simply set the "ErrorMessage" parameter of the PreLogin function which will automaticall kick the client

#

Or "reject"

snow tendon
#

Hey guys, I'm having problems with connecting my Perforce client to my Digital Ocean Ubuntu Server

#

I keep getting this error: Connect to server failed; check $P4PORT.
TCP connect to ** failed. connect: ** WSAECONNREFUSED
This is the full error, where the * refer to the IP

#

I have run commands to allow port 1666 on the Ubuntu Droplet, but it's still not working.

#

I followed Allar's tutorial here, and I'm stuck at the 6:30 mark : https://allarsblog.com/2014/09/24/setup-perforce-digital/

#

I've run commands like these on the Ubuntu interface: sudo ufw allow from *** to any port 1666
sudo ufw allow 1666

#

Where *** is my IP address

#

I need help with this please. How do I get my P4V to connect to the Ubuntu IP address?

lost inlet
#

"the Ubuntu IP address"? ๐Ÿค”

#

also the DO panel will have the IP address to your droplet in it

snow tendon
#

Yes, I input the DO's IP address in the Open Connectino box of p4v

#

But whenever I try to connect by clicking on New (User), I get that error message

lost inlet
#

which means either the service isn't running or the firewall (iptables) is blocking it

#

DO doesn't do NAT iirc

snow tendon
#

How do I fix that?

#

It did connect once, about 5 minutes ago (since last night), but it still refused the connection when I tried to configure the new user

lost inlet
#

well the guide tells you how to run it as a service

#

if you run "p4d" from SSH, it'll only be running for that SSH session

#

that's why you set it up as a service

snow tendon
#

Which guide? The Allar's guide?

lost inlet
#

yes

snow tendon
#

Yeah, I followed the guide and got stuck at the p4v connection part. That's why I'm confused

#

Also, where should this post be instead?

#

I just assumed it should be here since its about networking

lost inlet
#

not really? it's basic unix administration

#

general channel would probably be a better fit

snow tendon
#

Alright thanks

versed socket
#

Cedric is my UE4 role model

fresh ginkgo
#

I followed ALAN UE4's tutorial for setting up a LAN system for a game I am making. However, having more than one player is consistently failing to work right. It works for one player though...

#

Can you guys help me get this working?

#

Just for reference, the players are loading, and they are able to fly armound. However, the host cannot see the other player.

thin stratus
#

Do the clients see each other?

#

I don't think so, or?

#

Is the FlyingPawn actually replicated?

#

Why is the RespawnEvent a ServerRPC

fresh ginkgo
#

The pawns can see each other, but after 10 seconds or so, they suddenly cannot see each other. In addition, the scripts for handling damage work on the host, but not the client.

thin stratus
#

Is that from the UE4 Youtube Tutorial about Lobbies and stuff?

fresh ginkgo
thin stratus
#

Uff

#

I hope he's not telling nonsense

#

The GameMode needs no ServerRPC

#

that's already calling for trouble

#

(in the sense of that he might not 100% know what he does)

#

have you read my compendium already?

fresh ginkgo
#

I don't believe I have.

thin stratus
#

Read that first. Then you might understand quite a lot more about networking/rpcs/replication

#

For your problem, it's hard to tell what causes this, as I don't know all parts of your code :x

fresh ginkgo
#

Let me present all of the BPs that handle damage. For context, the plane emits a trail that kills anything that touches it, like in Tron. Touching the terrain also kills the plane. In order for an accurate hit to be registered, 3 Linetraces are called; one on each edge and one in the middle. Bear with me as it is a bit of a mess...

#

This last snippet is repeated 3 times for each line.

#

Update: I tried starting play with one player as aclient (Dedicated Server was checked). WHat I found was that the client was completely unresponsive to the damage. My Line trace was getting triggered however.

formal meadow
#

has anyone tried replicating ragdolls ? or though about it ?

hasty adder
#

Not sure it'd be worth the trouble

formal meadow
#

hm that's not the thinking of champions!

#

๐Ÿ˜ฆ

#

rust replicates ragolls to a good enough degree

#

so you can harvest and loot corpses properly

#

i was thinking of just starting with simulating the ragdoll on the client

#

and replicating the pelvis

#

so pelvis would be kinematic during ragdoll on other clients

hasty adder
#

My thought is if it bugged out like bodies in oblivion and has to replicate it vibrating all over lol

formal meadow
#

but other bodies would be simulated

#

yeah.. i don't even want to think about that for now

#

so one issue with doing ragdol sim on client is if he disconnects

#

but i dont want to be doing it on server so 20+ people jump off cliff at same time to lag out the server

#

maybe the new immediate mode physics, but i have also vehicles i want ragdolls to react

twin juniper
#

@brittle sinew Curious, should be obvious... Can I make changes to a material, and then have that replicate to all clients if I do it as a multicast?

#

I'm assuming yes.

#

Makes sense imo.

#

Like, I'm thinking about incorporating a wind system.

lost inlet
#

it'll broadcast to clients that the actor is network relevant to

#

which technically isn't all clients unless your actor is set to always relevant

slim holly
#

for material changes I would use OnRep tho

#

much better for that, unless it's absolutely important to have exact timing

thin stratus
#
  • Players that connect/reconnect, won't see the change if a multicast is used
modern dome
#

Is "Spawn Actor" always replicated?

#

Or do I have to use an owned Actor for this?

wary willow
#

this bug op

#

SpawnActor does not automatically replicate those actors

#

@modern dome

modern dome
#

I see. Thanks

thin stratus
#

Well the spawning of an Actor is replicated if the Actor is replicated and the spawn happens on the server @Raildex#6923
Or what exactly was the question ?

rain rampart
#

I'm wondering how I can make a multiplayer respawn system

indigo bronze
#

Hi guys, I need some help with a replicated variable who doesn't want to be replicated ๐Ÿ˜–
I have a boolean, "ReplicatedUse", that I set at true at a certain moment on the server.
ReplicatedUse is replicated. But it doesn't want to be true on client while it become true on server.
I'll drop some screenshot, it will be better than my english :p

#

For the server replicatedUse is set at true, but for the client it stay at false

#

Thank you in advance whoever will come to help me ๐Ÿ˜ƒ

main sentinel
#

Hey guys, quick question:

I'm using Steam subsystem. If I create a session, should I be able to find this session when using find sessions node, in the same game instance? This is just for debugging purposes

modern dome
#

Is this legit or is there another way to retrieve all Controllers? (Executed on Server)

modern dome
#

How can I test both Players on one Machine?
Only one player is controllable (I have only one Keyboard tho)

versed socket
#

@modern dome one of the ways somebody recommended to me a long time ago is go to into the GameMode and then do the OnPostLogin event. It gives you the controller of the new player connecting. So you use that to make an array out of all the players in the server/game, removing them OnDisconnect or whatever.

modern dome
#

I see, thank you for the tip

#

What about Local Controllers tho? Are they recognized?

versed socket
#

Not sure

modern dome
#

Does UE even allow a mixture of Local and Online?

lost inlet
#

you can have online splitscreen

versed socket
#

Well I'd imagine so because that's how Rocket League works

lost inlet
#

if you have 2 gamepads connected they can both individually control each split screen split

modern dome
#

Not sure if that's what I want.
More like Player 1 and 2 play on one Machine with a shared Camera and Player 3 and 4 play on another machine with Shared Camera

lost inlet
#

well if you manage to have local MP with a single viewport it should still work online

modern dome
#

Somehow The game only spawns one Controller, although I set the Num Players to > 1

#

I can control both Pawns if the Input Code is in the Pawn, but if it's in the Controller I can only control one pawn

versed socket
#

I'm sorry but I wish I knew more about the local multiplayer stuff. I'm sure you've already done this but if it were me I'd go read the docs about it

modern dome
#

I already read the Networking Compendium from eXi. But holy shit you really need to keep track what exists on the Server and whats on the Client xD

hasty adder
#

setting the references on possession that is ^.^

thin stratus
#

@hasty adder Why on possession and why saving them at all :O

#

You already have pointers to both

#

(Sorry if I missed something in the upper discussion)

hasty adder
#

ive just found it easier when using things like on overlap etc specific things easier

thin stratus
#

I mean the PC and PlayerState reference

hasty adder
#

Tbh prob easier ways but I pass a lot of other things around. For instance. For example. Players overlaps a physics object sending it forward. On this event I need put the reference of that player in the ball. The ball has its own logic to hold last touch, last touch red/blue and last assist red/blue for player state and controller due to player stats held in ps and access to controller for firing of specific player HUD events on the event of a goal

thin stratus
#

Yeah but

#

What I say is

#

The PlayerCharacter already has "GetController" and "PlayerState" as a reference

#

I don't understand why you need to get them there and saving them a second time

#

And the Delay is not a good solution.
If the client has a lag (internet), the delay won't be long enough

hasty adder
#

Yeah I can see that.

modern dome
#

The GameState exists on both Clients and Server.
If I want something to replicate to everyone, Do I have to do it like this?

#

My thoughts were like this:
GameState is on my Client -> I call Display Damage -> Switches To Remote -> Execute Client Version
ClientVersion is actually a Delegate to the Server Version (GameState exists on Server, too)
Server Version executes on All Clients

#

is this correct?

#

What happens If I call a "Execute on All" Event when the Actor only exists on Server (Game MODE for example)?

brittle sinew
#

In that case, it would only call it on the single instance, the server one

#

Your function naming is really throwing me off haha, usually they're named where they're executed rather than where they're called from

#

Either way though, I don't really see an issue with that

modern dome
#

The Server Version gets executed on the Server and the Client Version gets executed on the Client. Whats the problem?

#

Oh I see. Since Execute on All executes on the Remote.

brittle sinew
#

Well like you have the client function executing on the server currently

#

I understand the scheme now, just took me a second :p

thin stratus
#

You can't call ServerRPCs on the Gamestate

#

As the node says "If owning Client"

#

The GameState is owned by the Server

#

Other clients can't call a ServerRPC on that

#

You need to do the ServerRPC call in a ClientOwned Actor, such as PlayerController/PlayerCharacter/PlayerState

#

You might want to read my compendium and the Ownership chapter

modern dome
#

I fucking read that xD

thin stratus
#

Read it fucking again!

modern dome
#

I thought "if Owning Client" means if it is owned by ANYone

thin stratus
#

Na, the RPC is called from a client, right?

#

So XY Client calls it

#

That has to be the owning client of that actor

#

So the caller needs to own the actor

#

It's like the first page

#

slaps Raildex

modern dome
#

Gomenasai, senpai

thin stratus
#

You have been forgiven.

#

I would say that in japanese, but I have no idea how

modern dome
#

Wait

#

Oh no. I got it.

#

But what If I want something to replicate from one Client to other clients?

unborn bear
#

hello @ all

#

How can I make a chat-channel in UE4? with UE4 RPC

#

seems like ue4 rpc just can make 1 session channel for client.

dapper galleon
#

@modern dome you'd need to pass that through the server somehow

#

you might want to keep that on the server so it is replicated to each client

#

but it would be an autonomous proxy for some client

#

the remote role

#

I don't know why would you want that, but I'm being kind of generic ๐Ÿ˜›

unborn bear
#

anyone help?

dapper galleon
#

@unborn bear what do you mean by one session channel for client?

unborn bear
#

I mean a client have a session for game, and 3~4session for chat channel.

#

like #chat-all #chat-nearby #system-notice

#

So can I create many session on server for chat-system?

#

@dapper galleon

dapper galleon
#

do you mean the ue4 online sessions? You can have one per server AFAIK

#

why don't you just filter the client message in the server?

unborn bear
#

Yes.

#

Yeah, your advice is a solution.

modern dome
#

@thin stratus who owns PlayerControllers? The Server?

dapper galleon
#

@unborn bear Well, you could run multiple server instances, but I'm not sure if that's fitting

unborn bear
#

I just think that is efficiently use multi-channel with multi-thread.

#

A client can connect to mult-server ?

dapper galleon
#

I guess you could do that with multiple servers, but that I couldn't help ๐Ÿ˜›

#

not sure if you could that with the ue4 network

#

you might have to implement that yourself

#

but now i'm just speculating

thin stratus
#

@Raildex#6923 The client who's controller it is

#

@unborn bear Does the Chat only happen on that one server?

#

So only players that are on the same server see the chat?

unborn bear
#

yes @thin stratus

thin stratus
#

Then just maintain a list of PlayerControllers for your channels

#

All Chat has all PlayerControllers

#

Nearby only has the ones overlapping a sphere of the player

#

etc

unborn bear
#

There is a solution : make a websokect for chat-dialog umg, and use ue4 session just for game

thin stratus
#

Well yeah, you could also use an outside server to handle the chat

unborn bear
#

So I want know which solution is effeciently.

#

Outside server can use multi-thread, but http will be slow.

thin stratus
#

I don't see what would keep you from simply sending the messages via RPCs

dapper galleon
#

^ ๐Ÿ‘

unborn bear
#

I wonder to know how about the PlayerUnknow's Battlegrounds' solution.

dapper galleon
#

You might want to start simple ๐Ÿ˜

thin stratus
#

You might want to use the solution that fits your needs

unborn bear
#

...

#

That game had no dialog..

#

just use voice talking..

safe linden
#

hnnngh

#

i just started with unreal engine 4 and i already want to make a multiplayer monstrosity

#

urges, man

modern dome
#

but the Damage Display only happens when I use the Server...

#

wtf is wrong?

#

Controller is Client Owned, but exists on the Server.
Server Executed Client owned Evnets should be fired.

brittle sinew
#

You're calling the event on a PlayerController it seems, no?

#

PlayerControllers aren't replicated to all clients, they only exist on the server and the relevant client...multicasts aren't really effective on them

modern dome
#

ugh. I totally forgot that

thin stratus
#

Also the Damage event is server only

#

if a client causes it, you need to do a ServerRPC first

#

Which should kinda never happen

#

As the Client should not be able to cause damage

modern dome
#

I know. Cheating prevention and stuff

#

but

#

where should my hit detection go then?

#

GameMode comes into my mind, because it only exists on server.
but how do I send a Hit detection "request" to the game Mode if no one can access it?

Do I need to use Controller->PlayerState->Switch Authority->Server Hit Detection or what?

thin stratus
#

Not GameMode

#

Just make sure that the client doesn't touch it

#

What can damage in your game?

#

A weapon?

#

Or what is your game about

dense citrus
#

๐Ÿ˜„ Weapons sounds good

#

exi .. short question .. iยดm looking for a great source , how to make dedicated server via Steam

hasty adder
#

๐Ÿ˜ฎ

thin stratus
#

Haven't done DediServers for Steam yet

dense citrus
#

ahh ok shame

thin stratus
#

I'm keeping away from that :P

dense citrus
#

๐Ÿ˜„

#

because of 30% fee

#

i understand

hasty adder
#

wait for epic to cleanup soss if ever

thin stratus
#

Na, not only, Also because I haven't had anyone asking for it

#

I don't have own games yet

#

Not gonna touch it until I need it or someone pays me

#

Well there is a new plugin for steam

#

no idea if that resolves dediservers for steam

dense citrus
#

i will pay ๐Ÿ˜‰ no just kidding

#

we will see .. thx

hasty adder
#

Curious are you planning on actually using the steam server browser? or a solution for in the game to find servers?

#

@dense citrus

dense citrus
#

no that is already done only to make one dedicated server with Steam registration

hasty adder
#

you read that whole forum post with the Pull request etc?

dense citrus
#

no

dense citrus
#

thx

hasty adder
#

this is the most i've seen done on it. kinda points out the complex nature of it all ๐Ÿ˜„

#

but if you end up looking at the PR it points out - epic was looking at it but seems possibly they may be doing something on there own, i stopped following it a month or so ago, though ๐Ÿ˜›

dense citrus
#

ok ๐Ÿ˜„ i will read it

thin stratus
#

Someone said that the PR is only for authentication

#

And you should still be able to find your Server without that

#

So it's mainly for making sure that only people can connect that own your game through steam

hasty adder
#

ah hmm all seems like a time sink to me ๐Ÿ˜„

worthy wasp
#

Having some inconsistencies with my network model - namely using the playerstate to setup things like PlayerName & other replicated variables at the beginning lifecycle of the framework classes.... Is there a map/model that shows the framework classes, their births at point of the game framework process? I"ve tried searching many google searches, coming up with a few semi-relavant ones but mostly just how the engine inits and the coming to life of the Game INstance - to actual PIE/Standalone playing..... nothing being said about characters, playerstates or even gamestate for that matter.

brittle sinew
#

Yes, check out the pins

#

Newest link is in there

worthy wasp
#

ty lethalclips

modern dome
#

Apparently, having a Hit Detection in my Pawn (Run On Server)
and calling the GameState's "DisplayDamage"(Execute on All)
Does the trick.

#

Spawning of the Displayed Damage is replicated ๐Ÿ˜ƒ

#

All this "Only exists on Server" and "This owns that" is fucking confusing even after reading tutorials 100 times

#

I thought that "Run On Server" actually needs to be on the Server.
I didn't got my head around that "Run On Server" just executes the Event on the Server version of the Actor.

#

Since Pawns exist on both Server and Client, this works

brittle sinew
#

Ah, I guess I kinda understand why you were naming your functions like you were before then :p

modern dome
#

Yeah. It's pretty confusing when you've never touched networking.

#

Simply make a event "Execute on Server" within your Pawn/Controller and you can access everything on the Server ๐Ÿ˜‚

#

Atleast that's how I understand it

brittle sinew
#

Yep, as a client your only paths to the server are through the PlayerController or anything it owns

hasty adder
#

Ahh you have hit the moment

#

The replication Epiphany

dapper galleon
#

Hehe, the turn of the switch

hasty adder
#

Ui elements still give me trouble though I must admit. My far lease favorite is things like in world widgets. But lately I've been trying to just store specific values inside the character class so it's only needing to changes for example. PlayerChar_Red/Blue as its material. One day the second bump will hit.

#

But man trying to use a dynamic material instance sometimes has odd effects if say it's changed, then someone reconnects ๐Ÿ˜‰

worthy wasp
#

Trying to see if i have access to a networked clients controlled pawn from Playerstate reference?

#

not showing anything related from dragigng of playerstate pin....

hasty adder
#

Ah

wet lion
#

@all Hi everyone, I have a few questions about networking. First, simple one is that I noticed that when I have a client join a session, I noticed the game mode in the server creates the pawn for the client AFTER the client's playercontrollers's BeginPlay. Is this normal? I noticed it because in my playercontroller, on BeginPlay, I was casting the owned pawn to the BP pawn subclass I am using and storing the ref once for subsequent use with input bindings, as opposed to casting on each invocation of input axis, where if the cast fails I would have otherwise not done anything.

lost inlet
#

sounds like that would be typical behaviour

#

SetupPlayerInputComponent gets called in a pawn and that's usually where you would setup input bindings

twin juniper
#

Has anybody used Firebase as substitute for existing Online Subsystems and could please tell me about their experience with it?
I'm currently starting to use firebase in our project for more and more things, but there's not too much info about UE4<->Firebase out there (yes there are 2 plugins and some older threads from back in 2016 when it first came out)

twin juniper
#

@thin stratus Not gonna touch it until I need it or someone pays me Well there is a new plugin for steam no idea if that resolves dediservers for steam

#

whats this ?

#

the audio plugin?

thin stratus
#

No?

#

Subsystem

lost inlet
#

UWorks is not using the OSS abstraction

twin juniper
#

Lol

lost inlet
#

it's only useful if your game is married to steam and you need steamworks in BP

twin juniper
#

^

#

lol

#

yeah the only thing I need fixed on steam OSS

#

is Getcurrentplayers()

#

๐Ÿ˜ฆ

lost inlet
#

it's incorrect because the steam OSS doesn't authenticate players

#

you can spoof your steam ID very trivially to evade bans or impersonate people

twin juniper
#

yeah

#

but like

#

the steam authentication pull request

#

hasnt been merged to the main branch

#

and it hasnt been updated since like

#

4.14

lost inlet
#

there's a pull request that implements authentication but it makes a bunch of messy interface changes

twin juniper
#

this right?

#

yeah

#

its super fucking old tho

lost inlet
#

looks like this pull request also makes similar changes to what i made to disable p2p sockets

twin juniper
#

Lol.

#

You should make a pull request

#

so i can dl it

#

Lul

thin stratus
#

Even if it's not using the OSS interface/abstraction, it still seems to be more properly implemented than Epic's

fleet sluice
#

@lost inlet It's actually more accurately described as a "replacement" for OSS

#

And yes, it solves the dedicated server on Steam issues, except it's a different approach than the OSS approach.

#

@thin stratus Thanks!:)

lost inlet
#

which is fine if your game explicitly requires steam

#

but not every game, even ones on steam, will

#

that is why the OSS abstraction exists

fleet sluice
#

No, of course not. That's entirely correct. But it does offer a solution to dedicated servers, authentication etc

thin stratus
#

The OSSs have different kind of hickups anyway

#

Especially if it's about sessions

#

So the OSS interface doesn't always work out of box without implementing different things per OSS

#

I don't see any bad thing about UWorks in combination with normal OSS interface for other systems like PS4 etc

#

I would just love to see Epic do it properly so we don't need UWorks

lost inlet
#

prepare for a lot of PLATFORM ifdefs then just to deal with basic online functionality

fleet sluice
#

Indeed, it should work just fine with any other OSS

thin stratus
#

Sure, it#s not the best but it's also not the worst if it works

#

I full guide on using epics interface for Steam would help a lot

#

So many people have so many problems with dedicated servers

#

or Seamless Travel

#

etc

lost inlet
#

not had any issues with the XB1/PS4 OSSes so far, it's just the steam that lets the side down

fleet sluice
#

I'm working on my own OSS implementation right now

#

Rather than hoping for an OSSteam overhaul

#

I disagree with about 60%+ of what's in there, personally

thin stratus
#

Yeah well if you have the time

hasty adder
#

There's always stuff like gamesparks or if your. Not worried about user authentication.. Sql database and varest to heartbeat existence to a master list

thin stratus
#

GameSparks works with steam together though

#

And with any other subsystem

lost inlet
#

ah gamesparks, hope they don't get acquired or go under if you're using them

thin stratus
#

Great platform. Would be a shame if that happens

hasty adder
#

I've got a rather simple varest setup working - I tried that master server plugin but it uses code requiring windows only builds

lost inlet
#

well just remember demonware

thin stratus
#

I know it can happen

#

But It's not my problem atm. I'm not using it myself. Clients use it though

lost inlet
#

rolling your own authentication and master server because the steam OSS is lacking seems counter-productive too

thin stratus
#

If you have the time, you could try to simply refactor the existing plugin (aka make your own based on the OSS interface) for steam

#

WIth only the stuff you need

#

And then properly. But that depends on how much time you have

lost inlet
#

we kinda started that already, i removed p2p for dedicated servers so you can join by IP

hasty adder
#

The time and effort to make a good steam oss is the stuff you'd want to get paid for making ๐Ÿ˜ƒ

thin stratus
#

Well or you sell it

#

:P

#

Or both