#multiplayer

1 messages · Page 705 of 1

severe nymph
#

if your so good you should know what the default jumploop anim looks like

#

again

#

have a great day

winged badger
#

to be fair here, i did feel you were wasting my time too

#

so lets call it here

severe nymph
#

btw .... just for your info. You might want to reconsider this advice.

#

in VR your going to use navmesh for teleport and for "responsiveness" you'll want to project the arc and get the navdata pathfinding point on the client. Make no sense to request the server to do this and wait for latency to return and teleport. Same would go for top down click to move. Yeah you could return server info but cpp will show that even cmc does server correction for client inputs and client received info.

#

Just bad advice

winged badger
#

you can use navmesh for nav projections and pathfinding just fine without actually walking on it

#

so that point is moot

severe nymph
#

My point is you want client navigation on

#

To get that info on the client

#

Again if you read

winged badger
#

also doesn't matter

severe nymph
#

Instead of assuming

winged badger
#

im sorry, im tired of this, your comunication skills are on bluieprint weekend warrior level

severe nymph
#

Yeah whatever works for your ego bud

#

👍🏼

severe nymph
# winged badger im sorry, im tired of this, your comunication skills are on bluieprint weekend w...

My only advice here is that if your going to spend time helping then you should be able to help and be patient with all skill levels. It’s cool if you want to assume “my skill level as blueprint weekend warrior” but I’ve helped people who have opened the engine for the first time all the way to ppl who make weekly pull request to source. Might want to reconsider your stance on hanging out in slack “trying to help” if the best you can do is care about “yourself” if you need to reassure yourself by breaking down “blueprint warriors” you might want to find a different way to keep your self confidence in order

#

This is coming from experience with leading teams …. Helping others has nothing to do with you or the gap between you and them. If you recognize it then you close it and empower them. Not beat them down every step of the way.

#

Have a good weekend buddy ❤️

pallid mesa
#

Hello! Anyone can provide any information about this?

severe nymph
#

@pallid mesa the way this is usually solved is by spawning a fake client copy

pallid mesa
#

I'm steps ahead from that

severe nymph
#

On the server you can usually not rep

#

And multicast

#

For all but owner

#

Since it’s a bullet

#

Actor and Movement rep isn’t as clean as a multicast spawn

pallid mesa
#

I need synched projectiles in my clients, so not an option to not rep movement

severe nymph
#

Server handles prediction logic anyway

pallid mesa
#

correct and it needs to be brought to the clients, through movement replication (not event driven atm)

severe nymph
#

From cmc of client to projectile movement correction

pallid mesa
#

??

severe nymph
#

what I'm saying is when you multicast the spawn of a projectile movement component from an owning client "even with the projectile not replicated" the server itself spawns a copy at its interpreted corrected vector

#

the server handles damage events based on that

#

the client will spawn a dummy local imediately

#

before the rpc to server -> muticast call

pallid mesa
#

that will desync

severe nymph
#

nope

pallid mesa
#

yes it will uno

severe nymph
#

it will be very very very close

pallid mesa
#

correct

#

and if it bounces

#

shit hits the fan

severe nymph
#

nope

#

I have grenade launcher logic setup this way

#

with bounce

#

and rpgs

pallid mesa
#

correct if you don't care about synced projectile movement server->client

#

that's fine

#

your simulation will be representative in your clients

#

but not equal

#

I'm looking after solving a very specific problem

severe nymph
#

I understand

pallid mesa
#

which is the halt in the spawn

#

which is caused by a low net update frequency in the projectile

#

so the interpolation kicks in late

severe nymph
#

the halt at spawn is the "server copy" that your client is seeing

pallid mesa
#

correct

severe nymph
#

yes but if you do what I say and debug through it might help you understand

pallid mesa
#

i understand it already x'D

#

I'm looking for a non-intrusive solution so when the projectile replicates initially

#

and it doesn't have enough data for interpolation

#

I can see it moving

#

my current solution is to enable simulation until rep data kicks in - which works but...

#

I find it a bit unelegant

#

just think that replicating movement and interpolating is a requirement imposed by a major authority

#

which you cannot change

#

so it's an imposed constraint which invalidates any of the poposed to find a solution to this problem

severe nymph
#

what I'm saying is if you set rep to false on the projectile. The projectile movement component from the local client copy will fire locally at the time the server multicast is called. The multicast tells everyone "other than owner" to fire the projectile with "the server's corrected" vector. Without rep on the actor movement it won't "jitter" or spawn late for clients. The server has authority and will make these calcs anyways. The client "is never correct" but because the server knows the CMC movement prediction and the projectile movement prediction the "client fake projectile" will be better even with high net pkt lag testing "vs" manually rpcing this from the client replicated actor

pallid mesa
#

that's not why it jitters

#

also there is no cmc implied in the formula

severe nymph
#

1 sec

#

the cmc comes from your character

pallid mesa
#

correct, you suggest me to do what UT4 does, right?

severe nymph
#

it feeds the transform of the client on the time of firing

#

just 1 sec

pallid mesa
#

you are suggesting pure prediction without corrections, I'm doing early local prediction + corrections

severe nymph
#

1 more sec

#

please

#

just 1 ssec

#

I'm making a gif real quick and if you want I can jump in a chat and explain this alot better than typing out paragraphs

pallid mesa
#

I feel you are solving a different problem to the one I'm asking

severe nymph
#

its the same problem

#

I promise

pallid mesa
#

I don't think so because you are ruling out corrections

severe nymph
#

I'm not

pallid mesa
#

ah so the local player will receive corrections to its own projectile from the server

severe nymph
#

its just your looking at it without understanding fully what the projectile movement component combined with client corrected cmc does

pallid mesa
#

the cmc only interacts in the spawning side of the projectile

#

not inflight

severe nymph
#

trying to get my gif size down

#

1 sec

#

@pallid mesa by the time its in flight it doesn't matter?

#

the velocity is set

pallid mesa
#

it does!

severe nymph
#

the arc is set

pallid mesa
#

for me it does

#

that's all I care

severe nymph
pallid mesa
#

because i have things in server that don't exist in the client

severe nymph
#

here is 2 clients

#

look at the landing location on both

#

look at the fire response on the local client

pallid mesa
#

yes yes I know, it's pretty sensitive, I got this working aswell

severe nymph
#

doesn't matter if your in full sprint

pallid mesa
#

yes I have this same thing implemented

severe nymph
#

but my projectile doesn't spawn late

#

it doensn't jitter

#

it doesn't "correct"

pallid mesa
#

mine either when I do prediction 😄

#

but in this case

#

the constraint is different

#

you need to understand that

#

imagine this uno

severe nymph
#

I'm not ruling out I may not understand your use case 🙂

pallid mesa
#

the server projectile sees a different world

#

than the client projectile

#

however the client projectile should adapt to what the server is seeing

#

"how does that make any sense?"

#

haha it doesn't, it's my use case!

severe nymph
#

ok wait 1 second

#

because this is very important

#

are you wanting server authority prediction

#

or are you wanting to force client

#

because forcing client will desync the other way

pallid mesa
#

in this case is server authority without prediction

severe nymph
#

ok then please

#

understand

pallid mesa
#

understand what

#

😄

severe nymph
#

CMC predicts the client location of the sim proxy at the time the rpc is called

pallid mesa
#

yes I know that hahaha

#

but that doesn't solve anything of what I asked

severe nymph
#

the projectile movement component calcs velocity and all vector and physics data based on CMC and the projectile component corrected values

pallid mesa
#

it's cool to explain here how cmc can help in projectile prediction!

#

people will find it interesting

#

but not my use case- unfurtunately

severe nymph
#

because the world vector is based on the corrected server location

pallid mesa
#

when I say that my client sees a different world

#

I mean a totally different world

severe nymph
#

then I'm sorry

pallid mesa
#

boxes around

#

etc...

severe nymph
#

in that case you have to use client authority all together

#

and treat the server as another client

pallid mesa
#

that's not my use case uno :(

#

i want the clients to see the path the server projectile does

#

because the server projectile will bounce around boxes

#

that aren't there in the client

#

you see? it's a very silly use case

severe nymph
#

I have simulated proxies that aren't replicated in my world

#

boxes

#

if my client copy hits the box

#

you want to see what happens?

pallid mesa
#

nothing should happen in my use case

#

because the client projectile should do what the server says

#

so the projectile should go through client boxes

#

if they are not there in the server instance

#

you understand? @severe nymph

#

