#multiplayer

1 messages · Page 148 of 1

split swift
#

no

#

the problem is that it properly deletes the weapons from the client when the server first picks it up but after that if he tries to pick up a weapon that was placed by a player, it only deletes from the server and not the clients

thin stratus
#

That can have many reasons though. In theory, calling Destroy on a Replicated Actor on the Server is enough.

Who is "dropping" the weapon? How is that done? Cause you need to spawn the Weapon on the Server if you drop it.

#

And only on the Server for that matter.

split swift
#

the drop logic is done through a multicast that is done through the server

thin stratus
#

A Multicast?

split swift
#

yes

thin stratus
#

Are you doing "Multicast" -> "SpawnActor"?

split swift
#

yes

thin stratus
#

That's wrong

split swift
#

whats right?

thin stratus
#

Only call Spawn on the Server

split swift
#

k

thin stratus
#

Spawning of Replicated Actors is also replicated to Clients

#

I really hope you aren't following some tutorial that teaches you that crap

#

Cause if so, drop that and the maker of it :<

split swift
#

should i do all the equip and pickup logic in the server or make the multicast call a server RPC specifically for the spawn actor?

thin stratus
#

Multicast into Server RPC doesn't make sense, cause the Multicast already comes from the Server

#

All of this should happen on the Server

#

There is no need for any Multicast here

#

Multicasts in general are not for State changes

#

Cause those can be missed if out of relevancy or late joining

#

The Drop should mainly be a ServerRPC when the Player presses the key

#

Same as the Interact

#

And after that you stay on the Server

#

you perform the Spawning, change the variables that you use for your equipment and that's it

#

Any state that must be communicate with the owner or other clients would run through replicatd variables

#

That also goes for your equipment code btw. Not only for Spawn and Destroy aka pickup and drop.

split swift
#

if the server enters the BPI and out of that is calls an event back to the player class, is that still on server or would that be on client

thin stratus
#

You stay on the Server

#

After the Server RPC, given you called it in a Client-owned Actor (such as the Character) you are on the Server

#

You only get back to Clients via ClientRPC, Multicast, or OnRep Variable

#

