#multiplayer

1 messages ยท Page 478 of 1

split gust
#

libcurl I think doesn't follow redirects by default in a request

#

for example, people report that error happening often when they connect in HTTP to a server, that just plain redirects all requests to go to HTTPS instead

#

and that redirect causes issues

night jay
#

Idk if that's a redirect

#

What do you guys suggest?

grizzled bay
#

solved my issue :/ turned out the building class was using an event beginplay which was self sabotaging itself, so it was replicating correctly but this forced it to do it's own thing on clients

high current
#

cool

night jay
#

I think I figured it out, thx

fickle pond
#

can anyone help me understand how to do linetracing with multiplayer in BP

high current
#

What do you exactly need help with,

#

the logic behind the replication or?

marble depot
#

probably a dumb question, but does it matter if servers are compiled for development and clients for shipping? is there a performance or stability gain if we also compile servers for shipping? how do you do yours?

high current
#

Idk if they even are cross-compatible, but a development build will probably have a more chunky log size due to print strings and whatnot

marble depot
#

they are compatible and yeah, logs will be a bit bigger because of the prints

#

but i'm curious about the performance and/or stability though

fickle pond
#

The logic behind the replication

#

Its just that hwen I shoot a linetrace it doesnt actually "hit" the other characters

#

the other clients

#

it just kinda passes through @high current

lost inlet
#

well a line trace won't replicate on its own

#

you have to send an RPC to actually do anything

fickle pond
#

uhhhh

#

elaborate on RPC

lost inlet
high current
#

@lost inlet mentioned BP, so the equivalent is Replicated Custom Events

#

are you familiar with custom events

#

The general logic is that you have to manually specify who gets what information and when

#

The server has authority over clients in most cases

#

you can read more about it here

#

but to get your line trace to show up on other clients, you most likely have to run it via a custom event in order to replicate it

#

can you tell me if your server is actually a player, or do you intend to play your game with a dedicated server, meaning that every player is a client

fickle pond
#

One palyer host

#

So no to the dedicated server

high current
#

Alright, how is this line trace happening

#

what is initiating it

#

is it player input

fickle pond
#

Yeah so you press Mouse 1 and it draws a ray

#

line

#

From the player

#

Well the ray is getting casted from the gun

#

actually

high current
#

should there be any logic preventing some client from seeing the ray?

fickle pond
#

No clue

#

The rest is just the actual drawing of the linetrace

#

Last one, this is what happens when it hits an actor

high current
#

Ok first of I would advise to get rid of all get actors of class nodes

fickle pond
#

?

#

Oh

#

wait but how would we call functions from other BPS?

high current
#

via casting

#

can you show me how you spawn these BP's

fickle pond
#

ok the prob i had with that was the refrence obj I need to pass in to the cast

#

under the greyed obj

high current
#

yeah, ofc, but we can save these variables

#

and use them later to access those BPs

#

can you show me where you spawn the BPs

fickle pond
#

I just have em inside the level already there

high current
#

are they like pickups or something

fickle pond
#

Well

#

here could u join a call by anychance

high current
#

nah soz

fickle pond
#

Aight np

#

WEll what we have is the BPs of the Pistol and shotgun

#

already in the level

#

but when u switch to them all it does is change an empty mesh on the character

#

its weird

high current
#

Ok, instead of spawning them in the level, it is best if each character(pawn) spawns its own Pistol and shotgun, and attaches them properly

#

unless they are supposed to be pickups by design

fickle pond
#

well in the end you pick up the gun

#

wait so its better the just have the actual BP gun move ot the character?

high current
#

well yeah, you would want your gun attached to the character no, as if they are holding it

fickle pond
#

well we have this

#

its an empty mesh that changes based on what gun you press, it passes ina int and changes it based on that

high current
#

but anyway now I understand why you did it with get all actors from class. it is still wrong but as long as there is only one pisol and only one shotgun, and you have made sure that if one player has them, the other can shoot trough them

#

then its fine and we can move on to the replication which is what you asked for help with

fickle pond
#

Yeah

high current
#

Ok then have you enabled actor replication on either the pistol or shotgun

fickle pond
#

uhhh where do i find that

high current
#

when you click on self in the blueprint, and then the details panel

fickle pond
#

Ah here

#

I have it replicated it looks like

high current
#

Ok, now the events which you showed me earlier, can you set them to execute on server

fickle pond
#

I have em executing them on both client and server

#

What is being printed

high current
#

can you move to the left, i want to se how this is being executed

fickle pond
high current
#

you mentioned it is from an input?

fickle pond
#

well the ray is being casted from a function that is being called from an input ye

high current
#

that function which the ray is being called

#

is that one executed on the server

fickle pond
high current
#

can you try setting this to execute on server rather than owning client

lost inlet
#

because you haven't configured steam authentication or you're using an older version of the engine that doesn't support steam auth

#

if you're doing a multiplayer game that supports steam then having steam authentication is must or else pirated clients can join your normal game servers

#

can also allow for spoofed IDs

spring swift
#

would anyone know how to cast to a specific clients player controller from the gamemode?

#

could i use the on post login with the new player pin???

lost inlet
#

what type of thing is "specific client" referring to?

cerulean escarp
#

does blueprint based physics work poorly in a dedicated server? I created a 100% physics based helicopter BP and I did all of the things required for it to be replicated but when I fly it, it's jittery and the controls aren't responsive half the time

spring swift
#

well i have a player join a game and the server will spawn the clients pawn for it. but i need the server to look at that joining clients player controller to find out what pawn to spawn, but what happens for me is it uses the server pawn that it selected. so i need a way to find out what pawn the client needs to play @lost inlet

lost inlet
#

well the player controller is usually what you think of when you refer to a "client"

#

if PostLogin is appropriate then use that

spring swift
#

well this is where my problem is. ive pluged this new player node into a cast to playercontroller and the variables come out fine, but it still seems to be using the servers player controller and not the "New Player" @lost inlet

grizzled bay
#

if you call a replicated server event from the client, you could try passing in the controller as an input

#

my best guess anyway without trying to do it myself :/

spring swift
#

ill mess around with it

lost inlet
#

i'm not sure what else you expect it to be

#

it can't magically know what the client has set in their player controller

#

in C++, the gamemode login will have their travel URL if you're passing parameters that way

#

and another way is using an RPC like suggested above

spring swift
#

yep

grizzled bay
#

this is what i was thinking btw, not sure if it will work or do what you need, but that is what i would try first

spring swift
#

wouldnt that require you to cast to the server gamemode from the playercontroller????

#

whoops

#

i worded that wrong

grizzled bay
#

i do most of my server stuff in a player state, so wouldn't know personally, for me usually it is like player controller sends it's info to the player state, then player state uses the execute on server to make the server spawn and do what is needed

spring swift
#

ok ill do some digging, i think i have a way in

grizzled bay
#

cool

cerulean escarp
#

does anyone here have experience with multiplayer blueprint physics on a dedicated server?

#

if anyone does, I've got an issue where my physics based helicopter is jittery and the controls work some times and then randomly stop working

high current
#

@cerulean escarp are you doing server-authoritive?

viral raft
#

If you have a dedicated server when using subsystem Null. Can UE4 detect them when finding sessions?

bitter oriole
#

No

#

Subsystem null only works on LAN

viral raft
#

Awh crap

#

Any subsystems that can detect them?

#

I don't use steam so that's not an option

bitter oriole
#

Well, you need some kind of online service for matchmaking

#

Steam is the biggest

#

If you're not on Steam you basically need some of Steam's functionality

#

Basically you need a known server that every game connects to to advertise servers and request slots, and then you need to create your own OSS to integrate that to UE4

#

Should be a few weeks of work once you understand the OSS code

chrome bay
#

Supporting said backend is pretty tough too

bitter oriole
#

Really though, using Steam is a pretty good idea

#

It's basically free and it's widely used by players

#

And you don't want a multiplayer game to not be on Steam

viral raft
#

Steam is not really an option since the game will be on Xbox too

chrome bay
#

If you want cross-platform play you've entered a world of hurt.

viral raft
#

Becuase?

#

If the versions are the same. It's not a big problem right

chrome bay
#

uh oh

viral raft
#

The Xbox and PC version are the same

#

Just ported to Xbox

#

Controller support is already almost done here

#

So I don't see a big issue

#

Could I make a database. Where every server registers it self

chrome bay
#

There is so much more to it than that. Xbox has it's own online service for matchmaking and connecting players which is entirely separate to Steam

#

That's exactly what the session subsystem stuff is for.

#

If you want cross-platform, you have to manage matchmaking and an online subsystem of your own.

#

That costs big-dollaz to host and support that kind of thing

viral raft
#

I saw Google's agones

#