because the use case is quite peculiar

#

it doesn't make sense in terms of game design or whatever

severe nymph
#

1 second

#

another gif coming

#

just to show you how to achieve that

pallid mesa
#

I have that working

#

the problem is that my projectiles have a slow net update frequency and they don't get the data in time for interpolation

severe nymph
pallid mesa
#

yes server authorative with corrections

#

😄

severe nymph
#

again I feel I may just not be explaining correctly

pallid mesa
#

so projectile movement is server authorative and the client version of the projectile moves based on the server projectile

severe nymph
#

with the method I'm telling you this is exactly what you'll get

#

with the need to re-invent the wheel

pallid mesa
#

which method are you telling me?

#

x'D

severe nymph
#

Two clients

#

Two different worlds

#

instant spawn

#

server authority corrected

#

1 client sees it bounce back

#

the rest see what the server says

#

damage is only applied based on "what the server says"

#

as radial damage

pallid mesa
#

yes idc about damage at all

severe nymph
#

again

#

trust your cmc

#

and your projectile component

pallid mesa
#

so how do you get the projectile to bounce back?

#

in the client?

severe nymph
#

multicast and fire local

pallid mesa
#

multicast what

severe nymph
#

the bounce back is the dummy

#

the projectile

#

do not rep it

pallid mesa
#

forget about spawning

#

how does the projectile bounce back in your client?

#

u send the correction from server to client?

severe nymph
#

spawn local -> rpc -> multicast (skipping owner)

#

no rep

#

trust your server

pallid mesa
#

so how does your client see the bounce back?

#

of the bullet

severe nymph
#

because its the client dummy

#

please take a breath

#

and listen

pallid mesa
#

the client dummy has no knowledge of the box

severe nymph
#

spawn local -> rpc -> multicast (skipping owner)

#

the client has the box

#

the server doesn't

#

the other clients don't

#

so the server doesn't bounce it back for everyone

#

the client copy bounces back

pallid mesa
#

yeah that's not what I want

severe nymph
#

if the server had the box

pallid mesa
#

i want ONLY the server to have the box

severe nymph
#

it would be bounce back

#

for everyone but the local client

#

dealing damage

pallid mesa
#

yes but I want it to bounce back in the local client

severe nymph
#

but the client would only see that if you "correct" on server bounce

#

not on fire

pallid mesa
#

correct, so you are suggesting event driven corrections

severe nymph
#

correct

pallid mesa
#

which is something on my todo list

#

but first...

#

use case: the corrections are done on a net update frequency basis with a replicated projectile and movement

#

with a replicated projectile

severe nymph
#

Your never going to get smooth firing or correcting with a "net frequency" updated projectile without a dummy client copy

pallid mesa
#

there is interpolation functionality in the pmc

#

you can set it up and it works really well!

#

look:

severe nymph
#

yes but its very very sluggish and honestly I don't care for it

pallid mesa
#

well I do!

#

I'm sorry uno you don't but this is extremely relevant for me

severe nymph
#

I understand

#

but I have penetration and event driven correction because it feels better for the client vs a movement repped projectile

pallid mesa
#

yes I agree

#

definitively!

severe nymph
#

i don't like the jitters or the late spawning

pallid mesa
#

that'd be what I'd go for

#

but I need to do this proper using said approach

severe nymph
#

and I also don't like the bandwidth consumption for 50 clients shooting grenades

pallid mesa
#

yes!

#

correct

severe nymph
#

with a fully repped actor

pallid mesa
#

bad for bandwitdh!

#

mhm, totally agree!

#

we both are in the wave

#

but uno, understand that this is a specific example

#

a specific use case

severe nymph
#

I get it 🙂

#

no worries

pallid mesa
#

still you provided some cool info

#

im pretty sure others will appreciate it

#

I already knew it hehe, but I'm working on something which requires me to explore all of this

#

cons/pros/gotchas

severe nymph
#

yeah cool deal 🙂

#

at the end of the day its all about what you want to do

pallid mesa
#

so do you think enabling simulation until netupdate data kicks in is not that unelegant?

severe nymph
#

you can always sync on the owning client with everyone else suffering

#

or sync on the server spreading the love so to speak

#

its all up to you

pallid mesa
#

yes , really it is

severe nymph
#

issues really come down to giving the client too much power

pallid mesa
#

but I'm annoyed by the fact that I have to add a timer every time I spawn a projectile

#

x'D

severe nymph
#

if you trust them fully overriding server vectors

#

you end up like rust

#

I just let the server cmc and projectile movement component work off its "multicasted corrected vectors"

#

and leave it be

pallid mesa
#

yes that's essentially the best solution from the ones explored

severe nymph
#

if the client dummy bounces off a box that is simulated out of sync

#

then its just their prob

#

I don't make it everyone elses

#

the best solution here is to keep movement rep on with dynamic world objects

#

so the sim proxy updates loc

#

but with all the clients and all the stuff going on ... I break that rule

#

I want more simulated explosions without the overhead

#

so i let the client just deal with them

pallid mesa
#

the cool thing is that you can predict explosions and whatnot

#

in your client version pellet

severe nymph
#

my project "in this example" is still ue4.24

#

lol

#

I could turn the net freq way down on the simulated actors

#

or control them better manually

#

just hasn't been a big enough deal yet

pallid mesa
#

I think that my solution is what I'd need to do, but rather than a timer... an acknowledgment of data

severe nymph
#

i got hundreds of mags, guns, weapons, ai

#

so i need every byte i can save

#

lol

#

can run 25 players on most listen server sessions .... so I'm not hurting too bad 😛

#

but dedicated 50+ starts hurting haha

#

mainly tick updates honestly

pallid mesa
#

use the profiler

#

kekw

severe nymph
#

yeah i do

#

frontend

pallid mesa
#

hahahahaha

severe nymph
#

and profiler

#

its a VR project

#

damn controllers, hmd, finger tracking

pallid mesa
#

ayy anyways uno, I'm sorry for losing your time with my crazy examples

#

that's usually how it goes with me I come with "non-sensical" use cases

severe nymph
#

i do alot of float to byte compression

#

pack them in netquants

#

etc

#

every little bit helps

#

haha

#

yeah no worries at all

#

was fun stretching my brain for a few

pallid mesa
#

"what does he mean"

severe nymph
#

honestly the best way to learn is by helping

#

understanding others issues

pallid mesa
#

yes, so look at this interpolation thing

#

🤣

severe nymph
#

honestly.. its more common than you think

pallid mesa
#

yes I know

#

i just learned that it existed recently!

severe nymph
#

everyone is trying to do velocity/loc prediction at some time or another

pallid mesa
#

most of the times you can do it event driven

severe nymph
#

if you really want to understand it in engine

#

go make a ping pong game

#

🤣

#

let me know how that goes

pallid mesa
#

lmao yeah in that case it'd make more sense

severe nymph
#

don't ever let someone say "your better off making an easy multiplayer game like pong"

#

lies!

pallid mesa
#

actually I will mutate the use case to be something more sensical cause i think people will understand

#

a ping pong will do

severe nymph
#

but honestly

#

its how i came up with the event based correction

#

get owner impulse vector

#

get owning client latency

#

calc the reflection

#

send the correction over "x number of frames" rpc into the server copy

#

can use serialization if you want

pallid mesa
#

mhm

#

still thinking about a use case in which the one I mentioned

#

would make more sense and I think it would depend on having a system such that the server generates random events

severe nymph
#

very much so

pallid mesa
#

event driven is almost impossible unless you have the events generated in the client aswell

#

so this thing might become handy in said use case

severe nymph
#

the event comes from the client

#

if your wanting client auth correction

pallid mesa
#

nono server corrects client version

#

the one I mentioned

severe nymph
#

if you want to correct the client dummy then you get the server copy and correct into the client proxy

pallid mesa
#

so a random stream of data that the server does

severe nymph
#

over x number of frames

#

after impact

pallid mesa
#

and replicating the projectile would make more sense, since the amount of rpc's wouldn't make much sense in such case

severe nymph
#

you can rep it

#

just not movement

#

you need to actually rep it

#

to event correct it

pallid mesa
#

nono just saying that in this case replicating movement would make sense

#

since the stream of rpc's would be incredible

#

i mean you can batch them

#

but the netupdate freq does that already

#

so no need to rpc complexity

severe nymph
#

yeah you might just control the net freq throttle

#

on the event

pallid mesa
#

yes

#

but since its a random stream stream...

#