So for your example, the E Key is called on the local Client (let's ignore ListenServers for a second). The ServerRPC after that goes to the Server version of the Client's Character.
All the Code run there, runs on the Server instance now. That includes the getting of the overlapping items, and the BPI call.
And the target of the BPI call also still remains on the Server.

#

Which is what you want, cause now you can modify the Players Equipmnent with the Weapon and call destroy on the Actor.

#

And all of it (let's assume your Equipment code is not a mess) would "just work"

split swift
thin stratus
#

--
In theory, a ServerRPC is mostly only needed if the Client needs to tell the Server about something that the Server doesn't know about.
The best example for that is the Key Press. You want the event of the key press to be known by the Server.
However, the Server knows all about the Inventory and the Weapons on the floor etc. so after the E key ServerRPC, there is no need for any other RPC.

thin stratus
#

A Client changing the variable locally has no "global" effect

#

It will only change locally for them

#

Btw, have you actually read the Compendium for Multiplayer yet?

#

Just making sure it didn't pass by

thin stratus
#

Alright, the Variable question would theoretically be answered by that already

#

I may also add it becomes a lot easier to handle the whole replication stuff if you ensure most of your authoritive code stays on the Server

#

There is also the topic of prediction, but with you current struggles, I would ignore that for now

#

What I mean with that is that it might be easier to, after the initial RPC; ignore any Client problems for a second and simply code whatever you have to do (changing the Inventory, Spawning/Destroying Actors). And then afterwards you can have a quick thought about what of this stuff still has to replicate to the Clients, which is usually State Change.
And State is done via Variables (e.g. currently equipped weapon).

If you need a function to call when something replicated, you'd use the OnRep/RepNotify stuff.

split swift
lucid badger
#

With latency emulation on Average/ServerOnly using a regular CMC with default settings and nothing special, just a fixed movespeed. When the server watches the client move, movement is smooth as butter. When the client watches the server pawn move, there seems to be prediction/correction where when the pawn stops moving, it jumps back slightly. Thinkge

#

Hmmge actually this has nothing to do with latency

#

I turn it off, same issue

#

Client sees a hitch in server pawn movement but not the other way around

#

Guess I just didn't notice it before

#

This is true for client->client as well, when there's extra clients they see the same correction

#

Even with 0 latency hmm

thin stratus
#

Latency shouldn't matter. Package Loss would though

lucid badger
#

Nah it's all 0

#

Server emulation entirely off

#

Visible correction on client when another pawn stops moving hmm

thin stratus
#

That's normal

#

Sim Proxies are extrapolated iirc

lucid badger
#

Oh. Um. How to mitigate it then? It's extremely noticeable even with 0 latency hmm The bright side is that increasing latency doesn't seem to make it worse, somehow

thin stratus
#

Check if you can find anything in the settings of the CMC

lucid badger
#

I poked around with smoothing settings to no avail

#

Switching to linear or even disabled changed not at all

thin stratus
#

The SimProxy basically continues based on its last info. Which would get corrected backwards when suddenly stopping

lucid badger
#

Maybe it's less noticeable with a properly animated character, and is only so obvious rn because the characters are just capsules 😛

thin stratus
lucid badger
#

I guess since it took me this long to notice it all I'm just fixating hmm

#

Curious that it doesn't seem to get worse with more latency

viscid tapir
#

UActorComponent::OnRegister is also called client-side ?

languid bridge
#

Is there a way to get what map a server is running before connecting to it? BlueprintSessionResult only appears to return Ping, Server Name, Current Number of Players and Max Players.

queen escarp
#

do anyone know why the server / clients treets the replication of the fracture diffrerently ?

lucid badger
#

Physics is not deterministic

queen escarp
#

left server rigtht client

lucid badger
#

This is how it's always been in like every game I've ever played

queen escarp
#

yeah but thers 0 debree at all on server

lucid badger
#

Oh is that every time? I thought that time it just sort of fell into one spot

queen escarp
#

no every time

lucid badger
#

Looks like they are getting stuck somehow

#

On each other hmm

#

see how the back is sorta spazzing out

queen escarp
#

has enything with these ?

lucid badger
#

I don't think this has anything to do with replication Thinkge once it breaks into separate parts it doesn't seem like it's replicating anymore

queen escarp
#

yeah...

lucid badger
#

I don't think you would want the pieces to replicate anyways

#

If the server destroys the chair, is the situation reversed?

queen escarp
#

no

#

or yes

lucid badger
#

hmm weird that it's right for the client and wrong for the server

queen escarp
#

its reversed

lucid badger
#

Oh ok

#

So whoever breaks the chair sees it right, but the other side does not

queen escarp
#

yeah

lucid badger
#

Ok so it's something with how you are communicating to the other players that you broke it hmm

queen escarp
#

or acctually no

#

my mistake

#

always broken on server only

#

even if server kills it

lucid badger
#

That's weird as hell

queen escarp
#

yeah and if i play as standalone then it works for the server/client

#

uhm.,..

#

maybe its because im RPC´´ing replicated components

#

?

loud pike
#

Hello, how can I troubleshoot, steam fatal error ? Basically when I start a specific ability only in multiplayer and on steam the game has a fatal error crash ? And I would like to have the logs to find out what it's about since I have no error number with it

pliant haven
#

Is doing player input in playercontroller best practice for multiplayer?

lucid badger
#

Is my understanding correct that the only reason to not use Client Auth on CharacterMovementComponent is that it enables the client to cheat? Such that if cheating isn't relevant to your game, there's no reason to bother with (for CMC) Server Auth and Prediction and custom saved moves and all that? hmm Or are there other elements I'm missing

stoic lake
#

Hi, is there a way for me to implement passwords into sessions without using advanced sessions or another plugin?

lucid badger
#

There's always a way 😛

stoic lake
#

working on an asset pack so need to keep everything stock

lucid badger
#

If the plugin can do it surely you can too, right? hmm

stoic lake
lucid badger
#

Sadly no that's way above my paygrade Sadeg

stoic lake
#

was wondering if its doable in bp

lucid badger
#

Hmm

stoic lake
#

the only way i can think of doing passwords is by storing extra information in the session, but the only way to do that is by using one of those plugins

lucid badger
#

My completely asspull guess is that you're probably going to want C++ for something like that Hmmge seems like we always do

stoic lake
#

seems like it right

fossil spoke
#

If there is, for whatever reason, a desync in geometry on the Server vs the Client. Your Client CMC may end up in an inappropriate state.

#

This can affect how other Clients see that Character.

rocky kestrel
#

Have anyone used Easy Anti-Cheat in own game? People say it is free but can I use it on my Steam game?

fossil spoke
#

So there are still advantages to Server Auth of the CMC.

#

Even if you dont care about cheating

fossil spoke
#

What restrictions there are to using their product.

stoic lake
#

I just found out about beacons. Is there someone who could help me understand how to use these in blueprint?

fossil spoke
#

Beacons are an advanced feature.

#

Beacons are a good way to deal with Passwords though. So you are on the right track.

stoic lake
fossil spoke
#

They may have better exposed them in 5.x

#

But just because you can make a Blueprint from them, doesnt mean they will operate out of the box in Blueprint

stoic lake
#

right that makes sense

#

do you reckon it is possible at all to create a password system without the use of C++?

fossil spoke
#

There are alternative methods.

#

They are inelegant however

#

And you have to accept some inconveniences

stoic lake
#

id be happy to learn them

fossil spoke
#

Actually, thinking about it now, there might not be.

#

I dont think you can refuse connections in Blueprint alone.

stoic lake
#

In my case, reading data from the session on the client is good enough

#

So the client receives the password and does a local check

fossil spoke
#

Well you can just hash the password and put that into the Session information.

#

The Client would then input a plain text password, which you also hash.

#

Then compare the hashes

stoic lake
#

That was my initial idea, however I'm not sure how to add additional session info using the base OSS

#

since this is really all you get

fossil spoke
#

Via BP, im unsure about that as well

#

BP is not really designed to handle advanced uses of the Online system

#

Out of the box.

#

Thats why plugins exist

#

To expose that stuff.

#

@stoic lake Have you looked at the Redpoint EOS Plugins?

#

They are very well written.

stoic lake
#

I definitely have, and do have some passwords systems setup for other games, however this is for my own marketplace asset. So I'd rather not use other plugins

#

Would keep people from looking into it i think

#

if there are any resources I can look into that would help me get extra session info set up in C++ that you know of, that would work as well

#

Would be very handy to know regardless

languid bridge
#

Tangential to my previous question: How the hell do I find a Dedicated Server session? 'Start Session' only works with Listen Servers and 'Find Sessions' only finds started sessions.

lucid badger
fossil spoke
#

Well, anything that causes the Server to disagree with the Client will be an issue in general.

#

If you are happy to accept that, then not really anything else to it.

stoic lake
#

Would it be possible to save a blueprint session result in a savegame and reference it later when someone restarts the game to rejoin that session?

fossil spoke
#

Sessions are transient. In that, a Session created by the same user multiple times, will have different Session information.

#

You cant really "save" Sessions to reconnect to later.

#

Unless they are still available with that same info.

#

So it really depends on the time factor here.

#

If you are talking about reconnecting immedately after say, a crash. Then sure, the Session is likely still around.

stoic lake
#

That's exactly my intention

#

great to know that that's a possibility

fossil spoke
#

But if I log off for the night and come back tomorrow, whatever/whoever was hosting the Session might have closed it.

#

So it wouldnt be available anymore at that same Session information.

stoic lake
#

Perfect, thank you!

fossil spoke
#

You may also be interested to know that the Server keeps a list of "old" PlayerStates

#

So that, if you reconnect, you can regain your state of play prior to leaving.

#

However I dont think these are available in Blueprint.

#

The Server will hold onto "old" PlayerStates until the next level transition I believe.

lucid badger
#

At least for my case all the examples I can think of are contingent on something else bugging out first Thinkge

lucid badger
#

Ummm

#

These... won't stay checked ... Hmmge

#

Other settings work fine

#

But these are off every time editor starts again

lucid badger
#

This didn't work in either DefaultEngine or DefaultEditor

#

But this did soooo Shrugeg

hazy stone
#

When an actor was replicated to the client, does Unreal guarantee the actor's owner and other replicated variables are replicated before BeginPlay? For example,

// server
AMyActor* MyActor = GetWorld()->SpawnActorDeferred<AMyActor>(..., TheOwner);
MyActor->SomeReplicatedVariable = NewValue;
UGameplayStatics::FinishSpawningActor(MyActor, ...);

Let's say TheOwner is also a replicated actor like a pawn, when the client's BeginPlay happens, can I use it's owner and the replicated variables?

fossil spoke
#

@hazy stone Correct.

#

Assuming that the Owner is a valid Actor on the Client.

lucid badger
#

That hinges on spawn actor deferred right? Because I've not tried that but when I was regular spawning and then setting replicating values, the replicating values weren't there yet on BeginPlay Hmmge

fossil spoke
#

@lucid badger Yes

hazy stone
fossil spoke
#

It is all dependant on when the Actor Channel is opened for that Client, as it will snapshot its values at that point and they become part of the initial bunch.

fossil spoke
#

The Client is likely to not have the Owner resolved by the time the other Actor is also replicated.

#

There is also no guaruntee those 2 Actors channels will be opened in the same bunch at the same time on the Client.

#

Network replication is by its nature, asynchronous and you should always assume that and plan accordingly.

hazy stone
#

got it, really appreciate it!

wraith venture
#

ok I'm very new to multiplayer

#

I'm trying to create a widget and display it

#

I just grabbed event beguin play, created the widget, and then added to viewport and I attached 'get player controller' as the owner

#

but it looks like it creates the widget on the server automatically and then gives me an error

#

I thought i had to send it to the server manually for that to happen

#

am I lost? how would I create the widget only for the local player?

#

Blueprint Runtime Error: "Accessed None trying to read property CallFunc_Create_ReturnValue". Node: Add to Viewport Graph: EventGraph Function: Execute Ubergraph BP Plaguehead Blueprint: BP_Plaguehead

#

this is what I keep getting

#

ok I refactored it according to a basic tutorial, the way I assumed i'd have to go

#

on even beguin play I just call add HUD to server but it always gives back that accessed non error

#

wait i think i found it

#

just added an isserver node check with a branch and the error is gone

#

is there more to it than that?

fossil spoke
#

You should probably make use of the HUD class to create and manage Widgets. This will save you from having to use RPCs, which is entirely unnecessary.

wraith venture
#

can you expand on that or send some links?

#

like are you telling me I should use cpp?

#

oh wow ok I've never actually seen the HUD class used before

#

guess I'll look into this

#

so the HUD class is a blueprint, am I supposed to build my widgets and call it fromt he HUD class and then call that from the player?

fossil spoke
#

It is an ideal place to create a "HUD".

#

So basically it would just be what spawns/instanciates your HUD Wigdet.

wraith venture
#

ok

fossil spoke
#

Instead of whatever current setup you have with those RPCs

#

The HUD Class is created when the PlayerController is.

wraith venture
#

does every player controller have a HUD class automatically?

fossil spoke
#

Yes

wraith venture
#

it's not the same thing as this blueprint class I'm seeing under blueprints?

fossil spoke
#

The naming convention is confusing.

#

It is a Blueprintable class.

#

AHUD

#

It is not a Widget

wraith venture
#

ok so it calls the widget that I made my hud in?

fossil spoke
#

You can change the default HUD class on the GameMode.

wraith venture
#

this thing?

fossil spoke
wraith venture
#

looks like I need to do a deep dive in this

fossil spoke
wraith venture
#

ok thanks for setting me in the right dirrection

fossil spoke
#

That is a direction, might not be the right one. That all depends on your needs 😛

#

But sure thing.

#

Good luck.

wraith venture
#

it sounds like it's a good dirrection

fossil spoke
#

👍

wraith venture
#

i mean mathew Wadstein says it's legacy

#

so i gotta see if it has benefits

#

he says it's not not interactable is that true?

fossil spoke
#

It is a legacy class, it used to be what you made UI in prior to UMG.

#

It is still useful as a manager for Widgets though.

rain condor
#

Io, i have an inventory system with array. When i drop an item i remove it from array but still takes up space

fossil spoke
#

You are best to ask these questions in #umg as we are drifting far offtopic here

fossil spoke
# rain condor

You are just emptying the element, you arent removing it.

#

Call the Remove function on the element index instead.

rain condor
#

But I have a spatial inventory where each tile is part of the array

#

I leave it empty so I can use it again

fossil spoke
rain condor
#

Because i'm trying to replicate this

#

in standalone works fine

fossil spoke
#

Ok well you never specified that, probably should have led with that context.

rain condor
#

But on mp when i remove an item, only dissapears vissualy

fossil spoke
#

Is RemoveItems only called by the Server?

#

And you are relying on Replication to see that change on the Client?

rain condor
#

I used a custom event to call on sv

#

And then i used an event dispatcher for client

queen escarp
#

morning guys, im trying my luck here again

#

why is there no debre spawning on the left side (server) but on clients it works ?

velvet kettle
#

best guess with little info, you are spawning it on the client, not the server

queen escarp
#

this is how its being played, its run with a rpc so should affect all

#

o wait that wrong

#

use doodas is a server event*

velvet kettle
#

when in doubt, throw in print strings and HasAuthority nodes

queen escarp
#

aye but since its the server replicating it to clients then it cast go past the server since rpc can only be done from server O.o ??

velvet kettle
#

RPC is From Client to Server

queen escarp
#

oh right thats true,

#

well its prinitng both from server / client

#

the weird part is that its "working" but only halfly *

velvet kettle
#

also if you are going to want the explode range to be the same on client and server then you need to pass that Random float result through, not just store it on the variable. even if it is a replicated variable, there is no guarantee it will rep fast enough for the client to have the same value

queen escarp
#

true

#

i only did that to se if it was related to the debree but it wasent so

velvet kettle
#

if the event is being called by the actor on the server side try just using a mutlicast event

#

then you can avoid an RPC

queen escarp
#

i was just about to try that

#

nah no help..

#

ohh i think i got it

velvet kettle
#

if it was my thing, i would try... Multicast Event -> HasAuthority (Server) - > Remaining Logic

#

one last advice, since it is just cosmetic in nature, don't make your Event reliable. it is a waste of network

twin juniper
#

u mean unreliable

queen escarp
#

it is unrelieble

#

its not relieble

#

i had the same thought

velvet kettle
queen escarp
#

but if i make it reliable then it cost more networking ??

velvet kettle
#

this should help with the confusion

queen escarp
#

🫡

velvet kettle
#

🤣

queen escarp
#

hm doing it your way with rpc < has authority < logic

#

dosent work since it only happens on the server (with same bugg) its not replicating, physics aint replicated i think someone said ?

#

yeah when i said it it got me thinking, removing replicate make it work on the server

#

since this is an instance thats needs to be run "localy in a sense"

#

yepp now everything works

#

noice

normal valley
lost inlet
#

well, anything is possible if you let the client cheat!

normal valley
#

great point

lost inlet
#

Epic is working on physics prediction but I'm not sure how well it integrates with the Chaos vehicles

chrome bay
#

chaos vehicles are client auth by default so long as you own/possess the vehicle you're driving. I wonder if this is where people are going wrong with it

swift turret
#

looking for a good idea how to replicate "movement" while playing montage with root motion.

Problem: i have an attack ability (not GAS unfortunately, cant change that), ability plays montage on client and server (local prediction). But then during ability player can press WSAD and change direction of attack. And here is the problem. With LAG = 200ms player just teleports in different directions if i press WSAD really fast. Client calculates rotation, set it locally and sends it to server. Server changes it, but becuase its late 200ms and because montage is playing, server during that time sends to local player his corrected rotation and it destroys input im pressing. Any ideas?

twin juniper
#

I have a cube placed in the level and this code, but it didn't run (as nothing printed)
Any idea?

#

Should be something like this, right?

swift turret
#

the cube placed on level is owned by server, so calling Server RPC from client will do nothing

#

you would need to move Server func to something client owned, like Player Controller

#

you are calling SetOwner, but you are calling it everywhere

#

even on server, so server sets itselfe as owner, and client tries to set itselfe (not sure if client even can change owner)

twin juniper
#

if i do this it didn't run either

swift turret
#

well yes, as i said, you need to setup owner on server but to client xd

#

getr player controller always returns local player

#

so you need to use smth else but on server side

twin juniper
#

ok, thanks

rain condor
#

I have an inventory where each tile is part of an array. To remove an item from the inventory, I leave the index empty so I can reuse it. The problem is that when you remove it you only do it visually and the tiles it occupied still cannot be used. This works fine on standalone but i'm trying to replicate it

split siren
#

UReplicationGraph::IsConnectionReady function is called during UReplicationGraph::ReplicateActorsForConnection where if it fails, it says it exceeded the budget for this category.

Where are the budgets for each connection defined?
Do I understand it correctly that if the budget for a given connection is exceeded, the "remainder" that has exceeded the budget is stored in Connection->QueuedBits or Connection->SendBuffer?

// UReplicationGraph::ReplicateActorsForConnection
if (IsConnectionReady(NetConnection) == false)
{
    // We've exceeded the budget for this category of replication list.
    RG_QUICK_SCOPE_CYCLE_COUNTER(NET_ReplicateActors_PartialStarvedActorList);
    HandleStarvedActorList(*ConnectionManager, PrioritizedReplicationList, ActorIdx + 1, ConnectionActorInfoMap, FrameNum);
    NotifyConnectionSaturated(*ConnectionManager);
    break;
}
twin juniper
#

what was the problem with my previous code? i don't really catch what you mean

thin stratus
twin juniper
#

the local one as it print on the screen?

thin stratus
#

Sure, but SetOwner has to be called on the Server

#

Client calling it has 0 effect

twin juniper
#

i never read any document about that though. I am not saying i dont trust you, i just need to verify information, do you have any

thin stratus
#

The Engine's Source Code?

#

RPCs require Ownership of the Actor by the Client

#

If you set the Owner locally, the Server will know nothing about it.

#

Otherwise the whole idea about Authority would be down the drain

#

The "Actor in Scene" problem will always require you to RPC in a Client-owned Actor first

#

Such as your Character

#

Unless you handle it via an Overlap fwiw

twin juniper
#

the source code didn't have any authority check though

thin stratus
#

The RPC is the problem, not the SetOwner itself

#

The RPC is dropped by the Server if the Client doesn't own the Actor

#

If you set the value locally, the Server doesn't know you own it

twin juniper
#

so SetOwner is like a multicast?

thin stratus
#

No

#

The Owner variable is replicated fwiw

twin juniper
#

oh, now it all make sense

#

thanks

thin stratus
#

It's tricky to give a better example for your Cube problem, because I don't know what the player is supposed to do with the cube

#

But in most cases, the issue you face is the same that everyone with an Interfaction System faces

#

Which is that interacting with something in the World would need to replicate

#

And for that it needs to be done on the Server

#

And since you can't call ServerRPC on the Actor in the World, you gotta do it in the Character

twin juniper
#

i dont really care about the cube, i am just trying to understand ownership through experiment

thin stratus
#

And then access the Actor (Cube)

#

But you read the Ownership stuff in the Docs and the Network Compendium?

twin juniper
#

but yeah i was trying to print something

#

yes i did read, multiple time, but mp is tricky still

thin stratus
#

Fair enough

twin juniper
#

i dont think you mentioned the ownership can only be set in the server

thin stratus
#

Ownership is luckily really simple. One Player at a time can own an Actor and the Server is the one who has to set a player as the owner.
Ownership then controls replication stuff such as:

  • Being allowed to ServerRPC
  • Receiving the ClientRPC from the Server
  • Using Replication Condition on Variables that have to do with ownership
#

Freaking autocorrect

thin stratus
#

I will see if I add that in the future

#

I think Epic could do a better job on the SetOwner function comment too

scarlet nova
#

hi! Is it possible to replicate map values?

#

I had a struct that has map value inside, but the map does not transfer with the struct on Run on Server calls, it's just null on the other side.

twin juniper
#

wtf

#

i was going to ask the same question rn

scarlet nova
#

hahaha

twin juniper
#

was going to run my code but apparently TMap is not supported

scarlet nova
#

nooo, why it's not supported

#

😔

#

I have to make a converter now, I guess

twin juniper
#

it really is a weird design when TArray is ok but TMap is not

scarlet nova
#

yeah, people say that it was working like a couple versions ago

#

and suddenly it doesn't work again

#

weird

woven bramble
#

Guys, I have a big problem.
When someone enters (or exits) the room (or in the game already, doesn't matter), they get kicked out (or disconnected) of the game, and after being kicked out, they cannot enter the game again, and the find room/lobby doesn't work.
So after the disconnecting, although the internet is connected, it behaves as if there is no internet.
Either when someone sends an invite to this person in the game (and the person accepts), the problem is completely resolved, or when you close and reopen the game.
What could be the reason for this?

#

This problem occurs very rarely and I have been having the same problem for 1 year. I really couldn't find a solution. My game is about to be released.

twin juniper
#

idk anything about ur problem but nah, having a bug for 1 year is wild 💀

pastel reef
scarlet nova
#

maybe your problem is something about that

woven bramble
solar stirrup
#

@scarlet nova @twin juniper you can replicate maps if you override struct net serialization and implement it yourself

twin juniper
#

no thanks

#

too hard for me

woven bramble
#

Would you recommend me to add these to the config?
Engine.ini
[/Script/OnlineSubsystemUtils.IpNetDriver]
MaxClientRate=120000
MaxInternetClientRate=120000
InitialConnectTimeout=300.0
ConnectionTimeout=300.0

Game.ini
[/Script/Engine.GameNetworkManager]
TotalNetBandwidth=104857600
MaxDynamicBandwidth=104857600
MinDynamicBandwidth=10485760

Scalability.ini
[NetworkQuality@3]
TotalNetBandwidth=104857600
MaxDynamicBandwidth=104857600
MinDynamicBandwidth=10485760

thin stratus
#

"the room"?

#

What room?

woven bramble
#

lobby

#

so, I mean "session

thin stratus
#

Right

#

Just the Session, not the Server?

#

@twin juniper @scarlet nova just fyi, TSet is also not supported. Iirc it's due to being not performant to replicate those.

thin stratus
#

@woven bramble Overall I'm not too sure what kind of setup you have where a player Leaves or Joins Sessions while not also joining the Server and leaving it.

The issue itself sounds a lot like you aren't cleaning up the Session when disconnecting.
It should still find Sessions however, but would fail Creating and Joining them.

If you need to debug this you should properly breakpoint the C++ part and see where it fails.

#

I don't think the ini file will do anything about this.

woven bramble
#

In a Listen server, after establishing a session, I connect to the game. Most of the time, the game proceeds smoothly. However, in some cases, the user suddenly disconnects from the game. It cannot establish or find a session. When I send them an invite again via Steam, they can rejoin the game. In fact, they can also create/find rooms as they wish after the accepting the Invite. I'm using Advanced Session.

#

Are you referring to resetting the Join Session/FindSession values ​​(variables) created by the Game Instance, for example?

thin stratus
#

No I meant DestroySession call

#

You will need to debug it

#

I don't think anyone would really know a solution

#

This is a matter of hooking up your VS to it and breakpointing the Find Session logic to see why it fails

#

Randomly disconnecting is also strange

#

You'd need to look at the Logs for that

woven bramble
#

I can't do trial and error method because it's very rare. Also, there are no logs because it's a package already available on Steam. or I don't know how can I look the debugs

woven bramble
lilac lance
#

if I Call SetActorLocation in the server, will it automatically replicate to the clients? or do I need to call Multicast RPCs for that to work?

vestal shale
#

How to replicate sounds and particles ?

mystic estuary
vestal shale
#

And Example would be perfect

mystic estuary
#

It depends where you want to play these effects. If you want everyone to see them, you can do a multicast. If you want a particular client to see that, use the client RPC. It all depends on your needs

mystic estuary
#

Then use a multicast RPC. Since the cosmetics are not important, and missing a sound wouldn't affect the logic in any way, the RPC should be unreliable

vestal shale
#

The FX is only visible to the owning client

#

No others

#

Why is that

mystic estuary
#

Most likely you're firing the multicast from a client, not from the server. Clients can only call server RPCs, while server can call anything. Calling an RPC a client cannot call will fail.

vestal shale
#

Then how do I call that RPC from the server to all ?

#

One server RPC and from there call Multicast RPC ?

mystic estuary
#

If you're starting the logic from a client, then you need to do a server RPC, which in turn will do a multicast RPC

mystic estuary
vestal shale
#

Let me try

#

Works

#

Thanks for your time

mystic estuary
#

🥳

#

You're welcome

vestal shale
#

But I got issue

#

I tried in Blueprint. It works

#

But from C++ it doesnt

#

What could be the issue

#

@mystic estuary

mystic estuary
#

Most likely in your C++ code. Can you show it?

vestal shale
mystic estuary
#

Is the class that you do that from the same as in BPs? What is it?

vestal shale
vestal shale
mystic estuary
#

Character is owned by the client, while your weapon most likely is not, hence you fail to call a server RPC, as the client does not own that particular actor

vestal shale
#

How do I make work then ?

mystic estuary
#

You should make the weapon be owned by the client, so that you'll be able to call your server RPC. I cannot recall how you do that exactly though 🤔 Trying to read through the networking compendium to find out the answer

vestal shale
#

By changing actor ownership or any other means

mystic estuary
#
Each Connection has a PlayerController, created specifically for that Connection. A PlayerController, that is created for that
reason, is owned by that Connection. So when we determine if an Actor is owned by someone, we actually query up to the
most outer Owner and if this is a PlayerController, then the Connection that owns the PlayerController also owns that Actor.
The Pawn/Character. They are possessed by the PlayerController and at this time, the PlayerController is the Owner of the
possessed Pawn. This means, the Connection that owns this PlayerController also owns the Pawn.
#

I'm not sure, but you might need to specify the PC as the owner (or maybe even instigator, but I don't think so) when you create the weapon

#

Like that

vestal shale
#

So, lets say when I equip the weapon, I set its owner to the player controller of the player who owned it. Will that work ?

mystic estuary
#

I have never changed the owner of the actor on runtime, however, you should be able to since character and pawns do that. You might need to look up for the way it's done. It should be something down the chain when the OnPossessed is called

vestal shale
#

I will look into that then.

#

Thanks

thin stratus
#

Cause I know the Player (in my case) should not be in a session

#

Others simply plug DestroSession infront of their Find/Join/Create node

vestal shale
#

Hey Cedric, can you help ?

thin stratus
#

What exactly is the issue?

#

It looks like you already got help

vestal shale
#

So I have a weapon, its has VFX as usual

#

Which I want to be played on all clients

#

I cannot send RPC from the weapon actor, since its not client owned

#

I wanted to know if changing weapon actor's ownership will be good way or send the RPC via the PlayerCharacter ?

thin stratus
#

That's multiple problems

#
  1. Having the Weapon owned by the Player(Character) is a good choice
#

That way you can call your ServerRPC to Fire the Weapon, Reload the Weapon, etc. inside the Weapon.

#
  1. To execute something "on everyone", you need a Multicast, and Multicast doesn't require Ownership, it simply has to be called by the Server.
#

So if you, when spawning the Weapon (on the Server!) supply the Character as the Owner, then you should be able to call Server_FireWeapon on it just fine.

#

And if the result of that Server_FireWeapon is to play VFX on everyone, you can call Multicast from it

#

This is of course without any prediction in mind, but gotta start somewhere.

vestal shale
#

Alright. I will try what you said

solar stirrup
#

I can't wait to try out doing shooting through the movement component

#

feels like it'll make prediction so much simpler

thin stratus
#

@solar stirrup Mover 2.0 creeping up slowly.

quasi tide
#

Very slowly

solar stirrup
#

Latest update allows custom sync types so I can now bind FInstancedStructs to my move data

thin stratus
solar stirrup
#

Yeah ofc

#

I plan to have the client send whether or not it's shooting and hits up to the server

#

Server response can probs be done outside

#

I'll see after stress testing

#

but paired with the GMC's rewind stuff, oooooh mama

#

it's gonna be spicy

solar stirrup
pallid mesa
#

blep

#

projectile interpolation in the pmc works v sweet btw

solar stirrup
#

gmc or cmc

pallid mesa
#

has there been any tutorial out there explaining how to set it up?

#

i could make one

#

pmc*

solar stirrup
#

pmc?

pallid mesa
#

projectile movement

solar stirrup
#

is that vanilla unreal

pallid mesa
#

yes

solar stirrup
#

awesome, gonna put it on my list of stuff to look into

pallid mesa
#

it does verlet

solar stirrup
#

i plan to use hitscans for most close range shots anyway

pallid mesa
#

ye but erlite don use pmc

#

do ur own projectile system

solar stirrup
#

why

pallid mesa
#

cuz using actors for projectiles kinda suck

#

i do it cuz projectile count is v v low

#

but if ur game gonna do projectiles real good

#

do something nice, like s world subsystem implementing arc trajectories

#

and trace between throttled updates

#

u can also predict them v easily

solar stirrup
#

how replicate

pallid mesa
#

the server only needs loc/rot

solar stirrup
#

client cosmetics?

pallid mesa
#

and from the server u can multicast some cues

#

using this loc/rot data

solar stirrup
#

what about tracers

pallid mesa
#

yea if ur projectiles dont have gameplay interactions other than impacts

#

u can use ur static projectile data to know in the client how traces look

thin stratus
#

The only beef I have with the PMC is the amount of stuff you gotta do around it to make it work

#

Partially not even exposed to BPs

pallid mesa
#

think that given a rot/loc + static data u can do whatever

solar stirrup
#

relevancy becomes an issue

#

I don't want cheaters using projectiles to guess where players are

thin stratus
#

Like

thin stratus
#
/**
 * Assigns the component that will be used for network interpolation/smoothing. It is expected that this is a component attached somewhere below the UpdatedComponent.
 * When network updates use MoveInterpolationTarget() to move the UpdatedComponent, the interpolated component's relative offset will be maintained and smoothed over
 * the course of future component ticks. The current relative location and rotation of the component is saved as the target offset for future interpolation.
 * @see MoveInterpolationTarget(), bInterpMovement, bInterpRotation
 */
UFUNCTION(BlueprintCallable, Category="Game|Components|ProjectileMovement|Interpolation")
ENGINE_API virtual void SetInterpolatedComponent(USceneComponent* Component);
solar stirrup
pallid mesa
thin stratus
#

Yeah because no one knows haha

#

There is a lot more to it

pallid mesa
thin stratus
#

You should theoretically also forward the Velocity of the Actor to the PMC

#

Which you can't in BPs , at least not properly

pallid mesa
#

the postnetreceivelocandrot also exi

thin stratus
#

Yeah

solar stirrup
#

I mean I could send copies of the projectile data to different players but that sounds like a lot of work

thin stratus
#

I wonder why they didn't just make a Projectile actor tbh

#

And tie the PMC to it

#

It's somewhat shite idea

#

But better than this

pallid mesa
#

or an index and then client-map it

#

there are more ways like.. have an actor associated with the gun and trigger its visuals from there ..

#

its gameplay code

#

u can be creative

solar stirrup
#

i mean yeah

#

gonna have to in the end :^)

#

just that with the rep graph actors are always simpler for relevancy

#

so this is gonna be fun

pallid mesa
thin stratus
#

Didn't Riot also write about the Projectiles?

#

On top of the characters

pallid mesa
#

cuz i was sockef it wasnt anywhere

thin stratus
#

I think there was something in their post about it

solar stirrup
#

still a bit pissed that rep graph isn't suitable for LWC

pallid mesa
#

erlite enable iriiis screw the repgraph haha

thin stratus
#

I mean, RepGraphis being somewhat phased out anyway

solar stirrup
#

if I have to modify the cell stuff im gonna be sad

solar stirrup
#

what's the state in 5.3

pallid mesa
#

ima be honest

#

it kinda works

#

kinda

thin stratus
#

I heard it somewhat works just fine

pallid mesa
#

ye

thin stratus
#

But one will have to wait for proper release to be sure I would say

pallid mesa
#

minus some bogus here there

solar stirrup
#

ehhhhh

pallid mesa
#

im usin it in side project

solar stirrup
#

I can take a peak but I doubt i'll be allowed to

pallid mesa
#

if its for ur job, dont

#

:v

solar stirrup
#

if it was my side project I'd be on ue5-main latest with it enabled

#

:^)