Which looks promising to easily scale and I thought it has a matchmaker

#

But dunno for sure

bitter oriole
#

If you don't see the issue, you're in trouble ๐Ÿ˜ƒ

viral raft
bitter oriole
#

Like TheJamsh said, currently, there is zero bridge between XBox and PC

viral raft
#

Oh

#

Then I was wrong haha

#

Hmff

bitter oriole
#

Epic is promising that some time next year, they will have their own OSS using Epic accounts that might work on both

viral raft
#

Yeah I saw on trello

bitter oriole
#

You can also try using the XBox infrastructure on PC

#

But there is no UE4 integration for that

viral raft
#

Might figure that out with the Xbox team in that case

bitter oriole
#

And finally, crossplay is a can of worms - PC will have cheaters while XBox players won't stand for that, balancing gamepad vs keyboard is hell, etc.

#

Not to mention you still need a distributor on PC

#

So start with Steam, you'll be able to matchmake immediately

#

By the time your game is on Xbox and mature enough you might have access to Epic's OSS

viral raft
#

Ah

#

Right now I use discord. Since I got that from a discord employee for free :D

glad sedge
#

I'm setting a value on my pawn from server. I'm passing an enum (basically a category), yet I'm not seeing it at all.

#

Is passing an enum problematic as a setting or is it more likely a multi issue and I'm not passing it to client?

#

Actually, it shouldn't matter. I'm setting that value on the server and yet I'm not seeing it on the server. Hmm

toxic drum
#

there was a UWP version of UE4 once upon a time

#

that theoretically was supposed to support XboxLive, I tried it and had cross play working between a pc uwp build and an xbox build

#

but it was abandoned

#

zero support for that MS branch

#

and everything was janky af

#

this was early 2017, way old

chrome bay
#

Yeah I remember that, that was after Tim was taking big-time poops on UWP

#

MS created a Git branch which I thought they were still supporting but I guess not

bitter oriole
#

I mean, I can also see Tim not wanting to support Microsoft's competing strategy of "our online service on every platform"

#

They're doing exactly what Epic does with EOS, except it's already available

#

I would seriously consider using the Xbox online services for PC matchmaking if there was a built-in OSS, since I know that service will work on the Switch, XBox, and I guess PS4 too

green cedar
#

could probably look into gamelift, though I am not sure how stable/feature complete that is

chrome bay
#

Gamelife is just server hosting isn't it? You still need to use some service to find them

#

There was Gamesparks, but that recently hiked it's prices to near absurdity after being bought out by Amazon. A lot of folks we're using it but abandoned it after that.

green cedar
#

GameLift, I think, has some opinionated matchmaking stuff

#

Exposed via REST, if I recall correctly. It's been awhile

#

Think it's built specifically for lumberyard, but kinda-sorta 'open' for others

#

So I'm unsure of the extent of the features/how much of a pain they be in UE4

#

I know there's a plugin/binaries for it

#

How up to date they are, though, I dunno

#

'FlexMatch' would be their server discovery solution

pallid mesa
#

uh oh... is there any new setting for net culling on 4.22?

#

I have migrated a project from 4.18 to 4.22 and I can't get net culling to work correctly in a trivial case

#

however when I migrate this same actor to content examples it works correctly

#

^^ somehow the net cull sphere is much little than it should be, the actor starts being relevant when I am super close to it, it's working erroneously.

#

here is totally fine

#

unless it's camera based ๐Ÿคฃ

#

aight, seems to be camera based, one more thing I've learned

glad sedge
#

Are delegates on multiplayer based on where you're calling the delegate? For example if I bind my PC with a delegate via GameMode, will that only call on the server?

#

Or is it based on the PC's function - if it's client / server ? Bit confused.

fleet raven
#

? delegates have nothing to do with multiplayer

#

it will run where you bind it

glad sedge
#

So there's no 'Client' Delegate and 'Server' Delegate?

fleet raven
#

no

#

if you bind a delegate from the game mode, which only exists on the server, the binding will only happen on the server and thus run there

glad sedge
#

Well okay yeah that's what I mean

#

That explains a few things

fleet raven
#

but the reason for that is just that your code creating the binding never ran on the client, not that delegates have any multiplayer functionality

glad sedge
#

Yeah, I worded my question poorly

#

But that's what I meant - in short, does binding a delegate via the server only mean (IsBound() ) returns with something on the server.

winged badger
#

with delegates

#

always look at each machine in isolation

#

there is no server, don't even think that way

#

if bound will return true if you bound something to that delegate on that machine, on that instance of the object of which the delegate is a member

glad sedge
#

yep, got it. Thanks

#

That's a good way to look at it.

next warren
#

hi,i m updating linear and angular damping on every tick in my carbp should i need it to multicast or leave as it is

winged badger
#

never multicast on tick

next warren
#

so is this correct my function on tick

thin stratus
#

Got a if (GetNetMode() != NM_Client) check.
Calls twice in a ListenServer/Client setup.
Out of confusion placed ENetMode NetMode = GetNetMode(); in front of it.
Result: Calls once.

#

Is that just the breakpoints failing?

#

I sometimes really dislike VS

glad sedge
#

GetNetMode seems handy?

thin stratus
#

Jesus christ, if I break point when I shoot, the game deals 2 times the damage

#

At which point can I blame VS ?

#

-_-

bitter oriole
#

Probably never

thin stratus
#

Printing to the log it is

bitter oriole
#

I'd look at the code tbh

thin stratus
#

I don't see the code being a problem.
It calls once, it has a check for NetMode.
It works if I don't breakpoint in VS.

#

Gonna start printing stuff now

glad sedge
#

Only thing left to do is drink 1000 beers

thin stratus
#

So yeah it calls twice if I breakpoint and once if not

#

wtf

#

It is failing the GetNetMode check if I breakpoint

#

It's not failing the check. it's freaking executing my input twice

#

nvm then

#

-_- Can this week be over

glad sedge
#

I reiterate my solution.

high current
#

One of these days ill show my UT replication shinanigans, so yall can roast me :d

#

Not today tho

somber glade
#

What's the replication process for updating a dynamic material instance? I have a CCTV camera that can be disabled and reeanbled. when it gets disabled, it sets its render target as a disabled black screen .When it's repaired it sets it back to what it should be. The camera also pans. The panning seems to be replicated. It starts and stops both host and client. When it's disabled the client just sees the image freeze. but not blacked out. When it's repaired the host sees the image update again. The only thing really missing is that the render target part doesn't seem to be replicated. Everthing else is

high current
#

I do cosmetic things like material changes and such via RepNotifies

somber glade
#

Current it takes in the event from an interface, then calls an event that is "run on server" this tells the camera to stop panning (replicated) it then goes through and finds its entry in the array of cameras and changes it's struct from the normal render target to the disabled one.

#

the render target though is in an array and not a variable.

#

can I rep notify an array change?

high current
#

You can rep notify a dummy bool

#

And in its OnRep function

somber glade
#

it looks like the array can rep notify

high current
#

Change the array

somber glade
#

the camera calls to the monitor (two different actors) and the array is held on the monitor

#

it's actually 8 monitors inside one actor, so I could just rerun the function that applies the textures to all the monitors and it'd update with the new texture

high current
#

If you have two states, which are both known, replicating a simple bool is cheaper than repli ating an entire array

#

Is that the case

somber glade
#

but it still needs the information from the array

#

to set the new texture

#

it's all contained within the struct

#

I have 8 cameras and 8 monitors, so I needed to write something efficient to set that up at the beginning of the game.

high current
#

Ok so if you just replicate the array, does thst fix your issue

somber glade
#

I just noticed that the array wasn't replicated, that might have been the issue. I wont be able to test again for a bit, I can't test this in flat screen at all at this point because too many functions are connected to the VR characters.

#

I'll try replicating that

#

and if that doesn't work, I'll just try to rerun that function on a repnotify?

high current
#

Sounds like a plan

somber glade
#

would the other more expensive option just be to run the whole process of changing the render target as a "multicast"?

high current
#

Well yes

#

But a repnotify in the example i gave you is kind of doing the same

#

As a multicast

somber glade
#

Okay, I'm still getting the hang of exactly how this works. Sometimes I get my head around some parts of it, but othertimes it's not as clear.

#

This is the setup I have for the weapon/tool. The tool actually has multiple functions so after this it basically goes to a select where it then chooses which function to run based on what the player has selected. The projectile seems replicated and fine. I've set up a "repair" function for those CCTV cameras. It's a particle effect that shoots from the gun to the CCTV to make it look like it's repairing. It mostly works, but in some cases the client said that it didn't stop. sometimes it did, sometimes it didn't.

#

when the particles are called, they're set to a variable. When the user stops repairing or the repaired item detects that it's repaired it calls back to the gun and tells it to stop and destroy those particles.

