#multiplayer
1 messages · Page 148 of 1
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
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.
the drop logic is done through a multicast that is done through the server
A Multicast?
yes
Are you doing "Multicast" -> "SpawnActor"?
yes
That's wrong
whats right?
Only call Spawn on the Server
k
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 :<
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?
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.
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
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"
if a variable is set to replicated and it changes on the server, will it automatically change for the client
--
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.
Yes, that's the idea of Replicating a Variable. That only works in one direction though.
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
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.
thank you for taking the time to explain to me in detail how networking works. its all working now.
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. 
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 
Latency shouldn't matter. Package Loss would though
Nah it's all 0
Server emulation entirely off
Visible correction on client when another pawn stops moving 
Oh. Um. How to mitigate it then? It's extremely noticeable even with 0 latency
The bright side is that increasing latency doesn't seem to make it worse, somehow
Check if you can find anything in the settings of the CMC
I poked around with smoothing settings to no avail
Switching to linear or even disabled changed not at all
The SimProxy basically continues based on its last info. Which would get corrected backwards when suddenly stopping
Maybe it's less noticeable with a properly animated character, and is only so obvious rn because the characters are just capsules 😛
Might be. It shouldn't be so bad that you get annoyed by it. Every game usually has that to some degree
I guess since it took me this long to notice it all I'm just fixating 
Curious that it doesn't seem to get worse with more latency
UActorComponent::OnRegister is also called client-side ?
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.
do anyone know why the server / clients treets the replication of the fracture diffrerently ?
Physics is not deterministic
left server rigtht client
This is how it's always been in like every game I've ever played
yeah but thers 0 debree at all on server
Oh is that every time? I thought that time it just sort of fell into one spot
no every time
Looks like they are getting stuck somehow
On each other 
see how the back is sorta spazzing out
I don't think this has anything to do with replication
once it breaks into separate parts it doesn't seem like it's replicating anymore
yeah...
I don't think you would want the pieces to replicate anyways
If the server destroys the chair, is the situation reversed?
weird that it's right for the client and wrong for the server
its reversed
yeah
Ok so it's something with how you are communicating to the other players that you broke it 
or acctually no
my mistake
always broken on server only
even if server kills it
That's weird as hell
yeah and if i play as standalone then it works for the server/client
uhm.,..
maybe its because im RPC´´ing replicated components
?
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
Is doing player input in playercontroller best practice for multiplayer?
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?
Or are there other elements I'm missing
Hi, is there a way for me to implement passwords into sessions without using advanced sessions or another plugin?
There's always a way 😛
working on an asset pack so need to keep everything stock
If the plugin can do it surely you can too, right? 
the plugin did it with C++, which i am definitely not familiar with haha
Sadly no that's way above my paygrade 
was wondering if its doable in bp
Hmm
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
My completely asspull guess is that you're probably going to want C++ for something like that
seems like we always do
seems like it right
It highly depends on your game as well.
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.
Have anyone used Easy Anti-Cheat in own game? People say it is free but can I use it on my Steam game?
So there are still advantages to Server Auth of the CMC.
Even if you dont care about cheating
Ask Easy Anti Cheat?
What restrictions there are to using their product.
I just found out about beacons. Is there someone who could help me understand how to use these in blueprint?
Beacons, from memory, are not usable in Blueprint without setup from C++.
Beacons are an advanced feature.
Beacons are a good way to deal with Passwords though. So you are on the right track.
I was actually able to make a beacon actor if that's what you mean
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
right that makes sense
do you reckon it is possible at all to create a password system without the use of C++?
There are alternative methods.
They are inelegant however
And you have to accept some inconveniences
id be happy to learn them
Actually, thinking about it now, there might not be.
I dont think you can refuse connections in Blueprint alone.
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
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
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
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.
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
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.
Sure that makes sense and had occurred to me. So is that the only other consideration really?
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.
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?
Only if that Sessions information remains identical.
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.
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.
Perfect, thank you!
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.
Yeah makes sense. The issue that occurred to me was something like a sealing door getting desynced. if it's closed on server but not client, then with server auth, player would get corrections and be unable to pass thru the door. But client auth he can walk right through.
At least for my case all the examples I can think of are contingent on something else bugging out first 
Yeah precisely.
Ummm