pallid mesa
#

HAHA

#

btw physics prediction works like a charm in 5.4

#

:^)

#

but its absolutely broken in 5.3

solar stirrup
#

good to know

#

although GMC doesn't support it anyway

pallid mesa
#

😩

solar stirrup
#

but it might be cool for vehicles if I ever wanna make some

#

tbh I doubt CMC supports physics too heh

pallid mesa
#

it does interact with

#

so it works as a "pusher"

solar stirrup
#

I think GMC works as a pusher too

#

i'll take a look later

pallid mesa
#

and well, ye Ragdolls

#

replicated ragdolls is v sweet

solar stirrup
#

ay

pallid mesa
#

but only root bone

#

i havent tried reping all bonez

solar stirrup
#

sounds painful bandwidth wise

pallid mesa
#

X'D ye

#

all bones ye

#

but chaos sleep calls work now™️

#

so u wont recieve physics state reps when the body goes to sleep in the server

#

so u can just "freeze"

solar stirrup
#

that's neat

pallid mesa
#

yee epic is working hard in chaos

#

🙏

quasi tide
pallid mesa
#

cpu performance improvements

#

thats the main benefit

queen escarp
#

Hey Question, im having the same problem as all mp rookies are having with the CMC for clients on listen server is jittering forward i dont know how to solve it, but i just cam across someone poininting out that i could try to set " bOnlyAllowAutonomousTickPose to false"