#

I think it might have been my overlap event

#

if the user just stops that event "runs on server" but if the user points the weapon away the overlap event just stops it

#

should I put an intermediary "run on server" function in the middle?

#

If no one knows the answer, that's okay, I sometimes figure things out as I'm typing them out. This function, seems to work. When the player activated it, he disappear. The issue was that it took way more than 25 seconds to be over. That timer is set for a value of 25. It was well over a minute before he popped up. That calls to a function which sets the the "cloaked variable" which has an onrep function which should hopefully make him visible for everyone else after 25 seconds.

#

is there anything server/client related that could cause that timer not to fire properly after 25 seconds? I don't have any other functions dealing with it.

#

it was probably more than a minute as well. We'd basically given up on him coming back and then he was suddenly there.

maiden vine
#

@somber glade Have you tried your blueprints without all the branches/booleans?

somber glade
#

I haven't, but I can put that on the list as a way to test them.

maiden vine
#

good deal

somber glade
#

it's a fairly necessary check though, I have two types of characters sharing the same BP, just some initial setup is different and a couple checks like this. The other kind of character can't cloak

maiden vine
#

maybe you will find one problem by bypassing some of the checks

somber glade
#

if you also mean the particle ones, those are necessary

#

There may come a situation where the repair tool ends overlap but the repair is finished. I need some check to make sure it's not already done, or it goes and tries to unset the particles again and throws an error on th at

rotund sapphire
#

crossmr for abilities like this 'cloak' you may better of getting familiar with the gameplay abilities sytem which is not only replicated but efficient as well for such things. and you don't need custom timers it works alright.

somber glade
#

Thanks for the suggestion. I'll add that to the list

#

sadly I gotta have a lot of this tightened up for tomorrow

#

so no time for new systems tonight

maiden vine
#

good luck to you

somber glade
#

But next week i'll be able to come back and fix these up

#

haha thanks

rotund sapphire
#

ga system is a whole new world, and it is responsive, multiplayer friendly etc you most likely want that in a mp game

somber glade
#

Next monday I'll look it up. In the meantime any suggestions for band-aids I can stick on this for tomorrow? haha

#

I'll have another testing partner in the morning, so I gotta patch up as much as I can tonight and have a package ready for a test, then I'll have the rest of the day to fix what's still broken

cerulean escarp
#

@high current yes all of the functions are being handled by the server

#

@high current would it just be more efficient for me to make the helicopter all kinematic instead of physics?

unique kelp
#

Should the Character Movement Component be replicated?

#

Seems like it should, but if I do enable it, I get my player jittering badly

#

If I dont enable it, it seems like the client and server are running very differently

thin stratus
#

It should be

unique kelp
#

Then my jitter issues are probably elsewhere

#

If I bump the pktlag to something like 50 it is already very noticeable

#

thanks

thin stratus
#

Do you change the MovementSpeed of it runtime?

unique kelp
#

yeah, but I have prints to show me the speed on both client and server and they are always the same

#

with the exception of the ms of lag that I specify

thin stratus
#

And you are changing the speed on everyone?

unique kelp
#

I think I am, but I'm going to go ahead and add all of the debugging info I can think of to see if anything is different

#

If i dont change pktlag all of the clients see exactly the same

#

but I guess the "corrections" happen so often it wouldnt really show then

chrome bay
#

You shouldn't need it to be replicated, there's no rep properties in there

#

All the RPC's go through the character class as of a couple of versions ago

#

although it being replicated and not shouldn't make much difference :/

high current
#

@cerulean escarp a kinematic helicopter would definitely look better for clients

cerulean escarp
#

k then Iโ€™ll do that instead

unique kelp
#

So if I have a custom movement component class with replicated variables, it being replicated wouldn't break anything, right?

cerulean escarp
#

Iโ€™d rather it be smooth than realistic

chrome bay
#

Oh if it has replicated vars then yeah you want it replicated

#

Otherwise none of those properties will replicate

unique kelp
#

yeah, what I was wondering was if it was some kind of special component that actually needed to not be replicated

#

thanks

high current
#

You can still sync the kinematic stuff to be affected by the driving forces of the helicopter

cerulean escarp
#

would that be more resource intensive than just making it all kinematic?

#

or about the same

high current
#

not realy, in order to drive most animations, you need an anim blueprint with a blendspace, that anim already has access to (whatever you give it access to) in order to blend animations, you could easily read the physics linear velocity and control the play rate and tilt of a rotating wing based on that

cerulean escarp
#

huh? Iโ€™m not using any animation blueprints, the only animation is the rotors turning which is in a loop

#

I was just asking if the dedicated server will handle kinematic movement better than it will handle physics movement

high current
#

what do you exactly mean by kinematic movement

#

Root Motion?

chrome bay
#

If you build a prediction/rewind system like character movement then kinematic is your only option

#

If you want at least mildly realistic collision response however (i.e. physics), then go client-auth (with some server-side verification / anti cheat etc.)

worthy perch
#

bUseLoggingInShipping = true;

#

In your Target.cs.

fleet raven
#

it doesn't

#

assuming you don't log 1000 messages per tick

#

I've no idea why logs disabled is the default, a build with no logs is like useless

high current
#

Btw, question for my own sanity, is client-auth movement and well, events, physics, possible within blueprints

sour river
#

Hello, is a source built Unreal engine version still required to build a dedicated server?

cedar finch
#

I'm getting client lag using the steam subsystem and also 9999 ping when I see lobbies. Is this my own net code at fault or is the Steam subsystem to blame?

chrome bay
#

steam doesn't have a system for reporting ping to lobbies so yeah you will see 9,999 ping

#

Lag is likely the games fault

#

Steam doesn't handle any of the gameplay networking

split gust
#

there are no "pings" to lobbies

#

a lobby is just a server side chat room ๐Ÿ˜ƒ

#

it depends on how the game will be played after

#

if you are making a P2P game based on that lobby, you need to open a P2P connection to each players inside to even measure the ping you'll have with them

chrome bay
#

What I mean is a listen server will be a "lobby" as far as Steam is concerned

split gust
#

which isn't something you can do on the lobby browser because your players will DDOS the poor guys inside a lobby

high current
#

maybe that is the game, you never know...

#

the guys inside the lobby have to fight back

cedar finch
#

Lol yea I'm just using listen servers and everytime to pull up my server browser widget I see a list of servers to join, even others that are not my game but still show up because we're all on Spacewar on steam and every server has 9999 ping.

chrome bay
#

Just hide the ping tbh

#

Only real solution for listen servers

twin vault
#

do sessions timeout? seems like after an hour or so of playing the session just vanishes, then i cant invite anymore...

cedar finch
#

So in pretty sure I didn't replicate my fire weapon logic properly that's why my game is lagging. As a client sometimes I can't shoot my weapon no shooting sound plays. What's the correct way to replicate shooting a weapon?

#

Right now clients have to execute the run on server event in order to shoot

high current
#

how does your shooting work

#

is it hitscan or projectile

#

i.e are you spawning a bullet actor or is it a line trace

cedar finch
#

I have both but mostly hitscan

#

I do it the typical way. FireweaponEvent-->>switchHasAuthority-->> server can fire, client has to run on server.

#

Maybe it was just a bad host. I need to test again with a different host to make sure

narrow prairie
#

i hope someone knows, im making a zombie shooter. it doesnt always happen so im a bit baffled where to look. my destroy actor isnt always working

#

from the projectile

#

so sometimes they hang mid air

#

and keeping hitting my enemy

#

and never despawns

#

most of the time it works

#

but sometimes they stop mid air

#

where they should get destroyed

#

but it seems the destroy actor isnt firing

#

everything set to replicated

#

but as i said its not always the case

#

it both happens on server and client

high current
#

ok, but in general (at least how I do it, IMO), if it is an actor your are spawning, I would spawn that on server, and have the spawned actor replicate, and if it is a line trace, i do like bool RepNotify and do the line trace there, doesnt have to be a bool tho, like if the line trace needs a specific start and end, which aren't known and need to be replicated, I would have the RepNotify be one of those vectors @cedar finch

narrow prairie
#

it is

#

spawned by run on server

pallid mesa
#

do Net PktLag = 200 and see if it happens more often

#
  • verify single process is off aaaand don't hot reload
narrow prairie
#

yes

#

same result

#

though way more

#

more earlier occurs

#

and way more projectiles hanging in air

#

i do play on pie btw

#

i dont know if that matters at all

#

should be ultra fast on local host

#

1gb network

#

i mean

#

ping should be really low

pallid mesa
#

okay so if you say your projectiles don't get destroyed, be sure first the destroyed function gets called

#

you can check that by overriding "Destroyed"