These... won't stay checked ... 
Other settings work fine
But these are off every time editor starts again


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?
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 
@lucid badger Yes
So if the owner and the actor were spawned on the server in the same frame, the owner might be lost in the client side?
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.
There is no guarantee of replication order, so in that case it is not.
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.
got it, really appreciate it!
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?
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.
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?
Generally speaking the HUD class is used as a central point to generate and manage overarching Widgets.
It is an ideal place to create a "HUD".
So basically it would just be what spawns/instanciates your HUD Wigdet.
ok
Instead of whatever current setup you have with those RPCs
The HUD Class is created when the PlayerController is.
does every player controller have a HUD class automatically?
Yes
it's not the same thing as this blueprint class I'm seeing under blueprints?
The naming convention is confusing.
It is a Blueprintable class.
AHUD
It is not a Widget
ok so it calls the widget that I made my hud in?
You can change the default HUD class on the GameMode.
What is the HUD Class in Unreal Engine 4.
Source Files: https://github.com/MWadstein/UnrealEngineProjects/tree/WTF-Examples
Note: You will need to be logged into your Epic approved GitHub account to access these examples files.
this thing?
It doesnt do that for you, you manage that within the HUD Blueprint you override.
looks like I need to do a deep dive in this
Im going to guess so, as I havent watched that video.
ok thanks for setting me in the right dirrection
That is a direction, might not be the right one. That all depends on your needs 😛
But sure thing.
Good luck.
it sounds like it's a good dirrection
👍
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?
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.
Io, i have an inventory system with array. When i drop an item i remove it from array but still takes up space
You are just emptying the element, you arent removing it.
Call the Remove function on the element index instead.
But I have a spatial inventory where each tile is part of the array
I leave it empty so I can use it again
THis is probably better discussed in #blueprint as I am unsure how this relates to #multiplayer
Ok well you never specified that, probably should have led with that context.
But on mp when i remove an item, only dissapears vissualy
Is RemoveItems only called by the Server?
And you are relying on Replication to see that change on the Client?
morning guys, im trying my luck here again
why is there no debre spawning on the left side (server) but on clients it works ?
best guess with little info, you are spawning it on the client, not the server
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*
when in doubt, throw in print strings and HasAuthority nodes
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 ??
RPC is From Client to Server
oh right thats true,
well its prinitng both from server / client
the weird part is that its "working" but only halfly *
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
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
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
u mean unreliable
no, i said dont lol
but if i make it reliable then it cost more networking ??
this should help with the confusion
🫡
🤣
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
i was wondering what kind of solutions people have come up with too replicate chaos vehicles nicely. out of the box i am getting lots of jitter (i guess this is down to lack of client side prediction?)
this looks like an interesting pack, does anyone have experience with it?
https://www.unrealengine.com/marketplace/en-US/product/advanced-vehicle-system
Fully Network Replicated (Client Authority Model)
well, anything is possible if you let the client cheat!
great point
Epic is working on physics prediction but I'm not sure how well it integrates with the Chaos vehicles
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
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?
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?
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)
if i do this it didn't run either
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
ok, thanks
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
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;
}
What you are saying is SetOwner won't work on client side, but why does this code still run
what was the problem with my previous code? i don't really catch what you mean
What PlayerController do you think is GetPlayerController getting here?
the local one as it print on the screen?
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
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
the source code didn't have any authority check though
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
so SetOwner is like a multicast?
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
i dont really care about the cube, i am just trying to understand ownership through experiment
And then access the Actor (Cube)
But you read the Ownership stuff in the Docs and the Network Compendium?
but yeah i was trying to print something
yes i did read, multiple time, but mp is tricky still
Fair enough
i dont think you mentioned the ownership can only be set in the server
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
Could be, it's easy to forget that some stuff isn't always clear
I will see if I add that in the future
I think Epic could do a better job on the SetOwner function comment too
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.
hahaha
was going to run my code but apparently TMap is not supported
it really is a weird design when TArray is ok but TMap is not
yeah, people say that it was working like a couple versions ago
and suddenly it doesn't work again
weird
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.
idk anything about ur problem but nah, having a bug for 1 year is wild 💀