how would i do that with BP ? is that possible +

pallid mesa
#

not possible in BPs, no

#

:<

queen escarp
#

hm okey, but is this a common change to solve my issue that you are aware of ?

hollow eagle
#

they haven't provided any actual benchmarks because they haven't switched yet though I think someone said fortnite is moving soon?

solar stirrup
#

if Fortnite starts using Iris then we know for sure that it's solid

#

I noticed that they have been very aggressive with network optimisation in the latest Fornite season

#

Probs because weapons aren't as long range but like, I can see players cull out pretty close

quasi tide
queen escarp
#

@pallid mesa

#

where do i change bOnlyAllowAutonomousTickPose to false"

#

is it inisde the character c++ or Cmc++ ?

pallid mesa
pallid mesa
queen escarp
#

I believe I encountered the same issue in my game - unfortunately the only fix I could come up with involves c++.

In the CharacterMovementComponent source you'll see the following comment:

// If not playing root motion, tick animations after physics. We do this here to keep events, notifies, states and transitions in sync with client updates.

before a manual call of the animation tick, so the animation of remotely controlled pawns on servers only ticks at the rate of updates from those clients.

So it is possible to override that MoveAutonomous function to not manually tick the pose, and set it back to normal by changing your Character class mesh's bOnlyAllowAutonomousTickPose to false.