you can determine a fixed step

#

and replication will handle the rest

severe nymph
#

ue5 will actually have a better solution for this

#

but yes

pallid mesa
#

you think so?

severe nymph
#

yes because chaos already has support for fixed step

#

according to the last couple of source pulls i saw

pallid mesa
#

ah yes, chaos... didn't even think about physics lol

#

still net prediction plugin is paralysed

#

so might need some heavy work in there unless things are done easy by default

severe nymph
#

haha

#

when has anything ue not been "heavy work"

#

I mean the basics for everything is there

#

its a great engine

#

but for anything substantial

#

it takes a bit of ingenuity

dark edge
#

Predicted physics is, like, THE hardest prediction to do

severe nymph
#

oh yea

#

agree with you there

dark edge
#

I have a physics project but it doesn't need prediction. Way easier.

#

Watch the GDC on what it took to get Rocket League working.

severe nymph
#

right now my issue is

#

networked "remote controlled" actors

#

the closest I've seen ue4 have anything is the fortnite "fake posession" vehicles

#

but even then it doesn't allow you to control/posess it while having a physical controller

#

I might be approaching the problem wrong .... I've racked my head on how to have VR players with a gripped controller controlling drones in a way that doesn't feel like a big latent dog mess

pallid mesa
#

hang on a second

severe nymph
#

if your using an interface or your not posessing the best you can do is wait round trip for the server updates

#

and it feels horrid

#

its like yeah ... I'll go write a custom cmc that can record and playback inputs without being posessed haha.

#

not!

#

🤣

pallid mesa
#
After a long road and many attempts, we are dropping support for the async version of Network Prediction. We felt the 
complications it introduced into the physics system were too much to maintain and performance was still too poor in
the worst/degenerate cases that it wasn't going to be a viable system for enough games to warrant the complexities.
#
Physics support could come back into this version but it would be
strictly opt in and only applicable to games with small number of objects and players.
#

This is a straight indication on how complicated that thing is

dark edge
severe nymph
#

@pallid mesa yeah

#

It’s not surprising honestly

#

It’s not a task id wish on the best engineers I’ve had the pleasure of knowing

#

That’s for sure

#

For a single ball bouncing back and forth …. Sure

twilit radish
#

Just saying this about the Rocket League video, take it with a small grain of salt. While they do have an amazing game it falls pretty badly apart with high latency 😅

severe nymph
#

Still great fun

twilit radish
#

Still some good tips in there IMO

severe nymph
#

I applaud their magic 😂

twilit radish
#

That for sure 😄

dark edge
#

The main crux of the issue in anything predicted us what to do when two clients predict conflicting things. Vs the server, every client is in the future on their own screen and sees others in the past. That's why we just said fuck it, our vehicles are slow anyways, just replicate inputs to server and let there be one source of truth.

pallid mesa
#

also, prediction feels hacky

#

not sure how to explain it 🤣

thin stratus
#

No

#

Replication is supposed to happen in the Actor which owns the SkeletalMeshComponent

#

Yes, but no. You don't send them. The AnimBP simply polls them from the Actor

#

No

#

You have the replicated variables in the Actor

#

And your AnimBP in the EventGraph you get them from the Owner

#

Just have a look a the standard anim BPs from the Third person template for example

dark edge
#

What's the gameplay thing you're trying to make?

#

Is your character described by one rotation or two?

#

No just explain do you want seperate body and aim/look directions or just the one?

#

Right now what is rotating your capsule/root bone

#

Is it using ControlRotation or orienting to movement?

#

Or custom rotation logic

#

K so what are you using ControlRotation for, the aim/facing direction?

#

Yaw of what?

#

Okay so the actor rotation is the facing rotation, and you are counter rotating the body

#

Just use Base aim rotation to have an automagically replicated pitch as well.

hallow summit
#

Does anyone know why there's this jump at the beginning when running as client but not stand alone?

dark edge
#

Control rotation is a property of the controller, so it's only on the owning client and the server.

#

The actor yaw is already handled by the character movement component, so just add in the base aim rotation pitch and you'll have everything you need to aim

dark edge
#

The camera isn't driving anything. It's just the camera and the actor are both being using the control rotation. You need to go over your setup and make sure you understand exactly what is driving what

jovial dawn
#

hello all

#

I create a server for my game and it's working, except...

#

when I start the server, I don't see any log

#

normaly we see text rooling

#

I created a a shortcut and put -log at the end of the execute but.... still a black windows.. the server seem running because I could connect to it

#

any idea what could cause this ?

gritty flume
#

Im currently trying to replicate RTS style building placement, and i wanted to ask if somebody could spare a minute to see what im doing wrong:

the flow goes like this:

#

im very new to replication, so i would love to know what needs to be replicated and what is best practices in this case

#

i was not sure if i need to set some of the variables to be replicated or not

dark edge
#

The data that should go from client to server is "Hey i wanna put this building here"
And the server does the rest

gritty flume
#

that makes sense 🙂

#

thanks! i'll let you know how it goes

dark edge
#

When in doubt, think about what should be traversing the network.
The client should just pass a message to the server requesting a building be placed somewhere (run on server event), and the server should just be replicating state out. If it's RTS style though, I'd start by making a generic Order RPC that can be used for movement orders, spawning orders, building orders, etc

tender acorn
#

hi all! Im here again to ask anyone about ALSv4 replication. As i got it right, ALS_BP using characted information, such as rotation, speed etc from Base_PlayerBP. And if got animation replication explanation, all i have to do is make all these "information" variables to "replication". But in my case, all these stuff going from Interface. So i have to move it to my main_character_BP or what? Thanks in advance! 🙂

#

Or maybe i missed something 🤔

gritty flume
#

@dark edge interesting, now it seems like its complaining about the ghost

#

is that because the server does not know the value of the ghost variable i assume?

dark edge
#

It doesn't and shouldn't.

#

Make a run on server event that passes over everything the server needs to spawn the building

obsidian gyro
#

How do I stop a widget from showing for all players?

dark edge
#

widgets are clientside only, but if you tell everyone "Hey show this widget", they will.

obsidian gyro
jovial dawn
#

Hello guys... I have some issue with this

#

I have 2 level, 1 main menu with character selection

#

and the Arakas3D

#

when I create my character, I openlevel the Arakas3D map... but it enter into the map but not connected to the Arakas3D, I need tu put a triggerbox in Arakas3D et collid with it to openlevel to 127.0.0.1:7777

#

to be able to login to the server

thin stratus
#

What exactly is the issue?

severe nymph
#

@winged badger

#

UCharacterMovementComponent::SimulateMovement() it runs FindFloor(), which in turn runs ComputerFloorDist(), which runs FloorSweepTest() to do a capsule sweep.

For this sweep, it uses InitCollisionParams() on the UpdatedPrimitive to init the Query and Response params. However, this function sets the CollisionResponse filter on the ResponseParams to BodyInstance.GetResponseChannels(). Which has been set to ECR_Ignore for WorldStatic and Dynamic.

So the sweep finds no floor, and the character switches to Falling. Which means it leaves NavWalking, so collision response channels are now enabled again. So next frame it finds a floor. And switches back to NavWalking again.

#

Just an fyi

#

Reason for the is falling loop

#

And for anyone else looking to solve the issue

thin stratus
#

NavWalking ignores those on purpose.

#

Unless that's not the issue you mean?

neon bane
#