you have to leave session to join/create/find sessions
maybe your problem is something about that
Of course, there are already end sessions, find sessions, etc. in the game.
@scarlet nova @twin juniper you can replicate maps if you override struct net serialization and implement it yourself
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
For this problem.
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.
@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.
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?
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
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
My last question is, do you recommend me, creating a Destroy Session when it get to the main menu? Does this make sense?
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?
How to replicate sounds and particles ?
A way of doing that is fire an RPC that does that
Server, Client or Multicast ?
And Example would be perfect
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
I want all clients to see that
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
I tried that
The FX is only visible to the owning client
No others
Why is that
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.
Then how do I call that RPC from the server to all ?
One server RPC and from there call Multicast RPC ?
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
Correct
But I got issue
I tried in Blueprint. It works
But from C++ it doesnt
What could be the issue
@mystic estuary
Most likely in your C++ code. Can you show it?
Is the class that you do that from the same as in BPs? What is it?
No, in BP its the character class
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
How do I make work then ?
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
By changing actor ownership or any other means
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
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 ?
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
Yeah I usually have that in the GameMode for the MainMenu
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
Hey Cedric, can you help ?
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 ?
That's multiple problems
- 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.
- 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.
Alright. I will try what you said
I can't wait to try out doing shooting through the movement component
feels like it'll make prediction so much simpler
@solar stirrup Mover 2.0 creeping up slowly.
Very slowly
Moved to the GMC
Latest update allows custom sync types so I can now bind FInstancedStructs to my move data
Just be careful you don't overfill it
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
jahahaha this is mean