However they clearly had legitimate reasons for doing this, and there will surely be repercussions I haven't figured out yet.

As to whether or not this is normal I think listen servers are a bit of an afterthought in most of these project setups for Epic, on headless dedicated servers animation ticking generally doesn't matter (this bug only manifests on the server machine).

#

maybe this is not what im after even

half drum
#

working on a lobby system, my idea is to override the gamemode postlogin and logout functions so they broadcast a multicast delegate telling players to update their current player count in the lobby widget, does that sound like a decent way of doing it?

solar stirrup
pallid mesa
#

ye it goes brrr

quasi tide
#

Now imagine what could be achieved if they fixed the component transform system. Then @signal lance will finally find peace.

#

(Now BM is probably wondering why he has a red notification in #multiplayer 😈)

solar stirrup
#

What issue are you talking about

quasi tide
#

It's BM's holy war against UE

#

One that he will spend a lifetime waging on our behalf 🙏

clear island
#

is iris meant to be compatible with the current replication system? as in, its something to be used alongside the normal replication system?

thin stratus
#

It replaces it by more or less not breaking your game :D

quasi tide
#

It's supposed to be an as-drop-in-replacement-as-possible solution

#

But it's not marked production ready

quasi tide
#

Mover 2.0
AnimNext
Iris

👆 Things I want 🙏

signal lance
clear island
#

I've held off on the repgraph and just been using push model, lets see if it pays off 😄

hollow eagle
#

it's also not-quite-drop-in, custom struct serializers need to be rewritten (though a lot of the situations where you'd need a custom netserializer are now entirely unnecessary)