Hey lads! Hope you're all alright. I'm having a rather, I think, simple issue, but I'm at my wits' end here. I'm trying to generate a hud while using a dedicated server, using PlayerController. The problem is, no matter what I try, I can't seem to get it to recognize my player as the local controller.
I call this

    if(PS)
    {
        class AWW3PlayerController* PC = Cast<AWW3PlayerController>(GetController());
        
        if(PC)
        {
            PC->CreateHUD();
        }
    }```
in the PossessedBy function. CreateHUD() always returns false when checking IsLocalPlayerController(). The reason I'm so stumped is that I've found a project that does this the exact same way, but I can't seem to get it to work. I might be missing something small and obvious here. Would be lovely if anybody could point me in the right direction.
severe nymph
#

@thin stratus if you look to that section in cpp

#

It creates an infinite loop if client navigation is enabled

#

As the client will hit the navmesh check go into navmesh walking and fail the sweep go to falling swap back to walking and pass the navmesh check swap to navmesh walking and fail sweep again

#

Results in flip flop infinite loop on clients

#

Only if ai is spawned by authority btw if placed in the level it’s fine

pallid mesa
#

so it's a bug

severe nymph
#

Seems that way

#

Looks like maybe overriding InitCollisionParams()

#

Will fix

pallid mesa
#

you can prolly fix it setting movement mode in begin play?

severe nymph
#

I’ve tried that

#

Also tried construction

#

Only thing that works is turning off client navigation

#

But then the clients use “walking” and server uses navmesh

#

And client proxies can’t lerp z correction

#

Resulting in horrid z vector desync

pallid mesa
#

so nav walking doesn't get replicated proper

severe nymph
#

Navmesh walking has always been client navmesh assisted as far as I know

#

Without any navigation mesh on clients it results in constant server correction

pallid mesa
#

it rings a bell somewhat similar to what I commented

#

but I haven't done AI in years I might be wrong

severe nymph
#

General “walking” is engine default

#

Navmesh walking is a performance saver and offloads calcs to client navmesh but when running replication (server/client) ….. it just doesn’t work the way it seems to be coded

pallid mesa
#

mhm that definitely rings a bell

severe nymph
#

It’s like it wasn’t fully made with replication in mind

#

Based on what I’m seeing without client navigation the server is actually working harder to send client corrections

#

Vs walking sweep checks on client proxies

#

Either that or it wasn’t made for uneven terrain but still they have navmesh walking traces which again only happens on server without client navigation forcing correction constantly

#

Project navmesh walking has a param setting but actually makes the problem worse

#

For standalone non rep it’s perfectly fine

#

With client navigation the proxy hardly ever gets corrected but results in the falling loop

thin stratus
#

Hm we used NavMesh walking in The Ascent for the AI. Only issue we ever had was forgetting that the CollisionProfile ignores WorldStatic and Dynamic when trying to let them run into triggers. But maybe your game just shows the issue more and the ascent didn't encounter it

severe nymph
#

Yeah it’s because my ai uses the isfalling cmc function for jump loops

#

Was using walking and everything was fine

thin stratus
#

Hm we had no actual jumping despite some specific abilities

#

Which I'm not sure how they were implemented

severe nymph
#

Swapped to navmesh walking and didn’t have an issue until we did Nav links

thin stratus
#

Might have been a simple launch + custom anim

#

Right

severe nymph
#

Yeah 😎

#

I’m close to properly solving

#

Pretty excited actually

thin stratus
#

There are so many little problems with CMC and ai...

severe nymph
#

Performance will be great both from savings in pathing and server correction

pallid mesa
#

just PR the hell out of that

#

😄

severe nymph
#

With client navigation keeping navmesh walking in check the server will get an excellent perf boost

thin stratus
#

We had issues where AIs had different agent settings than default. And AIs started to walk off of the NavMesh but not back on. Cause one of the Implementations of UE said "Yes we are still on the NavMesh." while the other said "No you aren't on the NavMesh so you can't walk there."

#

Which in the end got solved by just killing the enemies off that got stuck

severe nymph
#

Without client navigation the pathing is pretty cheap but man the correction batch rpcs

#

From the server

#

With normal walking …. Well your lucky to get 50+ ai

#

Plus 50 clients

#

Just hell on tick updates and sweep stack

#

But correction isn’t bad at all

#

Just a matter of tradeoffs

#

But I see potential for improvement 😂

thin stratus
#

Yeah different game

#

We had 4 players max and but then quite a lot of AI

dark edge
#

You doing anything weird where that wouldn't be the way you want to do it?

neon bane
#

Pretty sure I'm not doing anything weird, but I was just following tutorials, and I was wondering why that wouldn't work. Either way, I somehow managed to do it by calling IsLocallyControlled() in BeginPlay and it all seems to work now. Probably not the most stable solution, but seems good enough for me right now

dark edge
#

Third time today, I gotta change my name.

#

Much better.

last walrus
#

hi guys, i know this seems ridiculous, but lets say i got $1000 montly dedicated server (i still dont know which server to use).
how many players this server can held in one instance (average numbers)?

and the game complexity is like PUBG PC gaming. and lets make the game is not that optimized well.

twilit radish
#

I don't think anyone can really tell you or even should. If you want to have for example a hundred people on one instance then you'll need to try it out for your self, we can't guess how powerful of a server you'll need. Maybe your game is in general more demanding than PUBG because of all the features you have, maybe it's less. Maybe you'll find out that it won't even run in the first place with that many people no matter the server and you'll need to optimise, there are just too many things we don't know about that could end up with you needing a more or less powerful server.

I would even recommend not taking people their opinions on this, dedicated servers are expensive in general. If it turns out that someone here says "maybe this works" and you could have gotten a cheaper server then you're wasting a bunch of money 🙂
Profile the performance of your game, do some playtests and see what works and what doesn't.

cosmic marlin
#

Any way to make a system that allows client to join using a code ?

#

Host can share the code that lets you join the lobby

last walrus
mortal kernel
#

Does GetLocalRole() work in standalone?

chrome bay
#

Yeah

#

It'll always be Authority

dusky yoke
#

Hey guys, Im using the Steam API Advanced Sessions framework to host my server, and a player from India tried to connect and got this response: "ConnectionTimeOut" - I'm situated in Europe. Is this an inbuilt region-filtering by Steam or something?

neon thistle
#

I use an array, when I remove an item from it, it’s order is different on the client from the server, any idea why?

pseudo merlin
#

hi all, running into a weird issue w/ replicating TSoftClassPtr. It seems that if I sent an RPC from client to server w/ a softclassptr, it will arrive as invalid unless that class has been loaded on server

#

but the whole point of softclassptr is to pass class ref's without loading them

#

what might I be missing here? do unloaded assets not get a netguid? Isn't a softclassptr just a string ref under the hood?

#

I guess I could just RPC the string of class... but that seems hacky

quartz iris
#

does anyone have a generic ue project where a character with the ue4 rig is holding a gun in first person?

dawn ledge
#

Doesnt the 1st person example project have that?

quartz iris
#

it has no body though for multiplayer

quartz iris
#

is anyone able to help with the project :/

#

I can stream it

latent heart
#

What's the problem, exactly?

neon bluff
#

Does anyone know how I can test this game online that I designed through steam, I get it to show up, but when I go to add people to it, it won't let them have any input, they just watch me!

#

It is in Alpha currently*

neon bluff
#

is there a way I can show you privately my network settings.... I am so ignorant when it comes to this stuff!!!

peak sentinel
#

No

#

Use normalized velocity

crimson saffron
#

Hi ! I wanted to ask, how would someone go about saving items that he gets when he joined another player's session so he could use the items in his singleplayer world after? (for listen servers)

Like I'm joining other's player hosted dungeon and I get some weapons, then after the dungeon is done I return to sp and can see and use the items I got from that session.
Any idea is appreciated 🙏

latent heart
#

You could same them locally in a data asset. Easily hackable etc.

crimson saffron
latent heart
#

You could have a dedicated "item server"

#

Basically an online database of what items each person has and just let them run their own servers.

#

Or if it's not competitive, just let them do what they want because who really cares?

crimson saffron
#

and not even those subsystem plugins on the market could do the trick right

latent heart
#

If it's just saving data locally, it can be easily hacked. If it's loading data over the internet, it can be easily hacked.

#

Cheat prevention is tricky business.

#

Is it a game where you play solo or co-op?

crimson saffron
#

solo for the most part, then you can team up for some dungeons

latent heart
#

Just with your friends or with randoms online?

#

The latter thing is where cheating becomes an issue.

crimson saffron
#

with randoms 🙈

latent heart
#

I'm not really qualified to answer that question then.

tender acorn
#

hi all! How interfaces should replicate?

#

Or they existing only on client-side?

latent heart
#

But an online character server (whcih has items, characters, etc) might be a place to start if you want to try to avoid people cheating while playing with ecah other.

tender acorn
#

Thanks in advance 🙂

latent heart
#

"interfaces"?

#

Class interfaces? User interfaces?

tender acorn
#

I guess it`s a class interface

#

im new at ue4 and multiplayer at all, so don`t know any differences between them 🙂

latent heart
#

Well, generally, a class interface is part of your class hierarchy, so it'll be on the server and client by default?

#

It's not something you change at runtime.

#

Are you coming from unity?

tender acorn
#

Coming from high school 😄

#

So if my animations depends on variables which returning through interface, it`s not allow me to use these value in variables in every single client?

#

i just wanna play my animations and every single player will see them

twilit radish
#