gmc or cmc
has there been any tutorial out there explaining how to set it up?
i could make one
pmc*
pmc?
projectile movement
is that vanilla unreal
yes
awesome, gonna put it on my list of stuff to look into
it does verlet
i plan to use hitscans for most close range shots anyway
why
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
how replicate
the server only needs loc/rot
client cosmetics?
what about tracers
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
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
think that given a rot/loc + static data u can do whatever
ye
relevancy becomes an issue
I don't want cheaters using projectiles to guess where players are
Like
wym xD
/**
* 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);
How do you determine which players get what projectiles
ah ye i was sayin that i didnt see any tutorial settin that up
many ways to do this
You should theoretically also forward the Velocity of the Actor to the PMC
Which you can't in BPs , at least not properly
the postnetreceivelocandrot also exi
Yeah
I mean I could send copies of the projectile data to different players but that sounds like a lot of work
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
u can send s pointer to this net mappable data
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
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
yee right i will likely write a mini blog about how to set it up
cuz i was sockef it wasnt anywhere
I think there was something in their post about it
still a bit pissed that rep graph isn't suitable for LWC
erlite enable iriiis screw the repgraph haha
I mean, RepGraphis being somewhat phased out anyway
if I have to modify the cell stuff im gonna be sad
I wish
what's the state in 5.3
I heard it somewhat works just fine
ye
But one will have to wait for proper release to be sure I would say
minus some bogus here there
ehhhhh
im usin it in side project
I can take a peak but I doubt i'll be allowed to
HAHA
btw physics prediction works like a charm in 5.4
:^)
but its absolutely broken in 5.3
😩
but it might be cool for vehicles if I ever wanna make some
tbh I doubt CMC supports physics too heh
ay
sounds painful bandwidth wise
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"
that's neat
Every time someone mentions iris, my question is always the same. What kind of benefits are we supposed to actually be getting? No benchmarks or target goals or anything like that has ever been provided.
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 +
hm okey, but is this a common change to solve my issue that you are aware of ?
The CPU perf improvement as it stands today is massive, and there's still a lot of potential stuff that they haven't even implemented yet (like threaded serialization).
they haven't provided any actual benchmarks because they haven't switched yet though I think someone said fortnite is moving soon?
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
Dang - was the old system really that slow 😅
@pallid mesa
where do i change bOnlyAllowAutonomousTickPose to false"
is it inisde the character c++ or Cmc++ ?
yeah iris is like - pessimistically speaking x20
not sure about the details, you might want to ask the in the post where u found that 😬
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
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?
That much???
ye it goes brrr
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 😈)
What issue are you talking about
It's BM's holy war against UE
One that he will spend a lifetime waging on our behalf 🙏
is iris meant to be compatible with the current replication system? as in, its something to be used alongside the normal replication system?
It replaces it by more or less not breaking your game :D
It's supposed to be an as-drop-in-replacement-as-possible solution
But it's not marked production ready

Mover 2.0
AnimNext
Iris
👆 Things I want 🙏
this is the tldr #cpp message
thats awesome
I've held off on the repgraph and just been using push model, lets see if it pays off 😄
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)
Ah yeah
noticed transform updates are pretty expensive
subobject net group conditions
that's annoying, but do they provide an alternative?
nice, I'm not using any of that so far, I'll try to keep it that way
nope
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
yea
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.
Isn't NetGroup new to Iris though?
no, it only works in the old system
ah kk
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
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
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
UWorld::FindTeleportSpot() or use the Environment Query System
is there a list of mappings? ie: old relates to new?
first day doing multiplayer in UE............ I'm considering doing UEFN 😂
not really, aside from filtering, prioritization, and serialization everything else either works or is unsupported
and when I say serialization I mean custom, basic uproperty stuff works as always
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
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
why even limit it
perf
i mean yeah i guess but that bad? 
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 :/
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
they do, they have a warning in logs now
static int32 CVarEnsureIfNumGroupMembershipsExceedsNum = 128;
is it a net object with 128 groups or just 128 groups in total
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.
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
You didn't specify the player controller?
I just use default "Character" for camera UI in MainMenu level
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
I'm saying that you get the "CreateSession - Invalid player state" because you're missing a PC. If you want to dynamically tell the game what pawn it should spawn by default, take a loot at the GetDefaultPawnClassForController inside the game mode
I have player character prepared with custom CMC, i just want to switch it when session is up and ready
maybe i need to create networked "lobby" character only with camera and then switch it ?
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
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
What do you mean?
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
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
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.
I know. But coming from out of Unreal Ecosystem. Got used to not using braces for one liners
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.
I've been trying to use Advanced Sessions plugin all day and as far as I can tell it just doesn't work. I can't even get it to return listen servers on LAN, and it doesn't ever seem to actually call Start Session. (Though it also looks like you don't have the Results array plugged in to your ForEach loop)
Thank you for this, I did research and apparently steam sessions only work if another computer has access to the client. I'm packaging right now and sending to another pc to test, If i remember ill keep you posted
If you can figure out LAN sessions with it or point me in the right direction, that'd be cool too. I can get Listen servers to work on LAN with the regular session control nodes, but I can't get dedicated servers to work the way I want on LAN, and I can't get either of them to work on LAN with Advanced Sessions.
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.
and you didnt package the product?
are you using advanced sessions or default nodes
Yeah, without packaging, using advanced sessions. But I'm using null OnlineSubsystem and just testing LAN.
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
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
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
i mean the cube on the original machine
not the replicated one
how do i phrase this
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
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?
The client acks the change eventually yeah
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
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.
in-editor network emulation is reaaaally way worse than reality's common case (bad definitely is imo)
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
you are right, i turned on Capsule replicates for some reason
turned it off, now it's smooth
Internet: Challenge Accepted
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
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
🤔
If you want to handle it gracefully/softly you just early out in the _Implementation as normal
yet we have a validate for every single server rpc
You don't have to
really
Just remove the WithValidation part of the declaration
Or you can just return true, which is what most do.
i dont think that's possible
yeah... it's just constantly bad though bs randomly bad
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
it actually worked
bro i swear the document is a lie
Where is that from?
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.
Really?
I could swear it wants you to have a Validate function even if not using it
yeah it was a loooooong time ago they removed the requirement
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?
Yeah, then just don't declare or implement the _validate part
Hm, looking through a 5.0 project, all Server RPC have WithValidation. Maybe muscle memory
Yeah, tbh most of mine still have it 😄
it's not a bad idea to just make an empty one ahead of time I guess?
I never used them tbh
Like, never
I see their benefit
But never found a usecase
yeah very rarely for me, have used them a handful of times but definitely not for everything
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
I've used it for weapon firing but that's all i can remember off the top of my head
Hmpf m,y docs also stil lsay WithValidation is required
I'm out of date
How dare I
tbh now everyone just uses GAS for everything I imagine it gets used less and less
That reads like you are annoyed at that?
Should I write a quick GAS presentation to cheer you up?
Pretty sure you ranted about this on Twitter already haha
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
I wonder if they knew how widespread it would get back when making Paragon
That's true, but one of the reasons for that is that sometimes it's the easiest alternative to not using GAS
if they would have at least made some things less insanely hard coded lol
I guess I'm just not a fan of 'lets solve everything' things 😄
If the rest of the Engine would feature more lightweight solutions, it would probably be more ignored.
it really is a good idea for many things but MAN it's just so awkward sometimes lol
The only problem about GAS for me is the Prediction Code
I looove having duplicated negative predicted effects
The prediction code is really not great. It feels so half baked
hey, worked for the Moba they made
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
Yeah and the MOBA I work on struggles due to it
So not sure what they all hacked together
Some stuff is being moved out of GAS iirc
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
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.
no, but gameplay effect rules and the state machine they create kind of is
tags are generic of course
@chrome bay You know what's really bad? That Lyra uses it and people use Lyra for everything as a base.
I misspoke
Lyra has some awesome ideas and some very "oh god" ideas for anything that isn't a mega sized project
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.
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
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
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
Yeah interlocking it with movement is probably never going to fully happen I suspect
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
yeah doubt it
I would say it's better to have ONE system in the back of all of them
I don't know if it can be solved generally, unless you have complete game state prediction and rollback
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
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
The beauty of that working hand in hand
yeah, but I cant even begin to imagine how badly that scales too
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
The troubling part is prediction and rollback of the entire game state, and not everything can be trivially resimulated
of course not, so I'm replacing it all lol
I can see that being incredibly hard to solve at a generic level
I'm expecting to have to throw up my hands and go back to regular old snapshot style eventually
Were you can just code things however you want and the engine goes "yeah k then I can cope iwht that"
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
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
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.
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
now add physics on top 
No
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
At least the physics side of networking has gotten way better out of the box 😄
Definitely not bitter I spent years doing that myself
The sad thing is that I thought about driving Ability Activation via CMC a bunch of times
hi there! Is there a node like "Is Owner" similar to "Is Server"?
Depends on the Actor and reason
Possessed Pawns and Characters have IsLocallyControlled
that's what I needed, thanks a lot
Other actors would need to get the Owner and simply check
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
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
yeah
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
tbf this is basically what unreal tournament did to get such good prediction/rollback with their weapons etc. It was bloody awful to look at but it's a very specialised solution to a specialised problem
Thery are owned by the Server, yes. I don't actually know what GetOwner would return here
Yeah but now what is the difference to extracting this system into a centralized place ,and then using it?
People spend so much time what-iffing about future features they might want they're too afraid to write non-generic code.
Basically making it more accessible
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 😄
True, buuuut this is also a bad example because here you'd really want one system that ticks in sync
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
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 🙄
of course life is easier when the game state is a bunch of ints in street fighter 2 or whatever (insane emulation fun aside)
meanwhile suffering inside the pile of structs, maps and arrays
EOS servers are again down?
last week EOS was not functioning and I am having problems again since yesterday
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
@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
..unless someone cheated, right
so prediction, got it, i'll figure it out someday
thanks
since your game does everything on the Server, there is no "cheating" in the regard
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
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
Yes, it would correct them all. This is where Reconciliation comes in.
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
i have to implement all that timestamp stuff myself?
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
wow. Multiplayer is hard
Yes
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
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?
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.
show code
what do you replicate for your inventory
Is there a premade method for the nameplate on top of players to always face the camera of the local player ?
screenspace widget component
should make it always face you
Thx, but I have an issue, it scales depending on the distance, how to make it not do that ?
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
No idea, there seems to be a DesiredDrawSize property so maybe look into that
does nothing in my case
Did you enable bDrawAtDesiredSize