#

call Super

#

always

#

and then hook there a UELOG

narrow prairie
#

ok

#

lemme check

#

im a bit confused about the override destroy, how am i suppose to hook up the event hit

#

or is it there where i allrdy go wrong lol

pallid mesa
#

uh?

#

okay so... first of, does hit get called on the server or both

#

if it's on both you need to be called only when authority

#

and after that "destroy"

#

theeeeeeen to see if "destroy" is working, go and override "Destroyed" function

#

call super and put inside a UELOG

#

you should see a log every time you destroy one of your projectiles

narrow prairie
#

hmmm

#

earlier in code destroy actor

#

seems to work

#

with authority

#

need to test more

#

thx man

#

i didnt knew it was possible to run code after destroy actor :S

#

wtf..

#

how is that even possible

#

when it has no memory reference to it

#

or am i retarded and dont understand enough yet

#

started only 7 months ago

pallid mesa
#

well, it gets deferred.

narrow prairie
#

so thx for beeign so kind enough to explain

pallid mesa
#

anyways, the proper way to do what you are doing is to play with the lifespan

#

because you have more time to deal with extreme use cases

#

if you look at any actor CDO it has a property called Lifespan

narrow prairie
#

ye there gonna be ton of zombies

pallid mesa
#

read the description and you'll understand it

#

no problem, I'm compiling stuff hahaha

#

I'm all fancy and available while I compile things

#

๐Ÿ˜„

narrow prairie
#

srry m8, where can i find CDO

#

i dont know the full word

narrow prairie
#

\

pallid mesa
#

for theory mathew wadstein is quite dope

narrow prairie
#

for example if u shoot in the air

#

ill test a bit more and see if its fine

#

thx again m8

pallid mesa
#

๐Ÿ‘Œ

narrow prairie
#

also feels a bit smoother

#

awesome

late wharf
#

hi!
We're having a bug when replicating and actor that uses Gameplay Abilities

Thing is that, on replication of an actor, at some point the code generates a replicator within FindOrCreateReplicator.
In this part
// Make a copy of the net properties
uint8* Source = bUseDefaultState ? (uint8*)GetObject()->GetArchetype() : (uint8*)InObject;

The code fails because it can't find the Archetype of a subobject of the actor (specifically the archetype of derived class from UAttributeSet).

We're trying to understand what the Archetype is and why does it fail, but we can grasp it.
Can anyone help with this? Any advice on what to look at?

narrow prairie
#

sound like a reference issue to me

#

but i can be totally wrong

#

im still a noob

#

i was struggling with 1 last 1 aswell

#

last night

#

wtf..

winged badger
#

@late wharf is it a BP class, and if so is it loaded?

late wharf
#

yep, a Character Actor child class (custom, c++) is the parent of the BP. What do you mean by loaded? Possesed and on the world?

winged badger
#

No i mean if you are using soft asset pointer, you have to load it manually if itn not c+ร—

#

If any c++ or loaded BP class has a hard pointer to it, its loaded

late wharf
#

ah right. no, it's not a soft reference. It's an actor placed on the level. So no async loading of assets on demand involved

winged badger
#

Does it compile? The BP?

late wharf
#

yeah yep. It compiles and runs. No erros when PIE

winged badger
#

I have never seen an error so deep in network engine

#

Try duplicating the BP, then delete the originsl one, replacing references with the duplicate

#

Just to eliminste any BP serialization errors

late wharf
#

is not a problem of duplicating. This actors' comonent fails (it's the enemy base class, happens with different enemies)

winged badger
#

Blueprints occasionally break, i know of several ways to break then in ridiculous ways

#

And without a full callstack, i dont have any other ideas

#

Missing UPROPERTY on a reference might normally do it, but not for an Actor from the package

#

Anything that can decide to destroy it off game thread too

late wharf
#
ta.self!FDebug::CheckVerifyFailedImpl(const ANSICHAR* Expr, const ANSICHAR* File, const int Line, const TCHAR* Format, ...) Line 416 + 23 bytes    C++
     ta.self!UObject::GetArchetype() Line 172 + 52 bytes    C++
     ta.self!FObjectReplicator::InitWithObject(UObject* InObject, UNetConnection* InConnection, bool bUseDefaultState) Line 288 + 5 bytes    C++
     ta.self!UNetConnection::CreateReplicatorForNewActorChannel(UObject* Object) Line 2197    C++
     ta.self!UActorChannel::FindOrCreateReplicator(UObject* Obj, bool* bOutCreated) Line 3687    C++
>    ta.self!UActorChannel::ReplicateSubobject(UObject* Obj, FOutBunch& Bunch, const FReplicationFlags& RepFlags) Line 3776    C++
     ta.self!UAbilitySystemComponent::ReplicateSubobjects(UActorChannel* Channel, FOutBunch* Bunch, FReplicationFlags* RepFlags) Line 1458 + 8 bytes    C++
     ta.self!AActor::ReplicateSubobjects(UActorChannel* Channel, FOutBunch* Bunch, FReplicationFlags* RepFlags) Line 415 + 23 bytes    C++
     ta.self!UActorChannel::ReplicateActor() Line 2841    C++
     ta.self!UNetDriver::ServerReplicateActors_ProcessPrioritizedActors(UNetConnection* Connection, const TArray<FNetViewer,FDefaultAllocator>& ConnectionViewers, FActorPriority** PriorityActors, const int32 FinalSortedCount, int32& OutUpdated) Line 4005 + 5 bytes    C++
#
 ta.self!UNetDriver::ServerReplicateActors(float DeltaSeconds) Line 4365    C++
     ta.self!UNetDriver::TickFlush(float DeltaSeconds) Line 506 + 21 bytes    C++
     ta.self![Inline Function] TMemberFunctionCaller<UNetDriver,void(UNetDriver::*)(float)>::operator()<float&>(float& Args, float& __formal0) Line 156 + 27 bytes    C++
     ta.self![Inline Function] UE4Tuple_Private::TTupleImpl<TIntegerSequence<unsigned int>>::ApplyAfter<TMemberFunctionCaller<UNetDriver,void(UNetDriver::*)(float)>,float&>(TMemberFunctionCaller<UNetDriver,void(UNetDriver::*)(float)>&& Func, float& Args, TMemberFunctionCaller<UNetDriver,void(UNetDriver::*)(float)>&& __formal0, float& __formal1) Line 415    C++
     ta.self![Inline Function] TBaseUObjectMethodDelegateInstance<false,UNetDriver,TTypeWrapper<void>(float)>::Execute(float Params, float __formal0) Line 617    C++
     ta.self!TBaseUObjectMethodDelegateInstance<false,UNetDriver,void(float)>::ExecuteIfSafe(float Params) Line 677    C++
     ta.self!TBaseMulticastDelegate<void,float>::Broadcast(float Params) Line 977 + 16 bytes    C++
     ta.self!UWorld::Tick(enum ELevelTick TickType, float DeltaSeconds) Line 1721    C++
#

callstack of the problem

#

UPROPERTY() failing is a point to a component. Property is private marked as Transient

#

Actor is not being destroyed. It's an enemy, standing there in both, client and server

#

then replication fails and crash

#

with that callstack

#

ta.self!UObject::GetArchetype() Line 172 + 52 bytes C++
fails for

ta.self!UAbilitySystemComponent::ReplicateSubobjects(UActorChannel* Channel, FOutBunch* Bunch, FReplicationFlags* RepFlags) Line 1458 + 8 bytes    C++
#

when it tries to replicate the subojects

#

so... appart from that, I don't have much more information right now I'm afraid

limber wagon
#

Anybody messed with 4.23 yet and getting really weird behaviours with dedicated server checked with PIE? Not done an awful lot of testing yet but almost seems like HasAuthority() is failing for client1

#

As soon as dedicated server is unchecked, the HasAuth check completes without any errors

late wharf
#

My biggest knowledge hole about this is 'what is the archetype and why does it fail?'

winged badger
#

its a template for the object

#

thats why i asked you if the thing was loaded

#

show me the declaration of your component?

#

inside the header of the problematic Actor

late wharf
#

don't have the code right now (not at the pc) but classic CreateDefaultObject in constructor

brittle karma
#

i was testing what happens if i remove [bReplicateMovement = true;] from one of my classes and nothing happened . i was expecting some movement problems due to removing that code. what is the reason? both server and client can see the change of movement in that staticmesh

granite peak
#

hi all, how would I go about updating every player's UI from a non-player object?

For context I have a king of the hill control point where I want to update player ui on state changes/capture progress for all players.

#

i'm trying to iterate thru game state player arrays and calling each player's respective ui update function from there but it's only updating the server player's ui.

The function calls a client-only RPC within a widget blueprint

#