Sounds to me like you are looking to replicate a variable down to clients. Unless the animation system has something built in, which I never used so am not sure about 🙂

tender acorn
#

It`s just using essential variables, like speed, head rotation etc

#

via interface

tender acorn
#

im new at all this multiplayer stuff, but i guess it`s like a "cached" data, which will be using in the next frame

severe nymph
#

@thin stratus what I did was do a check against walking mode & isfalling

#

figured it was faster than writing a new child class of character with a cmc override

#

just to fix the isfalling phys state

#

for navmesh walking

#

so if walking mode is walking isfalling can play the jump loop

#

if navmesh walking mode then i use a montage blend

hard hinge
#

Is there any built-in functionality to auto-destroy actors when their owner is destroyed?

tender acorn
#

Try to use IsValid owner and then destroy it`s child

wispy briar
#

Hello! I'm having problems understanding something I thought I'd already understood. Basically, for some reason, my Server Reliable RPC is being called on the client.
My player controller establishes 2 functions. The first one is called on the client from the input system (confirmed by the VS debug break as Role_AutonomousProxy), however the second one is ALSO called on the client :

UFUNCTION(BlueprintCallable)
void TryAssignPlayerSeat(int32 PlayerSeatIndex);

UFUNCTION(Server, Reliable)
void Server_TryAssignPlayerSeat(int32 PlayerSeatIndex);
void AFirstProjectPlayerController::TryAssignPlayerSeat(int32 PlayerSeatIndex)
{
    Server_TryAssignPlayerSeat(PlayerSeatIndex);
}

void AFirstProjectPlayerController::Server_TryAssignPlayerSeat_Implementation(int32 PlayerSeatIndex)
{
    //Called on... client? Why?
}
tender acorn
#

Maybe in EventTick

wispy briar
dull tinsel
#

@hard hinge You can bind on destroyed, targeting the owner, in the child and then destroy the child when the delegate is fired

fathom aspen
polar solstice
#

Does anyone here have any experience replicating gravity using the ninja character plugin? Or experience with things being replicated properly in the editor but improperly when the project is built standalone?

hard hinge
#

it would be nice to have built into the engine

#

that all actors spawned by the player are destroyed when the player disconnects

#

helps with cleanup of stale actors

bitter swift
#

I would like to ask for advice on setting initial velocity dynamically of a replicated projectile.
What I mean is, the player can charge up the velocity before the projectile spawns and all the clients will know what the spawned projectile's velocity is going to be from the constructor or initializer.

But this is tricky to achieve in multiplayer. I did try by passing over a value to clients to apply to the projectile, but it seems that projectiles don't like to have their velocity changed after spawning. Unless I'm just doing something wrong?
Setting replicated movement will only resolve in laggy movement, because for clients the projectile is 'still' while the server is trying to tell them where the proj is. I will need to set the velocity for clients to the accurate amount that was charged up.

Anyone got some good ideas?

polar solstice
bitter swift
#

If I used deferred spawning and set the properties before spawning it into the world, can I trust that the clients will have those properties set to? Or will I need to use replicated variables and use ForceNetUpdate? (because I dont need it to update otherwise)

polar solstice
bitter swift
#

The player does a charge up locally, then tells the server through an RPC server call with a parameter. The parameter tells the server how much charge up was built.

polar solstice
#

I'd be down to try and help figure it out, wanna hop in a call?

bitter swift
fading birch
#

From a cheat protection standpoint, I would have the server actual track the charge time rather than trust the client. Just have the client send a Start/Stop charging call to the server.

wispy briar
fathom aspen
wispy briar
#

Yeah, sorry. Client calls a event that should be executed on server, but it's executed on client instead.

latent heart
#

If you execute a server rpc on the client on the wrong object, it is called on the client iirc? Because it doesn't have permission to send it to the server from that point?

#

You have to call a server rpc on an actor that can actually send it: player controller, owned pawn, player state

wispy briar
latent heart
#

You're calling it on the PC, not from the PC, right?

#

It doesn't matter where it's called from

wispy briar
latent heart
#

(you can call it from the PC, what I said sounded a little ambiguous on that point)

wispy briar
latent heart
#

Then it should work.

wispy briar
#

Notice top right is client, not server.

latent heart
#

That's the wrong type of rpc

#

Only the server can send an 'executes on all' rpc.

wispy briar
#

Yeah I was testing quickly, here is with server only

latent heart
#

You need to send an 'execute on server' rpc which then calls 'execute on all' from the server

wispy briar
# wispy briar

Even with execute on server, I still get it only on client 😦

latent heart
#

Are you running 2 separate instances?

#

A client is the server if it's just 1

#

(aka listen server)

wispy briar
#

This is what I'm using :

latent heart
#

I see.

#

Are you doing simulation or pie?

#

I'm guessing it's pie, but eh.

wispy briar
#

Yeah, PIE

latent heart
#

How do you know it's on the client?

#

Oh it says it there, nevermind.

#

Well, I'm out of ideas. It should work!

wispy briar
#

Even with theses params, still client :

#

I'm going crazy 😛

wispy briar
latent heart
#

No worries.

final quest
#

Hi! Does anyone know what you need for a online multiplayer game like fortnite/apex/warzone etc

bitter oriole
#

(and billions in marketing since those games only work when you have millions of players)

final quest
#

Okay👍🏻 thanks!

final quest
bitter oriole
final quest
#

Oh nice!

bitter oriole
#

Though arguably that's going to be less than that

#

A figure a c6g.2xlarge on AWS can run a dedi and that's only about $0.3

#

But overall server costs aren't why indies can't do Fortnite

faint eagle
#

How do I (can I) declare replication callback for a uint32 bit property? Compiler tells me that BaseHumanoidCharacter.h(203): Replication notification function OnRep_Mantling has invalid parameter for property bMantlingRep. First (optional) parameter must be of type uint8. But changing the param to an actual uint8 doesnt fix the error

chrome bay
#

You can't for bitfields

#

Just use a bool

faint eagle
#

ok, thanks

random nymph
#

When using servertravel is it quaranteed that server will load the map before clients?

chrome bay
#

It's not

#

I only know because we had plenty of issues in our game when clients loaded levels before the server

past seal
#

Is there any function that waits for all players to load the map before starting the game?

marble gazelle
#

Hmm maybe check in the GameMode, but if not, shouldn't be too hard to implement it, just have the clients notify the server if "everything" is loaded

random nymph
#

Okay, server is the one spawning player controllers for the players so at least player controllers are quaranteed to exists only after the server has loaded and spawned the controllers?

livid mist
#

I really need help... I am trying to prepare my game for multiplayer. I followed a tutorial on replication, and it works all fine and good. However... My game has a bit more complexity to it that is making it really difficult.

Basically, players will be able to fly with physics simulation on tick that turns on and off (off when they're not flying). The server can fly just fine, but the client is not able to, and I'm not exactly sure how to make it replicate for the client. I tried a few different ways and had a bit of luck, but it was just really buggy and de-synced a lot. Anyone have experience with this? Walking and such works just fine, but I need flight to replicate as well.

I'm really new to this, never done multiplayer before and this is my first game that I programmed myself.

#

I have code for a double jump mechanic, on the third jump is when flight initiates. But I needed a bunch of other events plugged into the jumping code in order to make it reset when it needs to be, and it ended up being a bit of a pile of spaghetti, so I'm kinda going crazy trying to clean that up and make it work for multiplayer.

granite jolt
#

Is there a built-in solution for having multiple levels on a multiplayer dedicated server so I can have a main open world and then if I wanted to have instances of a new session based level where several players could join, like a lobby session, I could spawn them as needed (like after 4 players have requested to join a game, the server will create the new level and make the players join it) ?

granite jolt
#

I considered making new UWorlds but I'm not sure it's the right option, or if I should be spinning up a new dedicated server for the instancing of a specific map

bitter oriole
#

Your lobby session probably works best as purely clientside

livid mist
#

This is my code that makes you enter flight. I know it's really hard to look at. 😭 But I'm a noob

granite jolt
#

so the general plan for multiple levels would be a new instance of the dedicated server per session?

bitter oriole
granite jolt
#

that truly puts me in a spot lol

bitter oriole
#

Dedicated servers are the worst thing you can ever need, imho

granite jolt
#

yeah unfortunately I can't do any peer to peer for this.

bitter oriole
#

Possibly, but the business case for dedicated servers with 4 players on them is gonna be weird 🙂

granite jolt
#

that side should be fine as having them auto-spin up/down as required would optimise it, and its a headless system so it's not too taxing on the virtual machine

bitter oriole
#

Still gonna cost a few dollars per players though

#

Anyway, off topic

past seal
#

Using steam is always an option, i really recommend "advanced steam sessions" plugin

bitter oriole
#

Steam doesn't do hosting

granite jolt
#

yeah that and I'll be using EOS

past seal
#

oh you want to do dedicated servers, mb

past seal
granite jolt
#

thanks ill try that

past seal
#

i have no idea if this will make it so that if you were to call this for two separate clients if they would connect to two instances of the same map or to the same instance of that map though

granite jolt
#

strange thing is I can't even find client travel in the list

dark edge
livid mist
dark edge
#

Why aren't you using the CMC to fly as well?

livid mist
#

On the third spacebar hit you enter flight

dark edge
#

You're gonna have a bad time mixing physics and CMC in multiplayer on your first project

livid mist
#

It just makes the flying feel more realistic

#

I have it working nicely and it's really fun

dark edge
#

Other than the clients, sure.

livid mist
#

It's possible and I'm determined to figure it out 🙂

dark edge
#

You can replicate physics pretty easily but it'll be pretty hard if you want clientside prediction and you'll have to work around the CMC

livid mist
#

I already have disabling/enabling physics sim working, just need to make it replicate

#

it completely disables physics when you touch the ground

dark edge
#

Are you ok with ping lag between the inputs and seeing the guy move/turn?

livid mist
#

I'm sure there will be issues like that, yeah

dark edge
#

IDK if it'd be possible for characters but I have a multiplayer physics project that works by sending all input to server. You really DON'T want to go down that route for characters though, use the flying or a custom movement mode and do it right.

#

You can still get the exact same movement mechanics

livid mist
#

How?

#

I'm a noob just cobbling together tutorials I find, I followed a plane pawn one that showed how to make the physics calculations and I adapted it into what I need

dark edge
# livid mist How?

Multiplayer is a COMPLETELY different animal. Since you have a cobbled together system, you'll have to cobble together the networking for it. The correct way to approach it would be to make flying a movement mode. Honestly, if you're new, stick to a single player project and you might finish it.

livid mist
#

Is there any way to do that without C++? I don't know C++. Everything I looked into about custom movement modes requires it

bitter oriole
#

Nah, going to be C++ intensive

blissful saffron
twilit radish
#

Does it have to be cheat proof? You could also just let clients decide wherever they want to be and in which state, not the best solution of course but better than nothing if you can't use C++ / custom CMC stuff.

granite jolt
#

yeah you can have seamless travel on PIE, Standalone and connecting to Dedicated server. Make sure its enabled in your project settings

neon ether
#

So im not exactly sure where to ask this question but seeing as thought its happening in GetLifetimeReplicatedProps(...) I will put it here first. I'm simply trying to put a class member variable inside the DOREPLIFETIME(). I am able to compile this just fine, but when I try and open the editor it gets to 93% and fails with the crash shown above. The line described in the crash is shown above the crash window and the second image shows how LifeTime is getting declaired. If i comment this line out then it opens just fine but of course the LifeTime does not get replicated.

lost inlet
#

it's hard to tell with these cropped screenshots if it's actually declared in the correct class or not

#

the compilation will not validate that property is actually valid since it looks up the prop name by name via reflection

neon ether
#

The LifeTime is being declaired within the AItemParent class

lost inlet
#

this is the same cropped screenshot

neon ether
#

oops didnt mean to attached that one

#

thats a big more backed out so you can see it within the class

twilit radish
#

Doesn't it need the "projectname_API" macro next to the class to properly work? Could be wrong though.

#

Along with the "UCLASS()" one which seems to be missing(?) or may be outside the screenshot.

neon ether
#

I have found that it is not neccessary, as non of the files in the project have that _API and I've never ran into any of this with prior replicated variables

#

Once thing I wanted to note is that this is a parent class. This class also has a child that gets derived from which also has the GetLifetimeReplicatedProps thats it overrides (but still calls the parent super and everything. I was currious if this parent child both having this function could cause any issues?

twilit radish
#

There's a backslash after your BeginPlay line btw 😛

livid mist
twilit radish
#

Well what I was thinking of is just quite literally sending the location through a RPC, but that's probably not too great either if you already have the setup for everything with the Character system 😅

untold summit
#

Hello, i have a gamemode that spawns a ThirdPersonCharacter for every player controller in OnPostLogin event and i want to assign a player name when the character is spawned, but i need to be able to input that name in a main menu and then get it when i open the level, and get the specific name for every client that connects to the game, anyone has any idea on how i can make that? This is my OnPostLogin event

dark edge
livid mist
untold summit
dark edge
dull tinsel
#

I'm trying to make a chess type game. I have a basic drag and drop mechanic set up, but it only works properly on the sever.
Client side when I select a character to move, it falls through the floor, and nothing happens on the server.
Drag and drop logic it in the player controller

dark edge
#

Anything turn based is a great first multiplayer project as you have to do zero (0) clientside prediction

dull tinsel
#

That was the idea. So I should try moving the drag/drop logic somewhere outside the player controller? Because thats client owned right?

dark edge
#

Do the other players need to physically see the drag and drop?

#

or do they just see your move happen once it's happened

#

If they just need to see the move once it's happened, do the drag and drop clientside with the playercontroller (and possibly some stuff on the piece actors, idk, depends on what you're going for), and just Client->Server the move (A4 to B3)

#

Congrats on choosing a game design that's actually doable in multiplayer for a newer dev. I wish I had done a turn based game lol

still coral
#

Hey everyone 👋
So I'm doing a multiplayer parkour game and a few months ago I asked about whether changing the movement component's MaxWalkSpeed at runtime messes with the movement replication, and apparently it did!
So I changed my custom character movement component to modify the incoming Acceleration from the MoveData to allow for speeding up or down while running and replicating properly.
After some modifications, this works just fine, but there's an issue:
I'm using FInterpTo to modify the Acceleration the same way I was using FInterpTo to modify the Max Walk Speed, which causes the increase in speed to be very different (modifying acceleration vs speed).
Can I make it so that the Acceleration increases in such a way so that it mimics the increase in speed I had before, or another (maybe simpler) way to modify the character movement component's Max Speed at runtime?
Thanks for the help 🙏

tender acorn
#

guys, anyone know what causing this issue?

dark edge
#

@still coralhttps://youtu.be/RtQRMcupJs0

Support the channel through donations. Crypto accepted!
PayPal: https://paypal.me/reidschannel?locale.x=en_US
Patreon: https://www.patreon.com/reidschannel
Bitcoin: 1JFwWHr4X6uAeoZadukzqKjzFBj3Qjy7Sk
Ethereum: 0x2B2Bc108F1Cc0fF899959dEF3226637787d8C3dE
Dogecoin: DNQ33YnhpWoTBokBNVkZP5ub8KTLkpyjpv

Join our community discord!
Discord: https://dis...

▶ Play video
hard hinge
#

Is there any built-in client-side prediction functionality in unreal?

wispy briar
# latent heart No worries.

I found the probleme. Apparently EnhancedInputSystem flags all calls as Local instead of letting remote calls be remote calls.

latent heart
#

Damn.

#

@twin juniper he was using an input bind to trigger a server rpc... which wasn't being sent to the server.

wispy briar
#

It's the new version of the EnhancedInput that got pushed to ue5. You can disable the behavior with a define in the build.cs, not to bad a fix for a problem I do not understand -_-

vivid seal
#

Anyone know what would be causing jitter with the Projectile Movement Component? I'm spawning a fake projectile on the client, RPCing to the server, spawning that projectile on the server, ticking it forward in time by client ping, then when the projectile replicates it replaces the client's fake projectile. This all works correctly but the replicated projectile has some jitter on clients. It's not terrible but it's definitely choppy. I have ReplicateMovement checked in the BP, replicated velocity/rotation set to 2 decimal places. The interpolate movement checkbox doesn't appear to do anything.

dark edge
wispy briar
#

You sure you're not updating the position on client directly as well as having the server update it then re-replicating it back?

dark edge
#

I'm honestly not very impressed with the projectile movement component, you are probably a lot better off making your own

vivid seal
#

actually, since the client is only spawning a fake projectile, the real replicated projectile doesn't even get an initial velocity from the client, its just a server-spawned object being replicated down

pallid mesa
vivid seal
#

i seem to have fixed it by following the steps someone laid out for calling MoveInterpolationTarget in the actor's PostNetReceiveLocationRotation function

pallid mesa
#
if (ProjectileMovement && ProjectileMovement->UpdatedComponent)
{
    ProjectileMovement->SetInterpolatedComponent(Mesh);
    ProjectileMovement->bSimulationEnabled = true; // optional if you want only interpolation without collision traces
    ProjectileMovement->bInterpMovement = true;
    ProjectileMovement->bInterpRotation = true;
}
#

ah yes

#

and you need to do this:

vivid seal
#

I'm assuming that setting the component would just do basically what i'm already doing but just using the component's location and rotation?

pallid mesa
#
void AProjectilePredictionProjectile::PostNetReceiveLocationAndRotation()
{
    if (ProjectileMovement && ProjectileMovement->UpdatedComponent && ProjectileMovement->bInterpMovement)
    {
        const FRepMovement& ConstRepMovement = GetReplicatedMovement();
        const FVector NewLocation = FRepMovement::RebaseOntoLocalOrigin(ConstRepMovement.Location, this);
        ProjectileMovement->MoveInterpolationTarget(NewLocation, ConstRepMovement.Rotation);
    }
    else
    {
        Super::PostNetReceiveLocationAndRotation();
    }
}
#

possibly

#

just less lines of code, likely

#

although @vivid seal with this setup and your setup

#

if you reduce the net update frequeny of your projectiles

#

and disable simulation

#

you will see the projectiles halt for a sec when they spawn

vivid seal
#

while it waits for the next interp location?

pallid mesa
#

that's because you need full rountrip time for the interpolation to kick in

#

yes

vivid seal
#

makes sense. its weird that this isn't just on by default like it is for CMC

pallid mesa
#

i mean tbh... you probably don't need any of this unless its a very slow projectile that requires continuous corrections

vivid seal
#

i have a few slow projectiles and the jitter was noticeable enough

pallid mesa
#

the interpolation should remove all the jitter, but the halt will be there

dark edge
#

Just make your own deterministic projectile movement component that uses line traces, I like it much better.

pallid mesa
#

you can solve the halt by simulating until full rountriptime

#

yes

vivid seal
#

just adding ```
void APredictableProjectile::PostNetReceiveLocationAndRotation()
{
Super::PostNetReceiveLocationAndRotation();
ProjectileMovement->MoveInterpolationTarget(GetActorLocation(), GetActorRotation());
}