#

and certain specific features are outright unsupported, like subobject net group conditions and the old ReplicateSubobjects method (which is old and icky anyway, the replicated subobject list is way better)

solar stirrup
#

Ah yeah

#

noticed transform updates are pretty expensive

#

subobject net group conditions
that's annoying, but do they provide an alternative?

clear island
#

nice, I'm not using any of that so far, I'll try to keep it that way

hollow eagle
#

not sure if they're planning to implement it later or what

#

it might be doable with custom object filters though

#

haven't really looked into it

#

there's nothing quite as simple as COND_NetGroup though

#

which is kind of dumb because netgroups are a fairly recent thing, introducing them and then immediately making them useless is silly

solar stirrup
#

yea

hollow eagle
#

actually there's some sort of per-connection filtering API but it's not well documented. net object filters will work but again, not quite as simple.

chrome bay
#

Isn't NetGroup new to Iris though?

hollow eagle
#

no, it only works in the old system

chrome bay
#

ah kk

hollow eagle
#

hmm, actually my info might be out of date

#

it looks like at least in 5.3 there's some functions updating object filters that mention COND_Group (which I assume is a typo for COND_NetGroup)

#

not sure if it works though, will have to test it

solar stirrup
#
 Iris

Increase max registered groups from 4 to 8
#

kinda looks similar

hollow eagle
#

that's what this seems to be leveraging

#

but it's not clear whether it actually hooks into netgroups yet

#

yeah, APlayerController::IncludeInNetConditionGroup calls into UpdateSubObjectGroupMemberships in iris

#

except... for some reason nothing actually tries to update subobject membership. So it's either intended that you call into FReplicationSystemUtil::UpdateSubObjectGroupMemberships manually after modifying an object's groups or it's just unfinished

rose pollen
#

is there a built in "teleport but try and adjust location" function similar to the spawn actor option to "try and adjust location but always spawn"? I have a blink ability in my game and am running into issues where occassionally the spot the player wants to blink to ends up intersecting with another actor and I want the server to adjust the TP location if the basic teleport fails. I'm wondering if I need to roll that code myself or if there is something built in

solar stirrup
pallid mesa
quaint knot
#

first day doing multiplayer in UE............ I'm considering doing UEFN 😂

hollow eagle
#

and when I say serialization I mean custom, basic uproperty stuff works as always

solar stirrup
#

Iris' getting almost daily updates at least

#

well

#

at least for the last two weeks or so

#

progress seems to have been consistent so hopefully we get more news soon

hollow eagle
#

lol i tried to add an object to all of 2 netgroups and it asserted saying it was in too many iris groups

#

guess that explains why they bumped the limit in that commit

#

I guess iris already uses something like 3 groups ugh

solar stirrup
#

why even limit it

hollow eagle
#

perf

solar stirrup
#

i mean yeah i guess but that bad? vaultsweat

hollow eagle
#

wait this check is bizzare, this object isn't a member of any groups and it's complaining, wat

#

oh wait

#

it's a bug in iris, it asserts if the object is already in a group and you try to add it lol

#

but the message complains that you have too many groups

#

lol, they removed the assert entirely in main

#

just an extra log complaining that an object has high group membership. They might have removed the hard cap too.

#

Guess I'll just leave this off until 5.4 :/

solar stirrup
#

yep

#
    struct FNetObjectGroupMembership
    {
        enum { MaxAssignedGroupCount = 8 };
        FNetObjectGroupHandle Groups[MaxAssignedGroupCount];        
    };
#

before

#
    struct FNetObjectGroupMembership
    {
        enum { NumInlinedGroupHandles = 2 };
        TArray<FNetObjectGroupHandle, TInlineAllocator<NumInlinedGroupHandles>> Groups;
    };
#

now

#

seems like they just don't care about group count anymore heh

hollow eagle
#

they do, they have a warning in logs now

solar stirrup
#

oh

#

what does the warning say

hollow eagle
#

"you have lots of groups lol"

#

previously they just asserted

pallid mesa
#

"QUANTIFY THAT!!"

#

lots

#

haha

solar stirrup
#

static int32 CVarEnsureIfNumGroupMembershipsExceedsNum = 128;

#

is it a net object with 128 groups or just 128 groups in total

hollow eagle
#

it's an object in 128 groups

#

there's no limit to the total group count afaik

solar stirrup
#

i guess it makes sense

#

dunno why you'd shove an object in so many groups

flat halo
#

Hi, is there a way to make the Find Sessions node work with VPN LAN?
I am trying to integrate OnlineSubsystemNull and Sessions.
Before I was connecting by typing the IP and it was working for LAN and VPN LAN.
But with Sessions I am not being able to see the sessions.
I tried with OpenVPN and also Hamachi.
I tried with the bIsLan flag checked and unchecked, both for hosting and finding sessions.

Thanks.

livid jetty
#

I run this from menu level, it fails with error:
CreateSession - Invalid player state
How do i change player pawn before creating session ?

#

But i want to change pawn only OnSuccess

mystic estuary
livid jetty
inner cove
#

Hey guys. What's the best way to determine if a code is running on an owning client? The server does a multicast but the owning client must not run the code as it has already run it locally

mystic estuary
livid jetty
#

maybe i need to create networked "lobby" character only with camera and then switch it ?

mystic estuary
#

If at the moment that you hit the CreateSession you already have a spawned character, then you need to destroy it, spawn a new one, and possess it using the associated PC

vestal shale
#

What will be the result of this IF STATEMENT

solemn dirge
#

hey guys, anyone have any idea why my server browser isnt displaying advanced sessions ?

The find sessions function isnt failing, I'm not getting the print string. But I am getting the refreshed message

fossil spoke
#

The result if True will be that it exits the function due to the return statement

#

If its condition evaluates to False, then the Fire function will be called

vestal shale
#

I actually wanted to exclude the client who performed Multicast RPC from server

#

So I found that piece from somewhere. Wanted to know the meaning

#

Anyway, I understood

fossil spoke
#

Its useful to not use single line conditions followed by statements

#
if(Condition)
{
    Statement
}
#

Instead of

if(Condition) Statement
#

Much easier to read the first

#

And reason about it as well.

#

Try and follow Epics coding standard.

vestal shale
#

I know. But coming from out of Unreal Ecosystem. Got used to not using braces for one liners

fossil spoke
#

Personally, I think its lazy and poor form. But generally you should follow the standards that have been set before you.

#

If I moved to a code base where single line was a precedent, then I would conform.

languid bridge
solemn dirge
languid bridge
#

Ah, hell, I'm a dummy. Turns out 'should advertise' is real important to have ticked. Now I can get both server types to work.

solemn dirge
#

are you using advanced sessions or default nodes

languid bridge
twin juniper
#

Can i create widget at the start of the game by doing this at BeginPlay of PlayerController?

#

i have 2 players but only the Server player's RPC is going through

#

i guess it could be because client side's PlayerController didn't exist yet, so the RPC wouldn't be run

#

shouldn't it be waiting or something, or this is intended behaviour?

#

i guess ill just call a normal function but onrep_owner

twin juniper
#