My assumption is i have to instead have the player controller call RPC events instead of the widget, since widgets are client only

granite peak
#

it seems my assumption was correct now that i've tried it out

cerulean escarp
#

how come when I'm in my editor or playing a level without dedicated server ticked, but when I tick the dedicated server box to test out the same level, the FPS goes from 120 in the editor to 34 in the actual game? this FPS drop only happens when playing on a dedicated server

#

also my game is made from blueprints if that has anything to do with the FPS drop

cedar finch
#

I'm trying to figure out the best way to replicate my weapon fire sound as well as the muzzle flash. Right now I just use a RPC but that caues issues for clients when they shoot because the sound is either delayed or doesn't play everytime. What should I do? Play the sound locally then try to RPC for others to hear?

cerulean escarp
#

@cedar finch could you screenshot the code that has the RPC?

cerulean escarp
#

hmmmm

#

ah

#

are the 'Reliable' boxes ticked for those RPC's?

cedar finch
#

Nope. Would that make a difference?

cerulean escarp
#

it might

cedar finch
#

I think I had them checked earlier but unchecked them. I'll give it another try though

cerulean escarp
#

it could also be something not triggering properly in the code that activates the RPC

#

that's my guess

cedar finch
#

It's in the fire bullet function and I tested that too because I was thinking the same thing. But my bullets were firing and hitting targets but the sound was being derpy.

#

It's mainly when a lot of stuff starts happening like tons of enemies attacking and lots of shooting from everyone in the game.

#

Is there a way to visually see how "optimized" your net code is while testing? Like a ping or something meter? I know listen servers can't use ping but I was just curious

cerulean escarp
#

yeah hang on lemme find exactly where the setting is to turn that on

#

@cedar finch in the editor press the down facing arrow next to the box that says 'Perspective' in the preview window, and press 'Show FPS' (shows FPS and ping in ms), and if you want more details like packet loss hover over the 'stat' button and go into 'advanced' or 'engine'

cedar finch
#

Nice! Thanks man. Will this show up in a packaged build?

cerulean escarp
#

nope, but you can press ~ to open the console and type 'stat' then you can type in FPS or packet or whatever you want to show

#

and np

#

optimizing sucks, I'm having major issues with dedicated servers right now

#

the lag just becomes insane (fps wise)

cedar finch
#

Ok cool I'll definately use that when I test again. Yea I don't like having to optimize lol I wish it would just work and be good to go. lol Oh well that'd be too easy

cerulean escarp
#

yeah and everyone always says blueprints aren't as efficient as c++

#

but idc cause I can write code in blueprints so much faster than c++

cedar finch
#

Yea I suck with c++ and other languages. I think it's because i'm a visual person so I just can't wrap my head around it. I also hate the syntax I usually fight tooth and nail trying to just get my crap to compile so I can run it

thin stratus
#

@cerulean escarp Don't mix up "BP aren't as efficient" and "working with BP isn't as efficient"

#

It's all fine if you don't run into high ms for your gamethread, but if you do and the code is already quite performant for BP standards, then C++ it is.

karmic briar
#

i think well balance blueprint and c++ code is necessary

thin stratus
#

We recently moved GameMode, GameState, PlayerState, Pawn, Controller and now also Weapons, Projectiles, and their managers.

#

All to c++, to save ms by optimizing the code even further in c++

indigo robin
#

hey are FName that are SomePrefix_Number also replicated fully as a string each time ?

pallid mesa
#

just a side note to what exi said, if you are getting a very bad performance with BP's is probably your fault. Use the profiler

brittle karma
#

i want to implement an overlapping event. fyi i have a Gun class and i want the Players to get the gun by overlapping it. its like an inventory system, any tips or code examples?

pallid mesa
#

@brittle karma

#

that project includes a very simple interaction and inventory system

#

so it might work as a starting point

brittle karma
#

@pallid mesa thank you so much, great help ๐Ÿ˜‰

somber glade
#

So..3D widgets in VR. Im running into an issue where clients can't use them because they aren't owners. LogNet: Warning: UNetDriver::ProcessRemoteFunction: No owning connection for actor BP_Top_Sliding_Door3. Function SetOpen will not be processed. LogNet: Warning: UNetDriver::ProcessRemoteFunction: No owning connection for actor BP_Top_Sliding_Door3. Function SetOpen will not be processed. is the only solution to wait to spawn them after the game starts and pass their PC as the owner when spawned?

chrome bay
#

What you probably want is some kind of interface for some interactable object, so the player controller can tell the server "I interacted with this thing", and then the server runs the functionality.

somber glade
#

I'm about half following you there.

#

It's been a long day at the end of a long two weeks haha.

#

I know how interfaces work. instead of buttons, I should put like 3D objects there? like cubes? and then subscribe them to an interface.

#

when the player does it's thing, it interacts and calls the function on the object, which can run as server and call to the doors to open up?

#

@chrome bay Just for fun..I set up a little function to get the client player controller and set him as the owner of the 3D widget. It actually works and the door opens.. for the client. oddly the server can't see it. Very interesting.

chrome bay
#

Well widgets are local, they're created locally and are owned by a local player or game instance whether they are 2D or 3D

#

So whenever you create a widget, that widget exists on that game instance only - so players won't see each others' widgets, they'll see their own.

#

The 3D Widget Component may exist, but the widget they render will be different and unrelated.

somber glade
#

So is there anyway I can put some magic on the buttons themselves to work this out? I've already got my players interacting with everything via a widget interaction componeont on the wrist

chrome bay
#

You may need to show a screeny or something so I can understand the setup fully

somber glade
#

no problem

#

The 3D widget is already in an actor and set before game starts. Because it has 8 variables for the 8 doors that are in the level. Those are set by a level designer.

chrome bay
#

But, RE opening a door - my advice is to create some kind of interaction component or interface which you can drop onto an actor. Client can then have a ServerInteractedWith(AActor* SomeActor); function in the player controller, and when they interact with say a door, they call that function with the door, the server can then decide to open or shut the door etc.

somber glade
#

the actor that holds them has the variables and on begin play it sets them on the widget

#

since the widget can't have defaults set

#

Controlling multiple sets of doors so that makes it more difficult

chrome bay
#

I think the main thing is the interaction setup, you can't call RPC's on actors you don't own as a player, but you can still pass them in as the arguments for another RPC

somber glade
#

That's what a function looks like on the widget.

#

These are what it calls to on the door

chrome bay
#

Yeah so that's what won't work. Unless the player 'owns' that door, that RPC will fail.

somber glade
#

They need to own the door, not the widget.

#

so if I set that player as the owner of the door it should work?

chrome bay
#

It would - but that has to be done on the Server, then another player can't interact with the door.

somber glade
#

that's fine

#

the doors are only controlled by one player

chrome bay
#

A better approach IMO is this

#

Make a Server function in the Player Controller, and have it take an actor reference. Call it something like "ProcessInteraction" or whatever. In the widget, get the owning player, and call that function on the door.

#

The Server can then decide whether the player is able to interact with the door, and open/close it accordingly etc.

somber glade
#

if I don't se the player as the owner of the widget, can i just get player controller 0 and cast to the PC?

chrome bay
#

Yeah I don't see why not if you're not doing split-screen

#

Although technically calling GetOwningPlayer should still return the local player

somber glade
#

nope, no split screen in VR

chrome bay
#

In theory anyway, I'm not sure how 3D widget components handle creation of the 2D widget.

somber glade
#

there is no where to obviously set the owner except to call it as a function that I can see

chrome bay
#

What i mean is I'm not sure if the widget component automatically creates the 2D widget proxy with the local player as the owner already, or if it just belongs to the game instance

#

Either way though without splitscreen getplayercontroller should be fine

somber glade
#

ah okay. I'll give that a shot and see what happens

chrome bay
#

But overall the advantage of this is that if later on you want to add like, a chest that players can open or something, you can reuse that functionality and just pass in the chest actor.

#

Then the server says "can they interact with this thing, if so do it"

#

And you don't have to have manage ownership etc, you just place interactable stuff in the world and it behaves accordingly

somber glade
#

@chrome bay You're a genius

#

it works

chrome bay
#

Wouldn't go that far ๐Ÿ˜„

pallid mesa
#

Did anyone explored how Timelines replication works under the hood?

somber glade
chrome bay
#

Yeah exactly

#

So from that point you could expand it and create some kind of "interaction component", then make the object your interacting with abstract to the player controller, and let the actor component or interface process the opening/closing etc.

#

Sky's the limit..

#

@pallid mesa I don't know if it's handled at all

#

They don't have any replicated properties anyway

somber glade
#

Yeah it's just a 3 v 1 game with the 1 controlling them. It doens't need to be too abstract

pallid mesa
#