seemed to fix all my jitter even at 200 ping with fairly bad net settings
#

didn't notice the halt but i also have a fake client projectile in the way for that first tick i think

pallid mesa
#

do you have bsimulate to true in your projectile?

vivid seal
#

dont think so, just ReplicateMovement and the interpolate checkbox

pallid mesa
#

also... that... what you are doing might give you issues I would suggest you use the replicatedmovement property as I showcased above

#

bsimulate is on by default in the projectile component

#

take a look

vivid seal
#

i had closed the editor let me reopen

pallid mesa
#

also you'd want to set bsimulate to false only for everyone but authority

pallid mesa
vivid seal
pallid mesa
#

well it would be as easy as having a public example we all can use and reuse

#

but unfortunately we need more strength in the open source world

vivid seal
#

uhh disabling simulation causes my projectiles to never move

#

they just spawn and float there

vivid seal
#

ah

#

where would you do that, beginplay?

pallid mesa
#
void AProjectilePredictionProjectile::BeginPlay()
{
    Super::BeginPlay();
    
    if (GetLocalRole() != ROLE_Authority)
    {
        // Set movement interpolation setting
        if (ProjectileMovement && ProjectileMovement->UpdatedComponent)
        {
            ProjectileMovement->SetInterpolatedComponent(Mesh);
            ProjectileMovement->bSimulationEnabled = false;
            ProjectileMovement->bInterpMovement = true;
            ProjectileMovement->bInterpRotation = true;
        }
        ...
    }
}
#