2 - I have another question too, say i have a cube on a machine, can a pointer on another machine which is pointing to that cube, get variable out, or even exist (!nullptr)

#

i mean like pointer to the exact cube, is it possible

nova wasp
#

an RPC/replication packet sending over an object pointer will turn it into the other client's local object pointer if it is replicated etc

twin juniper
#

i mean the cube on the original machine

#

not the replicated one

#

how do i phrase this

twin juniper
#

Hmm my RepNotify didn't run on the server, i used it to update the widget each time an item changed

#

Client RPC worked though

#

is this intended behaviour that RepNotify didn't run on server player?

#

that's weird

#

actually not weird because the server's variables is not replicated at all

#

hmm

weary saffron
#

Hi! Please tell me exactly how variable replication works.
Does the server constantly send the current value of the variable?
Or does the client send an affirmative response back to the server about receiving the value of the variable to stop sending?

chrome bay
#

The client acks the change eventually yeah

twin juniper
#

should i turn on network emulation all the time, to know what is the right thing to do?

#

turned it on but it make my client movement very glichy, not sure if that is how it should be

chrome bay
#

Shouldn't be that bad. If you're running the editor at very high frame rate however it will cause problems. Look at the logs to see if any warnings are present.

nova wasp
#

1% packet loss is quite a lot and you might even have ~300 ping here lol

#

this is like "does my game come apart at the seams when mom turns on netflix" testing

twin juniper
#

turned it off, now it's smooth

twin juniper
#

my level is reload when RPC validate return false lol
This is my first time using RPC validate, is this what it suppose to do?

#

i thought it gonna just cancel and do nothing

chrome bay
#

Returning false will kick the player immediately.

#

_Validate is meant for things like cheat detection / validating input params etc. Generally speaking it's usage is actually quite limited due to the lossy/latent nature of MP

twin juniper
#

🤔

chrome bay
#

If you want to handle it gracefully/softly you just early out in the _Implementation as normal

twin juniper
#

yet we have a validate for every single server rpc

chrome bay
#

You don't have to

twin juniper
#

really

chrome bay
#

Just remove the WithValidation part of the declaration

#

Or you can just return true, which is what most do.

twin juniper
chrome bay
#

Try it

#

Then remove the function declaration if you've declared it yourself

nova wasp
chrome bay
#

main thing is you just want to make sure the game can recover eventually, i.e. it's still playable even if the experience is terrible

#

bonus points if you can make the experience not terrible though

twin juniper
#

bro i swear the document is a lie

chrome bay
#

Where is that from?

twin juniper
#

**r e q u i r e **

chrome bay
#

Validate funcs have been optional since like 4.15

#

Unreal Documentation being almost always out of date or just complete nonsense is common knowledge unfortunately

#

Although that page in particular seems to have some blatant formatting issues

#

Anyway all that aside... validate functions are really just to make sure the client isn't sending utterly nonsense data, but it's important not to be too over-zealous otherwise clients can be kicked purely because they don't have the latest state etc.

thin stratus
#

I could swear it wants you to have a Validate function even if not using it

chrome bay
#

yeah it was a loooooong time ago they removed the requirement

thin stratus
#

That confuses me, I could swear that requirement was still a thing when I worked on The Ascent, which was 4.26+

#

UFUNCTION(Server, Reliable) is enough then?

chrome bay
#

Yeah, then just don't declare or implement the _validate part

thin stratus
#

Hm, looking through a 5.0 project, all Server RPC have WithValidation. Maybe muscle memory

chrome bay
#

Yeah, tbh most of mine still have it 😄

nova wasp
#

it's not a bad idea to just make an empty one ahead of time I guess?

thin stratus
#

I never used them tbh

#

Like, never

#

I see their benefit

#

But never found a usecase

chrome bay
#

yeah very rarely for me, have used them a handful of times but definitely not for everything

thin stratus
#

99% of a the time, the Client doesn't send anything to the Server, and when it does, it's nothing to disconnect for if it#s wrong

#

Would probably be good to have a proper usecase

#

Could add that to my docs

#

Cause I don't think I have an example there

chrome bay
#

I've used it for weapon firing but that's all i can remember off the top of my head

thin stratus
#

Hmpf m,y docs also stil lsay WithValidation is required

#

I'm out of date

#

How dare I

chrome bay
#

tbh now everyone just uses GAS for everything I imagine it gets used less and less

thin stratus
#

Should I write a quick GAS presentation to cheer you up?

#

Pretty sure you ranted about this on Twitter already haha

chrome bay
#

I like GAS but it's a square peg being jammed into every shaped hole atm

#

Cues are the same, blunt solutions for specific problems

nova wasp
#

I wonder if they knew how widespread it would get back when making Paragon

thin stratus
#

That's true, but one of the reasons for that is that sometimes it's the easiest alternative to not using GAS

nova wasp
#

if they would have at least made some things less insanely hard coded lol

chrome bay
#

I guess I'm just not a fan of 'lets solve everything' things 😄

thin stratus
#

If the rest of the Engine would feature more lightweight solutions, it would probably be more ignored.

nova wasp
#

it really is a good idea for many things but MAN it's just so awkward sometimes lol

thin stratus
#

The only problem about GAS for me is the Prediction Code

nova wasp
#

I looove having duplicated negative predicted effects

thin stratus
#

The prediction code is really not great. It feels so half baked

nova wasp
#

hey, worked for the Moba they made

chrome bay
#

I'm just bitter since I had to write my own attribute system recently and it would have been nice to leverage at least some of the lower-level types in GAS but bleh

thin stratus
#

Yeah and the MOBA I work on struggles due to it

#

So not sure what they all hacked together

thin stratus
nova wasp
#

iirc the plan is to rip out the nicer more generic parts (tags etc?) based on engine commits to let others use it without the rest but I don't know

thin stratus
#

Such as GameplayCues?

#

Tags are already not part of GAS iirc

chrome bay
#

But the as-of-yet unannounced project I worked on last used GAS everywhere and it was actually beneficial for that project. But current project not so much.

nova wasp
#

no, but gameplay effect rules and the state machine they create kind of is

#

tags are generic of course

thin stratus
#

@chrome bay You know what's really bad? That Lyra uses it and people use Lyra for everything as a base.

nova wasp
#

I misspoke

#

Lyra has some awesome ideas and some very "oh god" ideas for anything that isn't a mega sized project

chrome bay
#

Cues, the extra gameplay tag stuff and the prediction stuff can be used generically. Very annoying that it's locked into GAS atm, but yeah they are meant to be changing that.

thin stratus
#

We have a customer with a party like game, bit more couch coop, N64 times fun with jumping around, collecting some power ups, and stuff.
And they use Lyra and thuse all the GAS stuff

chrome bay
#

I do like GAS generally speaking, just some areas could really do with being updated and/or less locked down. But I also think folks generally tend to do literally everything inside it rather than supplement it where needed, and it gets quite cumbersome

thin stratus
#

Just give me proper prediction

#

And I would be super happy

#

Let me pass data to the Server ActivateAbility call

#

Ensure GE actions are all predicted

#

Ensure the Movement stuff ties into it well

#

Movement Buffs shouldn't be such a pain

chrome bay
#

Yeah interlocking it with movement is probably never going to fully happen I suspect

thin stratus
#

Well, Movement is going to use the NPP

#

afaik

chrome bay
#

Problem is movement needs to operate on it's own frequency, and anything affecting it needs to be in lockstep with that or it all goes out the window

thin stratus
#

With Mover 2.0 I suspect

#

But GAS is not gonna be updated to use it I bet

chrome bay
#

yeah doubt it

thin stratus
chrome bay
#

I don't know if it can be solved generally, unless you have complete game state prediction and rollback

thin stratus
#

Overwatch shows that it's easy enough

#

One just can't start making multiple systems

#

With different features

#

The SavedMoves and all the logic around them would need to be extracted

#

NPP basically

#

So GAS and CMC can push to it and be controlled by its corrections

nova wasp
#

I'm trying my hand at a "sort of" rollback style setup with fixed ticking from scratch in order to that "just write the damn ability" setup

thin stratus
#

The beauty of that working hand in hand

chrome bay
#