if you checkout the BP node, you can set to "replicate" a timeline.

#

so is that just a "fake" property? ๐Ÿ˜„

chrome bay
#

Ah it's just getting that from the base Actor Component class

#

So while it would make the component replicated, they don't have any replicated properties

#

Timelines are weird, they actor components for some reason I don't fully understand

somber glade
#

how should I do the setup? My setup works like: Actor in the world has variables set by designer, begin play-> variables are copied from the actor to the widget, on the widget a function runs that opens 1 door in each pair. The doors seem to be open, but I sometimes see errors in the log

pallid mesa
#

I'm trying to get around my head over them, I find them highly useful to drive some motion over time, but I guess I should not just use them on production until I know exactly what these do under the hood

chrome bay
#

@pallid mesa they're literally just animated curves and that's about all they do. Networking wise there's no functionality there.

#

It's just a handy container for being able to get a curve value over time, rather than having to set it up manually

pallid mesa
#

yes, but that property confuses me, since what's the goal on replicating a timeline?

chrome bay
#

can't type today...

#

You can't replicate a timeline

pallid mesa
#

just to sync eventually the "float" value?

#

check out the top row

chrome bay
#

Oh that's new to me

#

In that case I have no idea

pallid mesa
#

that's new to me aswell

#

even tho I've been using the engine for some years now

#

I guess it's r&d time to avoid doing stupid things hehe

chrome bay
#

Oh ffs I found it

pallid mesa
#

oh you did

chrome bay
#

So it does have replicated properties as it turns out, I couldn't find it because of the old GENERATED_UCLASS_BODY macro

pallid mesa
#

๐Ÿ˜„

chrome bay
#

Okay yeah so they replicate whether the timeline is playing, it's play rate and current position

#

I can't imagine that replicates particularly smoothly though

#

Then when it replicates, they fire the corresponding output pin for that timeline with the replicated value

pallid mesa
#

interesting

#

so if I want to have let's say a door

#

synced with precision between clients, I should replicate it

chrome bay
#

i guess so.. although for me personally I'd rather just replicate a bool of the doors target state (e.g. open or closed) - and let the clients run the timeline locally

#

I can see it being horrendously jittery otherwise

#

It might not be that bad if the connection is okay though, or if the timeline is relatively short

#

Over long periods of time it might lose a bit of accuracy

pallid mesa
#

I'll test both approaches and empirically I'll choose what to do. I have a bool for late joiners and net cullers to update the memo anyways

chrome bay
#

Yeah just be sure to test with a bit of packet loss etc, in pie it'll probably be pretty smooth

somber glade
#

@pallid mesa if you want to replicate a timeline just do what I did

#

it works, it moves smoothly between client and server

high current
#

๐Ÿค” I have successfully used replicated timelines in 4.15, works as advertised, run a timeline on the server, and the update tick gets replicated to clients along with return values

pallid mesa
#

okay I'll try with some pktlost ๐Ÿ‘

chrome bay
#

But yeah check out Timeline.cpp if you wanna look at the details. Why they didn't call it TimelineComponent.cpp I don't know

pallid mesa
#

timeline.cpp?

somber glade
#

well okay not quite.

pallid mesa
#

out of the box?

somber glade
#

instant on the client. woops

pallid mesa
#

okay, thanks, good find ๐Ÿ˜„

somber glade
#

@pallid mesa do your timelines only replicate in one direction?

#

my door replicates the timeline going up, but when it's closed it doesn't.

#

it slides up slowly then instantly slams shut.

#

which seems really odd. Why would it work one way and not the other, that's both for client and server

high current
#

are you sure that you execute the reverse timeline from the server again

somber glade
#

yes

#

the timelines are copies of each other just in reverse

chrome bay
#

It looks like to work properly you only trigger the timeline server-side

#

The client receive the events to play/stop etc. and the direction

somber glade
#

It works going up, but not down, they're 2 different timelines

#

The sequence has 3 steps. First it stops the opposite timeline, then it calculates the position (in case the door is interrupted mid transfer) then it starts from that new position

#

the timelines go opposite directions

#

for both the client and server, they go up smoothly then slam closed

#

when told to close

high current
#

Too low res to see but is the opening and closing door set to multicast?

somber glade
#

never mind..

#

i fixed it

#

and yes

#

that was from testing

#

i was having issues with replication but those were finally solved

#

thejamsh got that solution

high current
#

If they are, do set then to server only

somber glade
#

Yes, I did thanks ๐Ÿ˜ƒ

#

they are working perfectly now

#

now one of the big outstanding issues is my CCTV monitor texture

#

I have CCTVs connected to monitors. They can be disabled with an emp blast. This should set the texture to a disabled black texture i have. It works on the host, the client sees the camera stop updating (it pans) but it doesn't turn black on the client.

high current
#

Did you try fixing that with RepNotifies?

somber glade
#

I did

#

and it didn't work

high current
#

๐Ÿค”

somber glade
#

I did make one tweak I need to test again

high current
#

What is your rep condition on that notify

somber glade
#

oh you know what..none haha

#

I'm new to rep notify

high current
#

It should be none

somber glade
#

oh okay then

high current
#

So you are fine

somber glade
#

I'm doing it perfectly

#

let me see if I can arrange another test, problem is I need a gun and my FPS test pawns don't have those

high current
#

If it doesnt currently work, i would go and look at how the monitor manager array is being changed

#

It might not be happwning on the server, thus changes to it are not replicated

somber glade
#

Yeah it isn't working right now. I rigged up a big capsule to turn off a camera. Let me get the updating stuff

#

A little background: Certain objects have an "EMP" interface. This gives them a couple functions one of which is "EMPReceive" in the case of the cameras it does the following:

#

Now this part works on both server and client, as the unit stops panning

#

next up he sets himself disabled, and makes sure he has a reference to his texture target (so that it can be put back when this is all done)

#

after that he gets the monitor manager from the CCTVmonitor (only 1 in the level) and starts to go through it looking for his entry

#

When he finds his entry he replaces his texture in the struct with the disabled one and keeps a reference to his position in the array and he sets the texture parameter on himself. Maybe that part needs to be multi?

#

I just tried adding a mulicast event to set that texture parameter, but that didn't work either, it doesn't turn black

unique kelp
#

Does anyone know what this actor named "BP" could be?

#

there is no actor by that name anywhere in my project

#

and the stats are very strange

#

could it just be an aggregate of many unaccounted for actors?

pallid mesa
#

@somber glade hey, I tried the approach where I call the timeline from the server replicating it, and you are right it only works when you play it normally

#

not when you do reverse it

somber glade
#

Yeah, so I just run two of them, it seems to be okay

hollow arrow
#

whats the max bandwidth and the recommended bandwith of a ue4 game?

pallid mesa
#

๐Ÿ‘€ I don't think that's an intended behaviour, gona fill a bug report

high current
#

@somber glade From looking the screenshots, it seems that either the replicated array, or the texture target variable isnt replicated properly, resulting in them not being equal for clients

quartz panther
#

can you for example have a timeline in your actor but call it for each client separately

high current
#

@pallid mesa run the open and close events on the server

pallid mesa
#

it's called on the server

high current
#

@quartz panther You can, but you might have mismatch due to ms lag and the driver wouldnt be aware of it so it will try to correct it (just speculating here), someone more experianced should confirm or deny this

#

@pallid mesa now you are multicasting

pallid mesa
#

exactly

high current
#

in your first screenshot the events werent replicating at all thats why I noted, soz

pallid mesa
#

when they join the netcll

#

exactly because begin overlap gets called already on the server and the client

#

so I don't need to do an RPC

#

the only thing you need to do to filter out clients is to add an authority check (as I did in the picture)

high current
#

right, I am blind...

pallid mesa
#

np ๐Ÿ˜„

somber glade
#

@high current Thanks, They're all set replicated.

high current
#

instead of relying on a check between two textures, why not have a bool which states ON/OFF

pallid mesa
#

okay I'm dumb. hehehehehe

#

so the replicated timelines were working erraticly because of my net update frequency

#

what I don't get is why it wouldn't work worse with my settings (once a second)

high current
#

wait

#

@pallid mesa do you actually have your timelines set to be replicated?

pallid mesa
#

You might be confused because I never said I have two types of doors for the sick of this experiment

#

Doors A: have a timeline replicated and I call this timeline from the server

#

Doors B: timeline is not replicated and I call the timeline from a multicast

#

The issue I was having with the doors working erraticly was is Doors A

#

the issue happened because on a previous iteration I decided to set the net update frequency to 1

#

and I forgot I made that change

high current
#

I just tested on an old MP project

pallid mesa
#

so I boosted up the net update frequency and the replicated timeline worked correctly

high current
#

both play and reverse worked on clients