then you'll have the same issue I mentioned some days ago

#

which you can solve by simulating until full round-trip-time

#

actually... you'll find the said halt diminishes the higher your netupdatefreq

fierce fiber
#

Quick question, I have an intiger variable in my thirdpersoncharacter blueprint, if I want another local multiplayer user to be able to change that variable for themself, how would I go about doing that to make sure their controlled thirdpersoncharacter only changes it for themself? (working with blueprints)

polar solstice
#

you could ask the server to change the value on that specific character

fathom aspen
polar solstice
#

if you need something to happen when the int is changed you could make it onrep as well

blissful saffron
#

You're asking how to get a player to change THEIR OWN variable right? Just change it.

polar solstice
#

in local multiplayer would that variable be replicated?

blissful saffron
#

Am I missing something?

fathom aspen
fathom aspen
polar solstice
#

I believe so, I guess what id like to know is if the int changing has some affect on anyone but the character with the int. because if not, then it doesn't matter and they should just change the value

blissful saffron
#

That's what my assumption was. He said "make sure they can only change it for themselves", so I assumed he wants to be sure if he's looking at a variable it's THIS player's var and not someone else's. But I guess we'd need clarification

polar solstice
#

@fierce fiber care to clarify?

fierce fiber
# polar solstice <@!571776029979443298> care to clarify?

Sorry for the sort of vagueness of the question, here is what Im doing, I have a class chooser, and I want to apply the class number to the player. In the player blueprint, I have a Class Number Variable that I want to have changed for each local controller to their chosen class, for example, Player 2 would walk over a platform, the thirdpersoncharacter blueprint would change to class 2, but only for player 2. Hope this make sense? Im new at tackling multiplayer in ue4 so apologies in advance.

polar solstice
#

I've never done local multiplayer but if it's anything like networked mutliplayer, you could set the int as a rep_notify and using the rep_notify function, you could update the class. assuming local multiplayer still has a server you'll have to ask the server to set the integer for that specific character

fathom aspen
#

Local multiplayer is split screen?

polar solstice
#

ya

fathom aspen
#

I see

polar solstice
#

I'm not 100% sure, but i believe it acts like a listen server?

fathom aspen
#

Yeah I haven't done local mp either, but I would guess it has a same/similar approach

fathom aspen
fierce fiber
fierce fiber
polar solstice
#

@fierce fiber might be able to assist you better if I can see whats going on, wanna hop in a call?

fierce fiber
#

Yeah sure!

polar solstice
#

@fathom aspen we figured it out, does not work like networked mutli confimed lol

fierce fiber
#

Guys a wizard, literally

polar solstice
#

you just set the variables on actors directly like @blissful saffron suggested. his setup wasn't split screen though so not sure if there is a change there

fathom aspen
#

Ah I see. Yeah in split screen you specify index for GetPlayerXXX and stuff like that

modern island
#

I have built a dedicated server but my client is unable to connect to it. I am able to connect to the server if it runs in editor though. Am I missing something?

bitter oriole
#

No way to know without a shitton more detail on what you're doing

modern island
#

It's a small project and I am just trying to connect multiple clients. When I run the clients standalone in editor with a separate dedicated server the standalone and the built versions of the clients can connect to the server. But they are unable to connect to the built version of the dedicated server. What information will be more useful?

bitter oriole
modern island
#

Direct IP

bitter oriole
#

So you have no online subsystem enabled?

modern island
#

No

bitter oriole
#

Are the server and clients on the same machine or network?

modern island
#

The clients can connect to the server on the same machine and over the local network

#

I have not tested outside of my network

bitter oriole
#

I thought there was an issue

modern island
#

Can connect to the dedicated server that is ran separately from the standalone launched from the editor

#

But not to the build

bitter oriole
#

Okay so I'm gonna ask again specifically about the scenario where it does not work

#

Are the server and clients on the same machine or network?

modern island
#

Both

#

But they don't connect

#

Both as in local network, sorry

bitter oriole
#

So packaged client + packaged server, both outside editor, on same network, with open <ip>

modern island
#

Yeah

bitter oriole
#

Check the dedicated server's logs

#

If the connection fails for Unreal-related reasons there'll be logs

modern island
#

The last thing on the logs for the built dedicated server is first time updating LLM stats.

bitter oriole
#

Dunno what LLM is, but you're saying repeated attempts to connect from a client do not produce logs

modern island
#

Not on the dedicated server, it makes me think that it ain't hosting right or something.

#

The bind address is 0.0.0.0 and the port is 7777, not sure if that is how it's meant to be

#

The clients log just says it timed out

bitter oriole
#

So we're looking at a network layer issue and not say invalid build etc