yeah, but I cant even begin to imagine how badly that scales too

thin stratus
#

I'm sure this can be coded to scale well

#

Epic has the brains for that

#

But not the priorities

#

;_; Some nights I dream of the Debug Tools the NPP has

chrome bay
#

The troubling part is prediction and rollback of the entire game state, and not everything can be trivially resimulated

nova wasp
#

of course not, so I'm replacing it all lol

chrome bay
#

I can see that being incredibly hard to solve at a generic level

nova wasp
#

I'm expecting to have to throw up my hands and go back to regular old snapshot style eventually

chrome bay
#

Were you can just code things however you want and the engine goes "yeah k then I can cope iwht that"

thin stratus
#

I mean it would be mostly opt-in, right?

#

You only use it where needed. In most cases CMC and GAS would be the only things using it

nova wasp
#

ideally yeah

#

the CMC is already a tiny fixed ticking sim

thin stratus
#

GAS fully replaces any kind of Weapon Logic anyway

#

And if GAS isn't there, then the small ssystems like shooting a weapon aren't gonna impact it

chrome bay
#

I think also it's partly that all those systems then have to work in lockstep, CMC and GAS activations etc. would all have to be fully syncronised

#

IDK, it's a tough one. Maybe they'll find a solution one day but IDK.

thin stratus
#

That is correct, they need to use the same Timestamp on client and server

#

I don't think they will, but NPP and Mover 2.0 goes in the right direction

chrome bay
#

now add physics on top party_manny

thin stratus
#

No

nova wasp
#

everything to do with creating the "container" to send over is so bananas, it's frustrating to not have one holy blob of stuff as the input and have to pray rpcs come in on the same packets

chrome bay
#

At least the physics side of networking has gotten way better out of the box 😄

#

Definitely not bitter I spent years doing that myself

thin stratus
scarlet nova
#

hi there! Is there a node like "Is Owner" similar to "Is Server"?

thin stratus
#

Possessed Pawns and Characters have IsLocallyControlled

scarlet nova
#

that's what I needed, thanks a lot

thin stratus
#

Other actors would need to get the Owner and simply check

nova wasp
#

each actor CAN have a defined Owner but this is generally relegated to PlayerControllers/Pawns etc

you might be more concerned with local roles and netmodes etc

thin stratus
#

If you are strict with what you pass as the owner, you can also expect certain Owners to be Characters and cast them to use IsLocallyontrolled again

twin juniper
#

why pawn have that but playerstate dont though

#

strange design

thin stratus
#

PlayerState has an Owner

#

Ah you mean IsLocallyControlled

scarlet nova
#

do AI controllers have the server as owner btw?

#

probably no, but still asking :p

twin juniper
#

yeah

thin stratus
#

PlayerState's Owner is the Controller @twin juniper
If it's invalid you are on the SimProxy. If it's valid you can check the Owner (by casting it to Controller or PlayerController) if it's locallyControlled.

#

So in theory it has it, just with some extra steps

chrome bay
thin stratus
thin stratus
chrome bay
#

People spend so much time what-iffing about future features they might want they're too afraid to write non-generic code.

thin stratus
#

Basically making it more accessible

chrome bay
#

Yeah but in part I think that's part of our problematic game dev culture where we want to solve all potential problems with one system 😄

#

I say this as someone who partakes btw 😄

thin stratus
#

True, buuuut this is also a bad example because here you'd really want one system that ticks in sync

nova wasp
#

I dislike how rollback is explained

#

it makes it seem like it's doing some crazy heuristic to guess what buttons you would push

#

when it's literally just "the same input repeated" most of the time

thin stratus
#

In theory, Prediction and Rollback is super simple

#

There is just a bunch of boilerplate sh*te needed to support it

#

E.g. stuff to ensure the Timestamps work properly

#

And then the layer of cheat protection on top

#

E.g. that stuff that Epic has disabled by default on the CMC 🙄

nova wasp
#

of course life is easier when the game state is a bunch of ints in street fighter 2 or whatever (insane emulation fun aside)

scarlet nova
#

meanwhile suffering inside the pile of structs, maps and arrays

real ridge
#

EOS servers are again down?

#

last week EOS was not functioning and I am having problems again since yesterday

twin juniper
#

I kinda finished my inventory system and now i am having an annoying delay, because everything is run on the server then replicated down
Should i make a custom prediction system or something? How do you guys normally do this?

#

like when drag and drop item in inventory, it go to server to check if there is enough space, then it go back to client to display

#

Maybe f*ck this, im not AAA studio so i let this as a feature

#

Slow paced game anyway

thin stratus
#

@twin juniper This is indeed the point at which you'd need to add prediction

#

There are multiple stages to this, the first would be to simply perform the action locally already

#

The next stage would be only replicating it back to the client if the Client did something that the Server deemed wrong.
So you'd tell the Server in the RPC what the Client did and if the Server can't do the same, send a correction, otherwise do nothing (or ack the whole thing)

#

But honestly, doing it locally first should already be fine

twin juniper
#

..unless someone cheated, right

#

so prediction, got it, i'll figure it out someday

#

thanks

thin stratus
#

The Server would only perform the Action, not accept the results

#

You tell the Server "I moved Item from Slot X to Slot Y and my result is that it worked."
And then the server does the same.

#

If the result says "doesn't work" cause there is an item in the way, it sends the latest state back to the Client and corrects the UI

twin juniper
#

but what if before the server send the correction, the player chain another action in based on the result of the previous one

#

and they chain a bunch of locally executed actions

#

then the server correct all of them?

#

maybe im just overthinking

thin stratus
#

The Character Movement component basically does this too

#

The Client saves locally in an Array what stuff they did, with a Timestamp to it

#

The Server gets told what Timestamp this was executed on

#

And then sending a correction for just that timestamp

#

The Client then discards everything that is older from the array, + the entry that got corrected, applies the correction and replays the newer entries in the same frame

#

But in all honesty, that is most or less too much for UI

#

At least imo

twin juniper
#

i have to implement all that timestamp stuff myself?

thin stratus
#

Yeah this is what I meant when I talked about "boilerplate code" in an earlier conversation with Jambax

#

You can maybe "take" the Timestamp from the CMC ha

#

It's also generally a good idea to implement a better net clock (there are pins for that in this channel) to have an easier time with this

#

If you want the UI to be smoother, I would start with predicting and having everything corrected

#

If you really want to go the full way, it gets a bit of work

#

I don't see the need for reconciliation on UI Item Movements tbh

twin juniper
#

wow. Multiplayer is hard

thin stratus
#

Yes

twin juniper
#

i read some of their conversation, and Vaei github page, some part said that GAS is not always work
i should be ready for some heavy lifting myself i guess

real ridge
#

What are possibiliets of multiplayer game in unreal engine and what are the most common used in games I mean when game is going to be multiplayer you can make it via EOS or any other approaches?

glad cloak
#

Hey everyone, I'm new here so I'm not sure if this is the correct channel to be asking questions about replication, please let me know if I should go somewhere else.

I have a question regarding inventory replication, I'm making a spatial inventory system based of off Reid's 4 part series, but I need it to replicate and work in multiplayer. I have an issue currently where the server is correctly aware of the client's inventory, but the client constantly thinks it is empty. Is there something obvious I'm missing about replication here or is this not a replication issue? Let me know if you need more info.

solar stirrup
#

what do you replicate for your inventory

vagrant grail
#

Is there a premade method for the nameplate on top of players to always face the camera of the local player ?

solar stirrup
#

should make it always face you

vagrant grail
rich crag
#

I need help debouncing a constant overlap for server authorization checks... I have a ship with a helm that has a collision that checks for overlaps (proximity) before it adds a player to an array for authorization checks. The problem is, when the ship is moving fast enough, it registers many rapid overlap/ end overlap, and because of this, it never meets the qualifications for authorization (because server checks proximity again and does not get a positive overlap). I have attempted some debounce code, but it doesn't seem to work as expected.
can anyone tell me why, or a better way to debounce the overlap for the checks?

#

depending on timer length, i can get it to work about half the time but thats the best i get

solar stirrup
solar stirrup