pallid mesa
#

mhm, yeah that's expected

#

what happened is that I didn't realise that my net update frequency was set to 1.

high current
#

(:

#

rip spelling

#

also rip my internet as the gif is still uploading...

pallid mesa
#

don't worry there are no issues xD

high current
pallid mesa
#

it was just a missconfig on the cdo

high current
#

it happens

pallid mesa
#

yeah as I made a copy of the other door

#

for this one I'll just play with dormancy

late wharf
#

Anyone here had a problem where, when replicating components of an actor, the outer Private is null?

maiden vine
#

Can someone tell me the best way testing multiplayer when using number of players = 2 on Dedicated Server checked and the node Get player controller? Im having issues using client 2 because I dont actually have a 2nd Controller. example, Client 2 rolls a dice but Im getting client 1 information because I only have keyboard and mouse lol

#

also I have it setup with default pawn just controller problems

polar tide
#

I would suggest reading through EXI's network compendium. Should lead you in the right direction.

maiden vine
#

I have read the pdf and I'm also aware of the widget's get owning player controller. Should I stick with that Im lost

#

I just didnt want to package everytime lol

polar tide
#

Are you updating UI via GetPlayerController?

maiden vine
#

I use Owning but it seems the same

polar tide
#

If you are updating stuff in the character blueprint to the controller, you should use "GetController" ->(CastToYourController to get the reference) and use "is locally controlled" to check to define if its the local player . Of course that depends how your project is setup.

#

As for testing Dedicated server with 2 players not sure i quite understand your problem. Do you want to run 2 standalone versions of the game through editor?

maiden vine
#

I guess is Locally controlled would do the trick and yep on testing in editor 2 clients

#

Thx for the help Sam

fierce grove
#

anyone has implemented AddImpulse for jump (I'm using a Pawn) and replicated it? I have trouble to replicate it properly ๐Ÿ˜ƒ

#

or should I remake my own custom jump?

fleet raven
#

normally you don't replicate the impulse but just the position/velocity

fierce grove
#

my transform and jumpforce are replicated

#

but the smulated proxy looks terrible

#

laggish

polar tide
#

@maiden vine theres away to get 2 (or more) standalone windows open at the same time through the editor. The functionality is hidden under "use single process" in the settings. Un check that, set the player count, window size etc. Recheck the "use single process" setting. Now you should be able to run several standalone windows in editor

fleet raven
#

could check out how the movement interpolation for characters works as an example

polar tide
#

All movement related stuff should be done in the custom charactermovement component if you want smooth predicted movement.

maiden vine
#

I got it working I routed the widget controller throughout my custom events bingo sometimes I need to talk it out. And yea that is how I run 2 clients thx all I'm moving along now great

#

๐Ÿ˜€

#

I had a barrier to allow 1 client through and it would always let all clients through but Not now haha

#

๐Ÿ‘Œ

fierce grove
#

trying to just adding a Z vector with set netactorlocation and a lerp

chrome bay
#

Character Movement has a "Launch Character" function

fierce grove
#

I'm on a special setting 3D planet so it's not recommended for me to use character movement

polar tide
#

The only things that work "out of the box" with network prediction in the charmovement comp is crouch and jump. Everything else needs a replicated flag and custom code in c++ if im not mistaken.

west mason
#

Does anyone have charactermovement working properly on Android?
We're having massive choppiness issues, and they seem to replicate even on basic ThirdPersonCharacter template

crude sparrow
#

Hi there, I'm having some network failure (log below) and I am new to multiplayer so I'm not catching everything here.
I think it might be because this specific line appears like a thousand times before crashing :
[2019.07.19-14.22.31:495][ 40]LogHandshake: Ignoring restart handshake request, due to < 10 seconds since last handshake.

timber garnet
#

Can you override a replicated function in Blueprint? Doesn't seem to be working. ie BaseWeapon has a replicated fire function, which then calls SpawnProjectile. But SpawnProjectile should be implemented by the base class ie AssaultRifle, RocketLauncher, etc where the subclass has its own implementation. Again though, the replication fails when I override the replicated function

ebon nimbus
#

If anyone has time I've run into an issue with a spawned projectile having different rotations on the client vs server

#

the actual cast ability event is ran on the server

#

there a line trace at the starting half of this function

#

line trace from the clients pov

#

client's line trace from the server's point of view

sour river
#

Does a UE Dedicated Server running on Linux require a GPU at all?

fleet raven
#

no

#

that's the point of a dedicated server

high current
#

@ebon nimbus looks like your pawn's camera rotation isn't replicated, try clicking od the FP camera component, and set it to replicate

#

quite uselessly expensive, but if that works then we can find a cheaper solution

ebon nimbus
#

i have that adjusting the aimoffset animations

#

as for the FP Camera I do have the component replicates ticked

#

I also tried promoting the output of the Find Look at Rotation node into a replicated variable but saw no difference

#

@high current

high current
#

are you sure that you tried with the forward vector of the camera

#

by the looks of it, that is what's causing the issue here

ebon nimbus
#

i will double check

#

so if i add a replicated rotation variable that is gotten from the impact point generated by a line trace

#

that uses the FP Camera's location and location + forward vector for its start and end points

#

it doesnt change anything

#

but it has to be value not getting set somewhere in the pipeline

#

this function is called within an event thats run on the server and then multicasted

#

as shown in the earlier screen grabs

#

whats crazy is that the rotation does change on the client

#

but its like its clamped or reduced

high current
#

you can print string the rotation, and check in the log if it matches

#

you dont need the look at rotation, you just need the forward vector to be correct

ornate crescent
#

Hi, i have question, i want to know the Game state of the play (the GameMode state (inProgress for example)) I know the gamemode exist only in server (online game)

#

i get in the client the GameState and try to get the state of the game, is possible?

copper grove
#

on post login im taking a newly created controller(new player), and with advanced sessions getting player name and setting it on a widget actor (which is set to net load on client) which sets up the name above the player... im wondering, is this going to work, will newly added players see those widget actors that were previously created? and do i need to set ownership on those widget actors?

#

i figure since the server is spawning these actors

#

it will work

#

and that i dont need to set owner, since its the server doing all of this anyways... am i wrong

#

im going to test in a few over 2 steam accounts but just wondering if anyone spots anything wrong

ebon nimbus
#

@high current the forward vectors do match when comparing the client and server values across all windows

#

but they are different from each other

#

so i will get that across all screens

#

as to where if i go a little further along in that function and look at the rotation its just printing for the server

copper grove
#

@ebon nimbus i see the line trace hit location on the server is going to 0

#

probably meaning the server is not getting that value

#

since it points to the floor (which is most likely 0 z)

ebon nimbus
#

scratch that last pic i left out a print string

#

How would it be hitting the floor AND drawing the line trace?

ornate crescent
#

in offline mode, the client can't access to the gamestate?

copper grove
#

the end point @ebon nimbus on the client is correct, but on the server, its not.. you can see it hits the floor which is at 0.. meaning that end point is null on the server and thus returning 0

#

what the other guy said

#

you dont seem to be replicating the cameras rotation

#

therefore it knows the start location

#

but not the rotation that the client is using

ebon nimbus
#

I'll get to searching on how to do that because im at a loss how I am currently not doing it.

copper grove
#

one idea is you dont need to run the line trace on the server, if you trust the client to do it he can just feed the value of the start and end locations to the server .. im not worried about cheating in my arch viz though , but thats literally what i do, run a line trace and just feed the server the start and end points for a laser beam

high current
#

@ornate crescent game state and game mode shoupd both be accesable in offlind mode, as offline its the server playing...

#

@ebon nimbus why the get socket location node

#

Why do you need that specific location

ebon nimbus
#

@high current I'm just trying to spawn a spell out of the player's hand

copper grove
#

can someone help me, my thing didnt work, it seems like the newly joining players dont see the previous name actors

#

only the previous players see the new players names that just joined

#

i guess i need to set it to replicates probably

#

here goes another 30 minutes build (and deploy to another machine) process

ebon nimbus
#

yeah its where i want to shoot from

#

replacing it with the actor's location ends with the same result

high current
#

yeah, sorry bad internet re-pastes my msgs

#

anyway, it is still the forward vector's issue

#

did you try setting the camera s a replicated component?

ebon nimbus
#

yeah its been clicked this whole time

high current
#

btw the event executes on the server right?

ebon nimbus
#

yes, specifically a multicast event called from an event that runs on the server

#

Im about to the point of just trying to find someone to pay for a hour to look at the code, find the problem, and then explain it to me. It would be a better way to spend my time than burning all my free time looking for some kind of actual lesson plan or learning tools

copper grove
#

well setting it to replicate did make it appear

#

but the actual player's name did not replicate from the existing player

#

to the new player that just joined

#

it was still the default value

#

ive now set player name to replicate, so maybe thats it

hollow stirrup
#

@copper grove The reason the new players don't see the previous players is because they were handled before the new players joined. You need to update the player list on everyone's machine when they join.

copper grove
#

yeah thats what im going to do now @hollow stirrup (but its also not a player list, its an actor that is set to replicate, with the name of the player above him). and its spawned by the server set to net load on clients, so i dont understand why when it net loads it doesnt update the name...

#

will this do it?

#

so it will run after every new player gets spawned by the game mode

high current
#

@ebon nimbus I would suggest moving the linetrace start and end vector code, before the replicated events, and pass them as references(trough the custom events) to the line trace, that way you can make sure that you are just sending the proper info to everyone

cerulean escarp
#

anyone know why my map only has FPS lag when running on a dedicated server? I checked some other levels that I have and they don't have any FPS lag. in the editor it shows 120 FPS and when I play the map is shows around 34 FPS with constant stuttering

high current
#

use the profiler tools, figure out what exactly is causing this low fps

cerulean escarp
#

k

#

it seems to have magically fixed itself

#

nvm

#

I wasn't running a dedicated server damnit

#

is there a way to stop meshes from being draw called on certain clients? right now my client is rendering an excess amount of meshes while running on a dedicated server but in singleplayer the mesh draw call count is a ton lower

high current
#

are you sure that you arent simulating 2 or more players, their windows might be in the background

earnest trail
#

it could b that its being spawned repeatedly by every player instance

cerulean escarp
#

I'm certain only one player is being simulated

#

what could be spawning repeatedly?

#

the meshes?

earnest trail
#

yea cus u mentioned excess amounts of meshes

cerulean escarp
#

well they're all foliage

#

so they shouldn't be respawning

#

or spawning repeatedly

earnest trail
#

ive only just started messing with multiplayer so i cant say much haha, lets wait for an expert to chime in

harsh lintel
#

where's a good place to do asset loading? player state class? pawn class? controller?

high current
#

never tackled it, but it would make sense for it to be in the player controller, as its something which happens client-side

cerulean escarp
#

is that for me?

high current
#

for @harsh lintel

cerulean escarp
#

oh

high current
#

@cerulean escarp in the editor settings, under play, there is an option called use single process

#

try to untick that and try to play again, it will take time and probably start a console version on the server

#

But generally, PIE dedicated testing will be laggier than non dedi, as it runs the game twice

#

albiet not with 2 viewports, but still

cerulean escarp
#

it worked!

#

ohhh so when I had that ticked, the dedicated server was running the entire game instead of just the non-graphical backbone stuff?

high current
#

no, but because they are on the same process, my guess is their cpu management is less than ideal...

cerulean escarp
#

ah

high current
#

idk havent exactly read about it, there is a bunch of ue4 optimizations going on in both versions

#

but using separate process-es is how your players will play the game...

cerulean escarp
#

k

fluid flower
#

and what the STEAMGAMDIR one should be?

hollow arrow
#

whats the max bandwidth and the recommended bandwith of a ue4 game?

chrome bay
#

as low as possible is always gonna be the answer

#

Depends on the game, but really 1-2mbp/s is about the maximum you'll be able to hit

#

But you shouldn't be hitting that

high current
#

run a few playtests and average out the bandwidth usage, then but like 10-30% buffer on top of it

shrewd frigate
#

Hello...

#

Has anyone ever had issues with adding a card for payment on Amazon aws console? I tried to activate my account for gamelift but it won't work.

next warren
#

is this correct procedure for nitro effect in multiplayer i m not having much confident whether is this correct procedure or not

#

any suggestion friends...

next warren
spark wadi
#

How do I transfer location vector variable from Client's Pawn to Server's Player Controller? I'm making a fighting game and camera actor created on server cannot see the server's pawn on the client.

#

I Want to all character location variables to be distributed between both server and a client

high current
#

If your character pawns are set to be replicated with movement, every client and the server should have the correct locations

ebon nimbus
#

@high current @hollow stirrup @copper grove Ended up swapping the line trace start and end from the camera location/forward vector to actor location and control rotation. Which solved the issue. Thanks for your guys input to help get me over the hurdle!

spark wadi
#

@high current how do i get the location? If i try using โ€œget actor locationโ€ on the serverโ€™s pawn it returns 0.0.0.

#

On client

high current
#

Are you seeing the pawn correctly in game

#

If you are seeing it via different clients correctly, then perhaps you are getting the actor location from the wrong blueprint?

#

Screenshots always help

wheat eagle
#

hello I'm having trouble with setting a character's component to 0 as default. When the character is first spawned, a player posseses it and the visibility of a component inside it is set to 0 as I specify in the class properties. Then, to respawn the player, I destroy that character, spawn a new one of the same class and make the player posses it. The problem is that after this happens that component's visibility is set to true. If I am trying to manually set it in beginplay, it will only work on the server and not on the clients. I've tried multiple combinations with server and multicast fuctions. What should I do?

high current
#

Unless you have authoroty switches on begin play, it should work

#

Another option you can try is to set that variable as instance editable and exposed on spawn

#

That way you can modify it as you spawn the character with the spawn actor from class node

limber mortar
#

All right, worked all week at the real job, and now I finally get to take a stab at setting up my vehicles in a client authoritative model!

#

oops

#

nevermind

#

put a screen shot of the blueprint ๐Ÿ˜„

#

Oh sweet, I just figured out how to add latency and such into my PIE simulation, I bet this lets me recreate my problem!

#

It is hard troubleshooting stuff when you can't recreate it in UE4 ๐Ÿ˜„

limber mortar
#

actually I think I can add lag via the console

high current
#

yeah you can add via the console, but it will be only active for the current pie sumulation, if you want it to work every time you hit play, then defaultengine is your answer

#

and you only need to plug that in for the one in FirebreakStrikeTeam/Config, the rest should auto generate with the new lines afaik

limber mortar
#

Thanks partner!

limber mortar
#

lol, I feel so silly, I see the path in those is saved ๐Ÿ˜ƒ

#

slap, I've worked too much this week

limber mortar
#

well, I played around with a combinations of settings and couldn't recreate my vehicle snapping

#

but I know they do it

#

I'll mess with it more after lunch

glad sedge
#

Calling Client_ on the server doesn't necessarily mean it'll play on a player's machine, right? It just means it'll play it on the local machine.

fossil spoke
#

Depends on the context of the call

glad sedge
#

I'm on playercontroller, it's running on server, but I'm calling a Client_ call on a pawn

#

Which means it's just updating the servers version of that pawn?

fossil spoke
#

So the pawn is RPCing to the Server?

#

If so then yes.

#

That RPC is being called on the Servers version of that Pawn.

#

Assuming the RPC is allowed through, so long as the Pawn has a NetOwningConnection.

glad sedge
#

Hmm okay. So I gotta get back to the client's version of the pawn for some local stuff. I could either make a NetMulti call from the Server's version of the playercontroller to update the pawn, or make a NetMulti directly to the server's version of the pawn.

fossil spoke
#

Or use a Replicated variable set to OwnerOnly.

#

Favor Replication over RPCs

#

RPCs dont preserve state, Replication does.

#

Unless you manage modifying that state correctly yourself.

glad sedge
#

Yeah okay, that makes sense.

umbral adder
vestal thistle
#

Hello there everybody! Does anybody here do Multiplayer blueprint tutoring?

viral raft
#

@umbral adder I was also thinking about a sequence. Dunno. Fortnite does magic stuft

#

Like updating the map in an event

#

@next warren does your nitro work?

#

On client for example

umbral adder
#

๐Ÿค”

high current
#

They will probably flex with a new UE tool which we will get in like 4.24 or something

umbral adder
#

yeah mabye...

high current
#

Call it like

#

'World Event Scheduler'

#

Or some stuff

viral raft
#

Fortnite event generator

#

When doing add force. should I execute on server only or also on the client

next warren
#

@viral raft yes its working

high current
#

If that is on a character with replicated movement

#

Adding it on the server should replicate, as in the location changes get carried

#

If you are adding it on the client as well, and you dont have a client-auth model, it might result in some desync

hollow bridge
#

Hi guys, do I need to verify every parameter I get in a server func for security?

#

I have a "place structure" server func that gets a transform. it's pretty annoying to verify that: 1. its not overlapping with other buildings, 2. the character is close to the location 3. it's not in the air or underground etc..

viral raft
#

@high current But if I add force on the server only it gets a bit jittery at 50ms I thought. So should I add client too?

high current
#

You can try, but the thing is that physics calculations are never the same on 2 machines, therefore event at perfect sync between server and client(which is impossible) 2 identical physics inputs can lead to different outcomes