#

Check that the IP is correct, try pinging that IP from client

modern island
#

I need to pop off now for a bit, thanks for the help! I shall try that when I get back.

mortal kernel
#

Can a Playerstate do Client RPC's ?

bitter oriole
#

Should work

latent heart
#

Server ones too

#

They'll only work if the player state has replicated successfully to the client at the time you call it, though

mortal kernel
#

I figured... it takes ages for playerstate to update

marble gazelle
#

you can increase the player state net update frequency

mortal kernel
twin juniper
#

hello guys any one have any idea

#

how to use ALS (Advanced Locomotion System) for multiplayer games

#

because current als will not come with multiplayer in it

#

right

bitter oriole
#

Ask the plugin's developer?

twin juniper
#

are they good for full resale

chrome bay
twin juniper
#

release*

chrome bay
#

But generally, I prefer to set the frequency as low as possible then call ForceNetUpdate() when changing a replicated property

#

Maybe you had MinNetUpdateFreq still set higher

mortal kernel
#

That seems to be a pretty optimized way indeed

#

aslong as you know when things update :o

chrome bay
#

ForceNetUpdate doesn't actually force anything, all it does is reset the last compared time

#

So it will at the very least compare at the end of frame, even if it doesn't send it

#

For stuff that moves though, best to leave it somewhere higher

twin juniper
bitter oriole
eternal canyon
#

With the community plugin

#

Still wouldn’t be ready for a full game

#

But is a good start

wild aurora
#

Is there a recommended way to create a UniqueNetId for purely LAN Sessions? I'm using EOS so I have the EOS net drivers set in the DefaultEngine.ini but I'm looking to make sessions calls with the NULL_Subsystem for LAN, however if I bypass all auth and everything, the UniqueNetIds are empty/null and things like CreateSessions/JoinSession/FindSessions etc throw exceptions.

twin juniper
twin juniper
#

iam not that good with multiplayer

#

new to multiplayer

eternal canyon
#

If ur new with multiplayer I would recommend learning more rather than paying for packs

bitter oriole
#

MP is hard work

obsidian cargo
#

Most packs I've purchased aren't really production ready

#

At least packs that involve code

bitter oriole
#

Much of the marketplace in general

obsidian cargo
#

I've been able to adopt concepts from them, but usually have to remake them anyway

bitter oriole
#

Personally I try to avoid plugins or marketplace assets like the plague - you then become tributary of what they support, when they are updated, etc

twin juniper
#

ya thats true

opal fox
#

Been running some tests on my linux server with the networking profiler that exists in the engine.
I was hoping that the results was going to give me something that I could easily look at, but the biggest culprits for these tests have been

WorldSettings , and an rpc called FUpdateLevelStreamingLevelStatus

Does anyone know anything about these 2, im finding it difficult to understand from the documentation, and worldsettings just seems impossible to understand from the profiler what it is doing?

wild aurora
#

@opal fox check out UnrealInsights

#

and run the network profiler with that

#

FUpdateLevelStreamingLevelStatus I believe is clients/hosts communicating the status of level streaming and travel

#

I would also search for instances of SetLevelVisibility

opal fox
#

Yeah i suspected its something about the level streaming, its just a bit unclear what

#

the worldsettings is the one im most confused about

#

its so ambigous

grizzled stirrup
#

How's the MP stuff looking in Lyra? Really excited to try it out

#

Still using OnRep vars for stuff like weapons firing? Or moved to Multicast RPCs or even auto handled by GAS?

twilit radish
#

I wonder if it actually implements proper rewindable shooting mechanics or just the same thing as the old shooter game did where it kind of guesses.

eternal canyon
twilit radish
#

Unreal Tournament has full rewindable hit detection?

eternal canyon
#

Yes

#

They also show a form of projectile prediction

twilit radish
#

👀

#

But I do still wonder if Lyra has it.

vivid seal
#

wait what, last time i looked at UT it didnt do rewinding

mortal kernel
#

Can I disable hit Events for replicated actors?
I have a Problem where... I spawn an actor on server (that actor replicates) and once it Hits a wall it spawn additional replicated projectile however it seems that they are being spawned locally in the client

dark edge
mortal kernel
mortal kernel
slow shard
fervent sequoia
#

I want to enable player to player communication. Whats an effective way to handle it? (basically I can walk up to any player and trade inventory directly from that player)

mortal kernel
thin stratus
#

ALyraGameState
High-level game phase logic is managed server-sde by Lyra Game State (ALyraGameState), located in your C:\Lyra\Source\LyraGame\LyraGameState.h file. Game States only exist on the server, and use an Ability System Component with Game Phases that are implemented as abilities.

#

Is that a typo in the docs ?

#

GameStates only exist on the Server?

#

Or is that not the "AGameState" ?

hollow eagle
#

That definitely sounds like a typo, I think they meant AGameMode...

lost inlet
#

the benefits of just looking at the source

#

because I'm sure they wouldn't change a part of the framework like that

#

especially one as fundamental as game state

hollow eagle
#

that would have been a big break from the previews lol

dusky yoke
#

Hey guys, regarding anti-cheating on a listen server-solution game, should I be setting variables such as speed, ammo, health etc., in a 3rd party actor, or maybe in the level blueprint? Need a way to ensure the server can't hack 😅

latent heart
#

Look into 3rd party anti-cheat tools? If you don't know how to stop cheaters (as is clear by you asking here) then the experienced hackers will get around whatever workarounds you add.

#

Except just implementing correct and rigorous code to make it function correctly.

twilit radish
#

And we all know how well client side anti-cheats work 😅
If you need guaranteed 'safety' / control you'll need dedicated servers.

latent heart
#

Another thing you should consider, if it's just a game you play with friends and it's not competitive / no global leaderboards, etc., does cheating even matter?

dusky yoke
#

Thanks for your input @latent heart and @hushed stirrup (hope you don't mind the pings) 🙂

I've implemented Steam API and Advanced Sessions into my game with listen server (followed an integration tutorial on Youtube by Ryan, a partner of VirtusHub). If I were to make the move to dedicated server at some point (which I'd prefer doing in the long run as it has competitive aspects), I'd need a source-build of the engine right? Is it as easy as that to add dedicated server support, or would I need to rewrite the whole Steam integration? Maybe better to ask the person who wrote the setup 😅

twilit radish
#

Wrong Thom 😛

#

But yes you need a source build for building dedicated servers, whether that setup works out of the box I don't know.

shy hill
#

hey hey, for some reason the 'visibility' of my paper sprite component is automatically replicated and I can't seem to figure out why and how to not automatically replicate it, any idea where this is set up ? ('replicate' is unchecked on my paper sprite component)

fathom aspen
shy hill
#

No but I want to toggle on/off the visibility with a multicast function

#

and doing that with 'set visibility' on a multicast function seems to bug (visibility is sometimes incorrect), my assumption is that it's because it's somehow already automatically replicated

#

like I don't get why 'hidden in game' isnt replicated but 'visible' is

fathom aspen
#

That's it. That's why you should use SetVisibilty

#

Also doing multicast for such stuff is something you want to avoid

#

multicast RPCs aren't good for state changes

fathom aspen
#

Can I ask why are you doing that multicast?

fathom aspen
#

Still. It's something the server is changing too, so I would make it replicated instead and change it on the server. I'm not sure if that is what causing your issue, but as I said above, this might break your game if other players are out of relevancy

#

multicast fires only on relevant clients

blissful saffron
#

What are you doing with this?

#

with your timesincelastpunch info

#

I may not be understanding your situation very well, so correct me if I'm wrong here, but I don't think you want to handle it that way

#

Your punches should execute based on the punch speed, right?

#

So just have it play at its speed when they are replicated that a punch occurred

#

Rather than working to sync up exactly in real time when it happened

#

Alright, I think I'm getting lost here, apologies

#

What's the issue? You have delays on the listen server?

#

Gotcha

#

The initiation of the punch is delayed right? Not play speed or anything

#

Yeah

#

I don't know, I'm sorry, that's weird

#

Absolutely, I'm going to try to listen in for someone who may know the solution on this, it intrigues me

#

The CPU on the listen server isn't struggling is it?

#

Have you verified the inputs it uses on all clients and LS? Printed out the variables and times you're getting to ensure things seem as they should?

dark edge
#

Put something else on your multicasted Punch() to confirm that the RPC is not delaying

blissful saffron
#

To ensure there isn't like a "time since creation" you're relying on from the clients that's different on the server