#multiplayer
1 messages ยท Page 289 of 1
Personally i use kawsi physichs for my hair physich.
Works wonder. Ofc nothing replicated, you dont need to replicate skirt / hair physich.
Also its cheaper than unreal physich.
would it be able to be used for the tail? Is it hard to integrate?
100% you can use it for the tail and it will give better result than unreal crappy physich.
and it works on multiplayer?
Nothing to do with multiplayer.
Every machine sinulate locally
Are you new to multiplayer?
Its a can of worm
Theres no reason to network tail or hair physich
Whats there to communicate for the movement of the hair
yeah i am realizing that it is a can of worms alright
I am getting the same results with kawaii physics
can you show me with 2 players and network latency active?
sure, it has nothing to do with latency
show me your setup
make sure you are not simulating physic
i think it is working?
i just have to make it look like a tail again lol
hell yeah
it's more like a wet noodle right now
but if i can get the settings right
Thank you oh so much!
you are a life saver
was it the cause?
seems like unreal physic is trying to fight kawai phyysich but I can't tell for sure.
yeah the rigid body must have been the one to blame
nah it's just that i didn't touch the settings yet haha
with iris fast array (which i assume is a bit faster that the legacy fast array ?), would a fast array be better than a classic relicated array in the following case:
- dense level, around 30-40 total playing actors
- around 10 to 20 of these actors can be real players (the rest is AIs)
this is for a inventory system, so the arrays will be kinda small (max 10-20 slots)
I am looking into a plugin code where they determining owning client this way
bool bIsOwningClient = IsLocallyControlled() || (!IsPlayerControlled() && HasAuthority());
is this the right way?
this seems confusing ๐
iirc IsLocallyControlled should be enough ?
this is what I believe also
and iirc !IsPlayerControlled() && HasAuthority() would only be useful for dedicated server ?
or server AIs
what I can see from code is they trying to take into account the server version owning client? ๐
you mean listen server ?
not sure
IsLocallyControlled will work on listen server
no idea
so the code is trying to retrieve the owning client only on listen/dedicated?
dedicated sever will never have an owning client
!isplayercontrolled() , seems like they avoiding the local client?
its only a server
i might be wrong but i thought IsPlayerControlled() will return true on the server if the player is player controlled.. regardless of if the player is local or not..
yea thats for IsLocalController tho
bool APawn::IsPlayerControlled() const
{
return PlayerState && !PlayerState->IsABot();
}
yea since playerstate exists on the server that will return true even if the player isnt local
so calling this owningclient is wrong?
bool bIsOwningClient = IsLocallyControlled() || (!IsPlayerControlled() && HasAuthority());
it seems like the source is owning client in any case if its not a bot, local or on server according to code
is the client doing the checking? i'd say IsLocallyControlled is enough
from the plugin developer:
This returns true for the client that should be sending position updates to the server.
IsLocallyControlled only returns true if the vehicle is possessed by the local client. The owner needs to fallback to the server if there is no player possessing it, so in that case we have to know if we are the server and if a player has possession.
and yeah the local client is checking for it when applying steering
ohhh ok, so that returns true on a local client if they are possessing it, but if nothing is possessing the vehicle it will return true for the server.. in that case that bool seems correct
Yeah, so it determines if the owning client is server or local client
Quick question: by default seamless travel persists the player state array. If the server is travelling to a new map and is also applying a new mode that uses a different player state class (e.g. a deathmatch session has finished and now it's going to start a CTF match) would the player states automatically be destroyed and recreated? In this example, the two game modes would be using different player state classes since CTF needs to track stats like flag returns, captures, defences etc which deathmatch has no concept of
The original actors are themselves destroyed, you get a chance to "transfer" data to the new actors after travel.
This is the case even if you don't change class btw.
virtual void SeamlessTravelTo(class APlayerState* NewPlayerState);
And also
virtual void CopyProperties(APlayerState* PlayerState);```
Aah I see, so everything does get destroyed regardless, but all the actors you add to the persist array in GetSeamlessTravelActorList will have the CopyProperties function called on them to allow you to transfer the info you need across
IIRC very few actors in the list are actually kept and transferred to the new world, and only specific types support it IIRC
AController, Pawn, GameMode + GameState IIRC
And the CopyProperties stuff is exclusive to PlayerState, nothing else has it
Yeah looking at the default implementation of GetSeamlessTravelActorList, it looks like the game mode, game state and game session are only persisted during travel to the transition map, but not the final destination
Only player states are marked for persistence across both, but from what I understand that actually means new player states are created, but you get the opportunity to copy data over
So I don't have to worry about my players retaining a deathmatch player state in the new CTF match
yeah
Thank you ๐
you can find more info there: https://wizardcell.com/unreal/persistent-data/#persisting-data-across-seamless-travel
@lament flax thanks!
with iris fast array (which i assume is a bit faster that the legacy fast array ?), would a fast array be better than a classic relicated array in the following case:
dense level, around 30-40 total playing actors
around 10 to 20 of these actors can be real players (the rest is AIs)
this is for a inventory system, so the arrays will be kinda small (max 10-20 slots)
no
based on what?
i wouldn't replicate the entire array i would replicate the changes that happen to it
I'm not sure you understand the situation here
but i guess you could do it with fast array i would just personally prefer normal arrays
Iris can deltas both fast arrays and normal arrays... but normal Tarrays do not get per-element callbacks
you said "no" to them saying if fast arrays would be better there
a fast array is delta serialized
i might have been wrong since it does seem to fit the usecase but still i wouldnt replicate the entire array and just replicate as little as possible like a call to add a item to it
read my message again
Oh thats nice, so iris doesnt send ChangedIndex + all the following when replicating a changed array ?
@formal path I feel like you dont really understand how Array replication works.
FastArray is a bit of a misnomer.
its possible yeah im not that familiar with unreal speicifc things
Then perhaps you shouldnt be giving unreal specific advice.
Without being rude you should tell that before giving absolute raw advice then
if im wrong you can always just explain why
you really should not answer questions about unreal about netcode stuff without having some proof... I'm no stranger to shooting from the hip but this is not something you can just guess
Same for answers of you sending a chatgpt discussion of a copy pasted question :/
lmao
Saw that today randomly
Megafunk already did.
giving bad answers is not good because there won't always be someone around to spend time explaining the correct answers... it's fine to say you just aren't sure
that's not the problem here lol, christ
There is, if your contribution is outright incorrect.
ok then
You really only need a FastArray if you need callbacks for when elements are changed.
that sounds like the conclusion we arrived too indeed
but why would you use per element callbacks ? i still dont think its better
๐คฆโโ๏ธ
it really depends in this case if the elements in your map are static items where you already have the data on the server or if you need to network all the data in the object , when its an inventory i would assume the object data is already present on the server
@formal path Do you even work with Unreal?
general gamedev wisdom is completely valid but they did not ask about how to serialize a container in general as much as about these two unreal-specific options
for posterity having per-item callbacks is absurdly useful for inventory systems... you can for example track things locally in a local tmap etc or just react with visual changes for only 1 element
otherwise you just get an Onrep with the entire Tarray which is pretty annoying to try to track elements being removed or added to
I'm used to working on very large scale MMORPGS where every byte you network matters , so not replicating things is always better then replicating them, we didn't really network our animations at all for example, only actor state
client can figure it out
all I was suggesting is that it might be better to just add item 58 to the inventory instead of replicating the entire inventory
read my messages again please
read fishy's original question
they asked if a fast array is better and you said no
maybe you just misread their question?
read it again
Its all good
and is that true ?
okay, thats wasnt the only "if" back then without iris
you responded "no" meaning that a basic tarray is better there. A basic TArray in non-iris actorchannel netcode would send the entire thing every time
of course you want them to only send the changed elements, but you didn't tell them to do that
hence me saying you might have just mixed up which one is which
ah yeah in that way my answer was wrong
for that reason I tend to try to give wordier answers to describe WHY I think something instead of just telling people what to do without context I guess
so even if some information is lost the uh... reason I think one is better gets across I hope
you did elaborate though fwiw
yeah as for the raw actual packet I am not sure... I would have to consult the serialzier
I can try to find where it happens if you want
why would the packet data be any different ?
If you don't care about change callbacks at all there might be no reason to use a fast array there but imo it's pretty much universal to use a fastarray for inventory stuff (In iris with full delta serialization I mean)
well, the fast array has kind of a local handle to each element I think
it's honestly pretty tough to follow... it might be easier to just do a bandwidth profile of two similar arrays changing
im interested in two things:
- bandwith optimization
- replication handy stuff
i used legacy FA in the past and the callbacks are VERY nice
but i am wondering if iris FA is really something that can help rather than just sexy callbacks
I felt like your main motivation behind it was to save performance
iris has special TArray callbacks ?
no, I mean Iris fast array
or is it like the legacy system, meaning it sends the whole old & new array and you have to compare EACH item to detect changes
i think ill go FA anyways because if each inventory slot is "heavy" data wise its worth having a bit more send & receive CPU cost than bandwitch spam
(listen server setup)
You will want to use a FastArray just for the callbacks with any INventory
but in the future i might optimize more my NPCs so they all share a same FA
oh wait, nest FA isnt supported right ?
wouldnt make sense ? but iris seems to be more abstract ...
are there any good resources to read on unreal replication
there are 4 things here
Regular naked TArray<t> arrays
- Actor channel: sends the entire array (num + element buffer)
- Iris: (delta serializers new elements in replication)
Fast arrays - Actor channel: only sends changed elements, but doesn't preserve order iirc (also with convenient callbacks)
- Iris:The same as above. See IrisFastArraySerializer
see pins
yeah the pins are great.. it's a bit more on the user-code side than the nitty gritty internals though (which is more important usually)
could you expand on what is "element buffer" ?
i mainly just wanne get an idea of how the server-client model is usually handled with unreal because it might be quite different then what i am used too
and i didnt know that, iris doesnt use actor channels ?
or does it limitates its usage
for backward compatibility
basically it's all of the elements serialized in a bitstream like everything else in serialization
@lament flax Optimization for any Inventory, with or without FA is going to rely a lot on minimizing the data needing to be sent.
I'm using actor channels to refer to the old netcode backend. And yeah Iris doesn't have any per-actor channels
Sorry if it wasn't clear but this was exactly what I was trying to say ๐
yeah, your heart was 100% in the right place
Yes but that was not what he was originally asking
Which made that comment unhelpful at the time
so iris doesnt use AT ALL actor channels ?
no, it uses something called a replication bridge
nice
You can manage that a lot by being smart about defining static data that can be looked up on both ends without it needing to be transferred over the network.
Iris internals have no damn clue what an actor is, but there is a wrapper on top of it (UEngineReplicationBridge iirc ) which turns raw "network handles" with member descriptions into AActors created locally and tries REALLY hard to mimic the old netcode 1:1
Iris internals are very very tryhard raw C arrays
iirc on my last system what could be heavy was replicating the fragments of my items (instanced structs)
never changed, replicated once
you don't need to know much about Iris internals unless you are trying to do something that requires changing how it works a lot
InstancedStructs are heavy on that yeah.
also i might not do the same slot (fast array element) + item (replicated subobject) thing
Have you seen the plugin i did a while ago?
read maybe half of the readme before being to bored ... ill give it another chance
I did a free plugin which has InstancedStruct inventory replication.
that was 2 years ago
what was different ? did you implemented a custom serializer ?
Well not anything out of the ordinary. I more meant that perhaps looking at how I handle all sorts of different data might give you ideas on where to go with yours.
Idk if this helps much but unreal replication is very much oriented around there being 1 server that is the "authority" and connections from clients are almost always just to the server. Each client only talks to the server and receives replicated properties and object creation/destruction info along with RPCS
there are some more "raw" side control channels but like the majority of what we care about when making a new unreal game will be rpcs an replicated properties
This is honestly not going to be the same forever because they are working on some crazy experimental multi-server tech (oh god)
but 99% of us will be making dedicated server or listen server games where there's 1 machine running the "true" final state
Unreal does a ton of work under the hood to let you do stuff like "Send this Static mesh pointer across the network" and it basically... just works
Spend a good amount of time migrating all our systems to work with server meshing
I think the like, POD types like sending an integer or a boolean are stuff you are familiar with but the references stuff is probably unreal-specific
god that must have sucked lol.. oof
one server is complicated enough
had some devs working with unity to replicate a class instance
oh god it was terrible
crazy black magic
working with netcode with UE makes me appreciate it a bit more
One thing I really dislike though is that unreal will silently fail to send pointers in some cases if it's not really possible to replicate the pointer... idk if that's because it needs to expect to fail sometimes or what
and understand big ass studios like CDproject
For example if you send a pointer to an object that is
- not stably named (not from a package BOTH sides loaded and can expect to exist, like an asset or level-loaded object)
- not replicated
it will just show up as nullptr which is like... why not error or something when serializing it? I always wondered why
im always wondering like with this inventory thing if you replicate the entire array then does that also handle networking issues for you when it fails
The engine handles reliability
and you can actually rely on it ?
as for replicated properties I'm not sure how it really acks them in detail...
I'm used to assuming that everything you network can not arrive
dumb question but ...
if i have an object (lets say a data asset) which has references to other objects at editor time
none of theses assets will be replicated to clients, they will all locally exists
Reliable RPCs are extremely ack'd and will basically spam them until they are perfect but replicated properties are weirder
The only thing to think about for replicated properties is that you're not guaranteed to get every state of it. If the server changes a replicated property very frequently (more so between replication updates) the client won't get every state it had.
Replicated properties are "eventually consistent"
yep, replicated properties are ultimately just "the latest" and not always EVERY single distinct value
for example if a replicated property changes from A->B->C very quickly
ah that's how it handles it
there is a decent chance some clients will never know B happened
but then it might miss an inventory update?
and the inventory might not get updated for a while
well, in this case it's kind of ack'd internally
you won't miss the sort of final state
I'm honestly not sure if you can miss something getting added and removed quickly
not if well handled with the callbacks
If it's added/removed on the same frame or within a few frames without a replication update then yeah you'd miss it
there's not a real risk of like missing the replicated state after an entire second of it being stable for example
But then again if it was that fast, does the client need to know anyway?
basically for stuff that relies on in-between state you might need to get fancy
and yeah imo I would say unless the client needs to track each atomic change they might not need to care
For an FA i cant imagine that the callbacks on both ends would be inconsistent.
Even if something was skipped
I'm definitely not 100% clear on how fast arrays ack to say if they miss things at all though but I would say they are VERY reliable in the common case
the callbacks will happen if they are set up right
you don't need to worry about the final state never arriving, but you might need to worry about the final state being like... only updating 10 times a second instead of each of the 100 unique states it had on the server
hah our servers were running at 5fps so you never knew what crazy stuff was gonna happen
0 trust for callbacks or events even local ones
5fps was the minimum fps cap dont ask me how they did that
else physics would start taking too long to resolve
If you need a transactional history of things in a perfect chain you need to either spam reliable rpcs (which is risky as they have inernal limits on size and number un-acked) but it's simple to just manually throttle them
(or custom stuff)
One really easy way to sort of avoid the problem of "missing" state and having partial info is to have a simple integer on the struct the data arrived on
it's useful if you have 2 distinct elements that can arrive in different packets due to MTU sizes
if you know one is a different number... you know you need to wait on the other one to arrive and can avoid a ton of issues with partial state
of course if you were hand-writing the packets you would just not do that in the first place I guess fwiw... this is more just simple things you can do from the unreal user-code side
usually the client is the only one modifying his inventory anyway so maybe it doesn't even need to be replicated at all
in this case the server would just increment a number each time the state was dirtied to inidicate the "version"
because when unreal replicates properties each INDIVIDUAL property CAN be atomically sent in 1 packet that gets received (either reconstructed from multiple or not) but SEPARATE uproperties can arrive whenever they want which causes a ton of annoying edge cases I'm sure you can imagine
100% true.. I think people really underestimate how much client authority can work
If you are making a co-op game or just have some validation you can do a ton of crap locally and never need to care
I wanne try out how good the hit detection is in wardogs , getting that to work on server side is fun
A lot of games have 0 validation for it lol
hmm yes I definitely shot that guy over there from across the map... surely
@nova wasp It gets tricky when you add in cloud saves and stuff though.
Or have trading etc
Yes, you always need some kind of backing ground truth
but the hard parts are realtime stuff imo
for example movement abilities and physics state
that's where I think doing stuff on the client avoids a huge headache
for one project I was on the player was movement correcting every time they attacked
because the engineers (before me) tried to make a movement ability that didn't really use the cmc correctly (which is really annoying to do fwiw, I can't blame them and I doubt I would do any better back then)
Movement for a Coop game is fine, because its a transient state that doesnt get saved anywhere (unlike inventories or progression for example).
Trusting clients in certain circumstances there is less of a problem.
so I just convinced leadership to turn off client corrections... no more issues
Assuming you are fine with potential avenues for certain hacks/cheats
the harder part is making a game anyone cares enough about to cheat in lol
Yes, GAS and CMC a great combination
we had hackers with 200 daily players
lol
but also on the other side on the mmorpg that i was working on it did have client side hit detection and a lot of players and nobody ever noticed
fwiw you can still definitely have like, basic validation for really insane flyhacking etc
For sure
or just raise the built in cmc limits to be way more forgiving
Destiny 2 be like
(we would have to cap our FPS to take damage slower, this is mostly a rumor but I can say anecdotally it felt like it helped)
we had an abandoned project with 40-50 daily players where someone decompiled our source code and started DMing us bugfixes
WoW for example has a lot of client side stuff... for example in the older versions you could increase your AOE size by moving
because they would kind of fudge the numbers to make it fit better for the enemy positions on the server if I had to guess
some movement abilities were server side and it would be really confusing when you would turn around and your mage blink would go the wrong way because you didn't wait for the server side half
our ai was always the most obvious result of servers dying
lmfao that rocks
so we were considering running the ai completely client side
some games do that believe it or not
for example you can run the "decisionmaking" at a high level on the server and the raw targetting and movement on the client
I've never implemented something like that myself though so I have no clue
in UE i feel like AIs are way easier to impl
no client side inputs to handle, CMC will rep it all
oh yeah for sure the aiming was purely visual and client only
we didn't network any animation
well, the AI stuff is nice until you need to run their stuff on a client for some reason... then you are kind of SOL
I dont think you can run 10k CMCs
oh yeah hell no lol
maybe ill say otherwise in a few months when ill profile my AIs on the server
anyways, CMC will be enough of a headache to optimize, CPU & net wise
oh I didn't just mean purely visuals there but having the clients actually sim some meaningful parts
the visual stuff ofc you do that locally
the does hit calculation wasn't the heavy part but yeah if the client could do raytracing for visibility etc that would probably be a lot better then doing it on server
bandwidth wise you have a lot of things that can help you crank it down... relevancy... Iris prioritizers/filters replace repgraph
@formal path issue is doing visibility on the server might be too far behind clients in some places... tough problem
I don't know what the nice way to do visibility is honestly
Does the CMC cost pretty much nothing when disabled?
Like say you had an on foot / in a cockpit type flow
I'm not sure... I think if it's not actively ticking and in movement mode none it should be pretty much inert
I don't know but you could check by just having some "sleeping" ones and profiling to see if anything is on
for realistic visibility you need to take into account light ๐
it becomes fun when you gotta fetch data from the gpu
that you probably dont even have
you'd have to render the scene from the ai perspective and then count visible pixels
For the Masters here, I package Game to Devbuild test on steam , i saved characters data locally and load it, but i get the same character on both side (server and Client). How i can load locally saved Characters from client and send it to Server and from the Server to the Client. Any Idea what i do wrong i use standard RPC , it is Listen Server =/= P2P)
It helps to explain a little bit of what you are already trying to do.
Hello. I have a bit of a random question, but maybe someone can help. My issues is that when the server destroys a dormant actor at roughly same time that a client leaves its net cull radius, the destroy never gets replicated to the client and the actor remains on the client. Anyone know anything about this?
It should get flushed, because the net culling is controlled by the Server.
I tried calling FlushNetDormancy before destroying it on the Server but didnt help :/
Are you calling TearOff at all?
I tried calling that but it didnt help, and since the actor is dormant I never got the TornOff callback on the client either (i was thinking i could manually destroy it inside of there on the client)
Oh okay, well im not using it.
Fair enough
What kind of Actor is it?
Dynamically spawned?
Or was it part of the level?
It's a child of ACharacter. Yes dynamically spawned.
I meant, what are you actually doing right now that isnt working. Like give us the code...
Oh sorry i tested Many Situation here is one Rep from the CharComponent, the whole Project is BP
For some context, I have enemy spawners in my game that spawn and respawn like 5 or 6 enemies as they're killed within a small radius. As an optimization I set them up to only be active when at least one player is nearby. So if a player is nearby and then leaves, the server destroys all the spawned enemies. Is this a bad approach?
You should just be able to just load the save game on begin play if the character is locally controlled. That way, youre only loading the save data from your local character, regardless of if its the listener server or not
Ok i will try it , does i need a standard RPC , because the Server has load his own CHaracter too
I would think the only RPC you'd need is just one to send from the client to the listen server so the listen server knows what the other player is supposed to look like or w/e
Thanks i ll give it a try, must package all and test it on steam with Alt PC again.
If you think of anything just ping me, ty for the help anyways
I ended up solving this by modifying a bit of engine code to set FActorDestructionInfo::bIgnoreDistanceCulling to true when an actor that is dormant is destroyed. @fossil spoke
Ok. Id be a worried that a change like that will have other problems. But if it works for you sure.
is the new online services thing going to replace OSS/sessions?
seems like it
oh its going to cover all the services as a single thing.. thats pretty cool
If listen server just load its save file.
If client, send the data from the save file. E.g the cosmetics of the character
Server then set and replicate to all clients including the client that send the data
what is "new online services"?
apparently a new thing and seperate from OSS
I thought it's just OSS v2
Hopefully this new stuff will work with Steam
Subsystems always have authority right? cause they are local and no replication enabled
Has authority is actor"s method.
And its pointless to check a subsystem. They r not networked.
right ๐
had to reinstall rider, anybody knows why this global variable watch is not working? 5.7.3
are you compiling target for editor?
and with debug?
works for me with a source build
if you're using the EGL build, do you have the symbols?
yeah from what I remember the "UneralEditor" must be replaced with module name
yes I do
I've been making my own Steam plugin using Online Services and it's pretty sweet
Dunno when Epic will make their own
same thing with project module
sooo UKismetSystemLibrary::PrintString welcome back xD
Unreal docs say steam is supported
But tbh i worked for three commercial projects three three own plugin solutions for handling sessions
Hopefully one day Unreal provides a unified way for that
They don't have a Steam implementation though
So no it's not supported (yet)
You can set the default service to Steam but it wont do anything since there's no plugin for it
Is anyone willing to spend 10min in voice chat regarding replication, just have a small problem with inspection system
Maybe describe the problem first to see if someone can even help you?
So i have a ActorBP with Interaction Interface, in the ActorBP i have problem setting the MovementMode of interacting player but only on client side. I found a workaround to set it on interact event from BPI but i dont want to use the E to enter and E to exit.
this is the workaround, triggered by Interact event
And the mesh rotation wont replicate to RPC
left is client and right is server
but i think that the proboblem is with input in ActorBP, as i mentioned above that IA_Exit wont work so is the Mous Input that is also in ActorBP
so from what I see the problem with the inspection is the rotation isnt seen when client inspects?
yup thats secon problem, the first one is IA_Exit in my case that wont set Movement Mode to walking, so i had to set it in EVENT Interact with bool
I tried to add local rotation with custom event, tried MC and ROS did nothing
For rotation the problem is you are only updating the rotation on clients actor instance not the server
then this ROS event should fix it right?
but it doesnt work at all, cant even rotate the mesh on client side when is set up like this
Is the Server RPC called at all?
No, the rpc is called in Interaction Component, and in the ActorBP class is set to replicate + the mesh is also set to replicate
Client doesn't own the inspectable object
i dont know where to call it i have bassicly the interact event from the interface system, and besides that i have Input action and Mouse XY
you need to do the communication from client to server THROUGH something they own, pawn or playercontroller typically.
Pawn:
Input -> run on server event
run on server event -> call Inspect on target
Target:
Inspect -> ??? -> profit
What class does this code live in?
thats what I was thinking but arent the Inputs already in character?
it is actor class that inherits BPI from Interaction
i get the interacting actor an its controller with casting
Then it can't do a run on server rpc
you're totally doing this wrong
put the client -> server rpc in your character or pawn or whatever
yeah sorry if this is a noob move but started 3m ago im trying my best, replication is still like rocket science to me
ty guys for helping
ill try to correct this
Sorry to bother you, but can you give me heads up on how would i implement this in controller, IA_Exit works, but i dont know where can i put this mouse rotator that needs to rotate the mesh of the actor
I would do it in the pawn.
What are you trying to do here?
ok so that flow would go a bit like this:
Pawn:
Interact input -> decide what actor to try interact with -> rpc to server
Server RPC -> call Interact on the target that got sent
Thing:
Interact -> decide that interaction should be an inspect -> call inspect on self
Inspect -> set Character.InspectedItem
Pawn:
OnRep_InspectedItem -> switch in and out of inspection mode, whatever that means
It's complex
that's not even getting to the rotation and all that. What should other clients see, should they see you picking up the thing and rotating it around or what?
if you want jump in Begin Playground Voice Chat i can share my screen of everythin, cant snipp this
Also make sure you pass along WHO is doing the interaction and inspection here. An interact call should include the interacting character.
yeah i got everythin working somehow but rotation on client side
Do you want other clients to see the rotation or no?
Yup
but clients see the server rotation,
as shown in video
as they should
Do you want everyone to see the thing spinning or just the one client doing the inspection?
On my computer, what should it look like when YOU (another client) inspect something?
Rotation should work like multicast, everyone should see object rotating
Rotation should work like multicast, everyone should see object rotating
ok so then when in inspection mode, you need to be sending data to the server and having the server rotate the thing if you're using replicated movement
Tick -> are we locally controlled? -> yes -> is CurrentInspectTarget valid? -> yes -> we're in inspection mode, send an rpc with commands to server (unreliable)
server rpc -> read command, rotate CurrentInspectTarget (it has replicated movement on)
if it doesn't have replicated movement then multicast and have the multicast recieving end set local rotation of CurrentInspectTarget
Or you could use a repnotify instead of the multicast, I'd personally probably do that if not using replicated movement
thanks! I will try that
I'm looking for ways to hide server side code from getting data mined. I've tested a client -> dedicated server relationship with RPCs. You can disconnect the code after "Run on Server" events and than package the client with everything working just fine. Connecting it back when packaging the server.
Is there any node in Unreal that will exclude all code past it for a client build?
You can stop it executing past a point, but it'll be in the build.
Hello, I have a ragdoll that I instigate server-side, but run locally. The problem that I have is that if I disable CMC movement (set movement mode to none) server-side, it'll stop all the forces applied to the character ragdoll simulation.
So, if I'm running, and I get shot or something that provokes a ragdoll, the owning client will stop ragdolling on place rather than flying following the momentum it had while running. If I don't disable movement server-side, it'll work fine.
Sometimes it doesn't do that, it's like 1 in 10 times or something. Most likely some due concurrency or some sorts.
It works perfectly in standalone, it's me running that on a server that gives me issues.
If I remove DisableMovement (or put it behind HasAuthority on the remote pin), it works fine in multiplayer as well. If I remove SetReplicateMovement, it doesn't affect it in any way
Does anyone know what piece of CMC (or whatever else) could affect that?
There's also some footage with a second client to show that it looks correct for simulated proxies
Looking at LogNetPlayerMovement doesn't reveal much either. I don't see any logs difference when it works and when it fails
the server sets a ragdoll from an rpc, while movement state is from a number of onreps
there is 0 gaurantee these will show up in the same frame along with every other onrep characters have on sim proxies
ah, so it's fine on sim proxies but not locally in this case?
Yes
I think my guess would be the rpc is received and it can be random if it's before or after other things that sim the character locally server or not
I do get that CMC and the bRagdoll can be replicated separately, and the order is not defined, but I don't get what makes it stop all the forces on the physics simulation
this is less forces as much as the velocity it had going into starting simulating I assume
Oh, makes sense
either way that's just semantics I guess
Hm, maybe I could go about it in a different way. The only reason I wanted to disable movement is that the player wouldn't walk around with the capsule during a ragdoll. Setting a second delay or something could work, it's only a visual issue I guess.
I could disable the local player movement inputs and that would be it
do not use delays here (unless they always do what you want)
I know, I wouldn't use it for something that has a proper state, but in this case the only reason I need that is to make the server keep that velocity for some extra time for everyone to get the bRagdoll replicated to start simulating physics with the right momentum
IMO you could do a number of different things
- try to recover the previous frame's velocity when starting to ragdoll
- pass the ragdoll velocity in the rpc to start ragdolling (totally fine to spend some extra bits here imo)
ah wait, this is an onrep
could just make it onrep as an fvector that is how fast it is ragdolling and have any non-zero value start ragdolling
getting the resulting location of the ragdoll to be in sync for example will require some extra cheese but you may not care about that
How do you think applying that velocity though? You wouldn't apply that to the pelvis, right? So the whole body?
Well
for starters you can just log the local velocity right before it starts ragdolling
Sure
this is in UCharacterMovementComponent::OnMovementModeChanged
So basically I guess you could just cache the velocity right before you call DisableMovement
Yes, I get that part, I wonder how you apply it the same way it's applied when you start ragdolling with a non-zero velocity. I guess just set the velocity to the replicated velocity? Sounds hacky
And if it can still bet set to zero without some simple way to track it you could just add a simple thing that caches the local velocity from the previous frame
I would also suggest you maybe try to see if this does what you expect on moving platforms too just in case you need them to do something unique there
I don't have anything like this, so I should be good on that part
why would it be hacky to solve the problem by doing what you want?
calling disablemovement sets it to zero
you expect it to not be zero
I guess you could maybe ragdoll and THEN call disablemovement?
that might just also impart the velocity to the body though but I'm not sure
The reason I said that is that I don't know whether having a non-zero velocity when CMC has no movement mode wouldn't ruin some state
ah
I guess fwiw the velocity is only doing anything to the character during when it is actually running movement ticks or something else hits it
It's a replication issue. That sequence that's matter server-side because I believe the velocity is nullified later or something
I guess I'll see whether it breaks anything or not lol
Is there a way to set CMC velocity within BPs though? Or do I have to do that in C++?
nvm, I'm blind
It's possible writing this directly could keep the state when returning to being non ragdolling
if that's the case just... set it back to what you want there too
Even epic isn't sure what to do here lol
So, I tried this, and it got more consistent, but it's inconsistent nevertheless. I try to set velocity in multiple places just in case, but it didn't help lol
yeah
what does inconsistent mean here then
if it still stops in the air I assume there might be something else that is affecting the starting velocity
Yes, it means that it stops mid-air without any momentum
I added some print string to keep track of the current velocity, and it's non-zero client-side when it starts ragdolling
The white-ish one is the current one, the cyan one is the one we replicated to start ragdolling
I suppose my theory here is that something might set it to zero immediately after
from an onrep
For testing purposes I tried doing this to freeze it mid air, apply a velocity, and then see whether it takes that for ragdolling, and nope -- it starts falling down with no momentum.
I believe setting the velocity shouldn't be enough for it
try setting the velocity after the delay
Same result
What is the actual ragdoll velocity value in both cases?
Doing AddImpulseToAllBodiesBelow with VelChange seems to work identically to it having momentum due to velocity
But I think that it might combine the two in cases it actually works the way it should
I suppose SetAllPhysicsLinearVelocity could help
oh yeah
I would prefer having it work without that personally because it starts a dozen physics writes but it should be cheap enough (I assume it's not as bad as I think)
Hm, there's a weird micro freeze though
It looks like it's trying to correct something?
One frame after server disables replication, I see the character go back a little
You would need to go frame by frame to see that properly though
But you can see it being not so smooth regardless
my assumption is a correction rpc is modifying the transform a bit
from ClientAdjustPosition_Implementation it will early out if the component is deactivated or invalid
I guess I'll avoid disabling the movement and just disable the player input instead. I don't really want to go down that rabbit hole
I think you can just Deactivate then SetVelocity
What does Deactivate do in CMC?
Deactivate clears velocity (Pretty hard to find things that don't lol)
Something like this?
UCharacterMovementComponent::Deactivate
looks like it will
- clear accumulated forces + jump state
- call StopMovementImmediately in the parent which zeros velocity
yep
my reasoning being because deactivate will make all of the rpcs from the server get ignored (At least the ones I have read)
you could arguably ignore the rpcs in other more violent ways but idk if the goal is to destroy this object later or to keep using it (detaching it, tearoff maybe etc)
of course if you want to keep using this it goes without saying that you need to activate it again later
Hm, it's almost perfect, but there's some pop on re-activation. Without me setting the velocity to 0, activating it back keeps the velocity, even with Reset set to true
The character will be used later on
well, this is not so bad I think
all you need to do is do the reverse... set the state to what it should be when returning
as a quick bodge debug thing I am going to suggest attaching a random visaul-only mesh to the root of the character pawn just to visualize where it is
Will do
you might need to manually figure out where to place the character from where the ragdoll lands. this might involve some math to make sure they end up in a good spot but the cmc is pretty good at this already
Yeah, I have all of that already done, I just figured out that there was an issue in my solution, so I isolated ragdolling in a bare bones example
This is where things get weird... the server might not have moved the ragdoll at all. You may need to stomp the server's idea of where you are and tell it to not care
If this is a dedicated server it might not even be simulating a ragdoll on there (which is generally ideal because man these things are expensive... you do not want to force the server to pay for that unless you are sure it helps)
If this game is competitive and you need consistency for where the ragdoll is as a shared thing the server and client are aware of or at least fix up
for a co-op game my answer is always to go "whatever lol" and just cheat the state by having the client tell the server where to go or maybe have no corrections in the first place
I don't really care about people have a sync ragdoll. I was before, but running the simulation server-side to then try to correct everyone else using physics component was too bad. The movement was so unorganic client-side when character would fall in different poses.
Right now I opt for running the simulation locally, and accept the owning player final pose by snapshotting it and sending it across the network once I'm ready to stand up.
I'm aware of it being a hole for potential cheaters, but I don't care about that
FWIW some games do a sort of simple "ball" attached to the hip that sort of tries to influence where the ragdoll goes to keep it consistent (which of course will not always look pretty but it can help reduce weirdness in a server auth setup)
I was trying to replicate a few limbs like hands, feet, pelvis, spine 03 and head, but it was pretty bad. I have no idea how others make it look nice, but I couldn't ๐
okay yeah not caring about clients faking it makes this much easier
Interesting, I haven't seen anyone do that. I wonder how it looks from player perspective though
But of course you still want other players to see something similar... argh
#multiplayer message
Jambax was who gave me the idea, here's some messages from him talking about it
Theoretically as long as the velocity is roughly the same, the fall should be similar. It's a shame that the simulation can go wrong, and latent joiners will have a rough time having a remotely close picture. I might replicate the player pose snapshot once the limbs settle down, so that latent jointers (or even everyone) sees the same picture. The ragdoll can't be moved or affected really
oh yeah I pinged him like 3 messages lower but he never replied 
I tried to do what he did, which is replicate a few limbs + interpolate, but it failed
BP only makes this considerably harder I think because you have less ability to nuke onreps
but I still think it is possible
In my case it's not BP only. The problem illustration was in BP for the simplicity sake
replicating physics bodies is just a hard problem in general honestly even ragdolls aside
oh okay that's fair
I think generally speaking
I would prefer to accept the player who was ragdolling as their idea of the sim is most important
your local ragdoll teleporting is nasty compared to a sim proxy of another player moving 2 meters
Exactly
just from a pure "feeling" standpoint
so for that reason they need to lead where it ends up and maybe even where it goes from the perspective of other clients
The camera was awful as well. It's a first player game, and when you ragdoll I switch to true FP, and with some server correction the camera movement is too bad
you might need a simple spam rpc that constantly advertises to the server and then other clients where their ragdoll is and then finally the "return to normal" will be from that value
Why spam RPC though?
because that's how you have to send data from the client to the server over time
you could just send 1 at the end I guess
the spam over time would be in case following the movement over time is valuable
the CMC movement is entirely just spamming rpcs about where you move and what buttons you push
That's what I do right now. As I was saying, previously I was trying to replicate major limbs constantly and interpolate from local simulation, but it was bad
Maybe the spam wasn't frequent enough lol
you are saying it still corrected
you are not describing the same thing as I am saying
I am saying it should not correct, but accept the client's local value as the truth on the server even if they aren't the authority
Oh, so you're saying not to run any simulation locally, and accept the entire pose the authority is dictating?
no...
I am saying that the local player ragdolling is the peer who cares the MOST about the visual state
so to me having them be the one who says what happens is the simple thing
so they would just tell the server with a client->server rpc that says "I ended up here" and the server just teleports them there. That way they won't have a nasty adjustment on their side (but other players might see them teleport slightly)
You could do some complicated math and lerping to smooth things done the fancy way, or you could just have it be client auth there
Oh, yeah, that's what I do right now, except I only do that at the end because I don't use intermediate poses to advertise to other players
as for the other players viewing this ragdoll as a sim proxy
you might need to get weird with interpolation
It would be especially weird in cases where player loses the connection for a few seconds, making the server advertise it being in whatever position it might be at the moment of connection issues
yeah, if there is no data they can't represent the correct state
that is no different from them disconnecting and running in place for a bit
you could for example have a timeout where if the client doesn't give the server the ragdoll state 1 second after it was expected to be received you could say "okay, you are doing what I say or else" and ignore their rpc if it comes in too late or never
unless you have a deterministic sim with perfect floating point determinism and fixed tickrates on all sides you are going to have different ideas of what is happening
Makes sense. Actually though, I just thought about not simulating anything but pelvis and spine. I could be extremely severe on them when it comes to the rotation to fix cases where the sim proxy is laying on its back, but auth proxy is on the belly. As for limbs, I guess I could ignore them altogether considering that they don't play a huge role
that does make sense if the "get up" animation is supposed to be different based on if they are flat on one side or the other
Yeap
If the interpolation strength is small, 180 rotation will never happen because there's phys bodies in the way
but the math to make this work is going to be weird lol... IMO you could maybe have something where the bones intepolate towards the "final" state between the local ragdoll and the replicated "I used this getup anim"
I would say it might be better to like just snap the whole ragdoll instantly around than to try to spin them around like a marionnete on a string
wdym the "used getup anim"? wouldn't it be too late? the player is no longer ragdolling after (and during) the get up animation
of course it would be too late if they just instantly applied it, but could buffer the results on sim proxies to allow for smooth interp
True, the only thing is that I couldn't find a way to dictate bone phys transform like that. The only thing I found is physical component which allows you to interpolate. ig you could setup some severe interpolation settings with no stiffness for it to snap, but it's lame
simulated proxies viewing objects from the server constantly interpolate and extrapolate values and this is no different
you can just directly write the skeletal mesh bone transforms whenever?
How?
I have searched for a while back then, but found nothing but physics component. I haven't looked at how physics component works under the hood, I just opted for that lol
I've seen people saying to use ABP to move bones, but it only moves visual bones, not physical bones
the visuals are what we care about here anyways so that would work
Most people online say to "replicate" ragdoll using ABP, e.g. move the pelvis using ABP to where the server/auth sim thinks it is, but it's pretty bad
How can i use server travel without using seamless travel? my game is a fps game and i dont want player states and player controllers to persist when going to a new mapm it also breaks alot of UI if i use seamless travel. How can i switch maps without using seamless travel
The thing is that you want to correct the sim proxy simulation for it to do all the minor movement based on the auth proxy pose. If you accept only like spine or major limbs, and use them in ABP using Modify Transform Bone, all the other bones will be still simulating in the actual pose wherever the character is physically ragdolling locally
You can do open MyMap and you'll get to a new map. Note that all clients will get disconnected, that's kinda why you want to use seamless travel usually
im fine if they get disconnected for a sec as long as they join back into the new one
They will be disconnected into main menu. They'll need to re-join manually. If you need them to reconnect automatically, use seamless travel
oh
well i wonder why all the UI in my game breaks when i use seamless travel
I think what you could do is instead of sending all of the bone positions at once you could just send the overall "pose" as a series of anim poses
for example flat on their face, on their back could just be represented by some poses assets locally as they would be close enough
thanks for this ๐
Makes sense, but I only would do that once I'm settled down
then do that then?
hence me saying the local player ragdolling could spam info over time before they need to return to the getup anim
or just have the getup anim be delayed a bit on sim proxies etc
"but what if someting looks weird" is going to be like... this is just fundementally kind of complicated I guess
I'm mostly guessing on what I would try here fwiw, you might find some more correct hot takes from people that actually implemented this stuff
You could kind of have a series of steps where it's like...
-> ragdoll start -> "settle" once to snap to roughly similar on face/on back -> start getup anim etc
with various ways of interpolating in-between or not
Yeah, makes sense, I might eventually try it once again
sending the entire body transform is definitely possible but would be fairly expensive bandwidth wise
you could do some extreme cheese to compact the pose a lot or just consider major limbs etc but it would be fairly huge... sending a big rpc every once in a while is perfectly fine though
You can send just the arms, legs and spine. It should be like 20-30~ bones I believe?
Yeah
But I still wonder how to physically move a bone without any physical component, ig I will need to look into how it does it to get an answer
I would look into blend physics stuff
what is a physical component here
What specifically?
Oh sorry the full name is PhysicsControlComponent
using physics blending to have the animated pose and the ragdoll blend between to look smoother I guess?
@mystic estuary basically there are multiple places bone transforms matter like USkeletalMeshComponent::UpdateKinematicBonesToAnim
hm, interesting, I'm going through the function right now
there are multiple problems here
- updating kinematics is super super expensive
- RefreshBoneTransforms etc might try to evaluate and just use the anim bp etc
It's possible to manually yell at the skeletal mesh component to use bone transforms you set externally
basically GetEditableComponentSpaceTransforms is a swapchain that swaps upon parallel task anim eval being done
I would say in general doing a main threaded anim eval or more than 1 kinematic bone update is very very expensive and should be avoided if you can help it but 1 a frame is... maybe fine
There's a good reason people say to do this in the anim blueprint
it's just... vastly easier and can be done async
this is extremely sensitive to the time in frame it happens in as the skeletal mesh component has a tick that deploys a task and then gathers the results
I see, welp, I might eventually go down that rabbit hole later, definitely not right now ๐
so yeah I would really recommend using the anim bp in here... No I do not care if it's ~clean code~ to include ragdoll related code in the anim bp
the anim evaluation is by far the least difficult way to modify bone positions without doing stuff that is absurdly expensive
Makes sense, I was just saying that it wouldn't contribute to the local ragdoll simulation
as for if it can modify them during ragdolling that is something I am not sure about lol
I've never touched UPhysicalAnimationComponent before so I wonder if that might reveal some things
SKM->ForEachBodyBelow(RootName, bIncludeSelf, /*bSkipCustomPhysicsType=*/ false, [SKM](FBodyInstance* BI)
{
BI->SetBodyTransform(BoneTransform, ETeleportType::TeleportPhysics, true);
});
I think doing something like this might work but I would wager it might be fairly expensive. Definitely try to call body instance writes before physics simulates
doing this every once in a while won't break the bank I guess
Interesting, I wonder what are the timings for it since it's supposed to be expensive
well
it's going to depend on the number of write locks this does
it is fairly expensive to write to physics a dozen times
and each one will do a physics particle write + broadphase update separately here
also if physics is running in the background it will halt whoever was second to wait on the mutex (depending on a lot of weird physics lock modes that I'm not sure I can describe accurately)
profile it and find out I guess
doing this once a frame for when 1 player gets up is probably perfectly fine imo
Right, didn't know that it's so offloaded and tracked by other things
anything that writes or reads physics from the gamethread must do so with a write or read lock
this is part of why the cmc is so expensive, it must update the root body and do a bunch of reads before that
which aren't incredibly expensive in isolation but they add up and tend to be some of the pricier functions to call
I see, but isn't it true about any movement component? They all move a root component at the end of the day
not all of them have a collider but yeah
of course it is true about anything that needs chaos data on the main thread
for example UProjectilemovementcomponent is something I see as a bit of a noob trap as it is quite expensive compared to what it actually needs to do (It's perfectly fine to use if you pool it and whatnot... profile and fix when it matters)
How does pooling help Projectile MC though? I thought you're saying that updating it is what expensive, not creating it
both are
creating it also writes the physics scene to add a body
I do not recall saying creating a new one is not expensive but I guess I did not say that in my original message
ofc with multiplayer this gets a bit harder due to replication managing the object creation for you but that's possible to work around with some simple external manager things etc
or some very evil engine changes
Hm, yeah, makes sense that it would be expensive
(and does well, everything else a new component needs to do etc)
I guess don't freak out and never use the component to be clear but be aware that spawning a dozen each frame is going to be costly
Actually though, how do you go about pooling components? I've seen actor pooling implementation, but I remember that someone mentioned that pooling component is a bit different
it's really really simple in practice
pooling it means you hide it from being seen but don't destroy it completely
now of course it's up to you to restore values to defaults when that matters and maybe fix up things referencing the pooled object. Having external stuff know about the pooled object makes this more difficult as they might accidentally see something from the pool and see it as the same thing
spawning from the pool just means un-hiding it and setting the the data to what you want. This sounds stupid but in many cases it's just much faster as it skips needing to start from 0
What about releasing a component? I guess you have to unregister it to return it in pool?
unregister etc is optional... you can just hide it lol
the only thing the players need to see is it not being there
But wouldn't it get destroyed if the actor that owns it get destroyed?
of course the kind of thing pooling matters but I think 99% of it is just... making it not show
in this case the actor would be pooled alongside it
generally when we say pooling things we kinda mean the entire set of actor + component objects as it's just easier that way
but you could go part way I guess with enough work to fix up missing pieces
what some games do is create actor pools by class for categories of things like bullets etc that are pre-spawned to be a certain known average of active unpooled things
nothing left in the pool? just spawn it normally
If the pooled actor returns to the pool, sure, the component doesn't get destroyed, but if you pool that actor again, it'll have that component which you might not want to have anymore though
the assumption here is the component stays
see my previous messages
you are responsible for fixing up state to be what you want it to be when restoring from the pool
super context dependant
some things will survive this process without issue, some will be complicated to reason about
it's something you can do per class or per category etc
I guess the question is how would you properly release a component in terms of just Unreal (e.g. no game-specific code like delegates and whatnot). Is it a simple Unregister or is there something to it?
I almost always see stuff do it on the actor level
doing it on the component level is absolutely possible but it would likely require a rename to change the outer to to a different actor
and a bunch of fairly annoying members might be stuck on the old actor depending on the component
it's kind of like... you are the one who has to fix the issues here lol
I am not sure if there is a generic flow that would just work for every component
it caches a casted outer? that must be fixed manually
it caches something in the ctor? must be fixed manually if it would change
I think some components would survive betteer than others
I have been interested in trying to pool skeletal mesh components anim instances as they are expensive to init in some cases but this will require 100% understanding of what to change and generally some manual init calls (not a component but an objec that is inside another but the idea is similar)
I see, makes sense. I'll need to try that eventually
I would say 99% of the time just pooling projectile actors will be plenty to just hide them
even pooling them for each player would be better than spawning new ones and might make it easier to not need to fixup state
my method for bullets projectiles
- weapon world sub system
- struct driven projectiles, not actor driven
they have gravity also and can fall travel base
it's a lot easier to handle rendering and physics state (if needed) on a per actor level but that does work well for simple projectiles
yeah and it even supports visualization, by adding a simple Niagara legacy particle to it
Does anyone know a game made with Unreal Engine that supports combo co-op (mixed local + online multiplayer), similar to Overcooked 2?
For example: two players on one machine and two players on another machine playing together online.
We do both, but Actor Projectiles only for slow moving, larger projectiles, like rockets, artillery, etc.
All traditional guns use Subsystem + Struct Array to handle 100 player's worth of projectile simultions.
Visually, they just get a tracer VFX. Physics State (if we speak physics body) is just the line trace after all.
Gotta of course code the logic for penetration, ricocheting, gravity, wind, etc.
can GAS attributes work with push model ?
i was wondering if this was still the way when using push model with iris when replicating attributes
void UGDAttributeSetBase::GetLifetimeReplicatedProps(TArray<FLifetimeProperty>& OutLifetimeProps) const
{
Super::GetLifetimeReplicatedProps(OutLifetimeProps);
DOREPLIFETIME_CONDITION_NOTIFY(UGDAttributeSetBase, Health, COND_None, REPNOTIFY_Always);
}
I've been meaning to do this for a while, how do you handle replication? Iris? (So you can have a subsystem replicate directly), or just spawning an actor to handle replicated state?
hey im sorry im still stuck on this and nothing is making sense, so in my game traveling to a new map after the game ends does not work with non seamless travel and it works when i use seamless travel, even though on the copendium and offcial UE5 website it says to not use seamless travel for starting new multiplayer games, if i use server travel with seamless travel disabled i get a net driver listen failure
also if i play in PIE i get the exact result i want but it doesnt work in standalone so im pretty stumped here
How exactly are you trying to end an existing game and start a new one?
What are your travelling settings/arguments?
Show the logs around the net driver listen failure
are you having the net driver listen failure on the server or the connected clients ?
and what function are you using when "ending" the match when you go back ?
after the results show theres a 20 second timer on the server, then a server travel command with map name then ?Game=Gamemode that gets selected then ?listen at the end
and ill get the logs
also now just realizing there might be a slight oversight that when i launch in standalone my game uses steam so thats probably not gonna work with a listen server and a client
?Game=Gamemode is only for seamless travel iirc
if you are doing a hard travel, you dont need it, as you should use the gamemode set on the destination level
so for every map, i have to make duplicates of said map for every gamemode?
no ?
I don't think so? At least Wizard Cell hasn't explictly mentioned that
its optional, you use the Game param if you have to override the game mode
wait, to "what" are you traveling to ?
a new game ? or the main menu ?
Makes sense that it's optional considering that it's a launch argument, but I'm saying that it's not unique to seamless travel
a new game, after a match ends players can vote for map and gamemode to play on
if its a main menu (what i was assuming) you usually want to stay on the game mode you set on the main menu level
if its a new game, yeah you want to use ?Game so you can use your special game mode on your map if its supporting multiple game modes
mh, i would honestly either do:
- a seamless travel to the new game (to keep all players connected and all), but you must be sure all data for players is "reset"
- a hard travel, but thats more unknown for me since it would disconnect all cients, which would need to reconnect to the hosting server/player
tHandlerLog: Loaded PacketHandler component: Engine.EngineHandlerComponentFactory (StatelessConnectHandlerComponent) [2026.02.21-23.51.07:219][343]LogSteamCoreSocketsAPI: Error: SteamCoreSockets API: Error Cannot create listen socket. Already have a listen socket on P2P vport 17777 [2026.02.21-23.51.07:219][343]LogNet: Warning: SteamCoreSockets: InitListen failed to start listening on the Steam Network. [2026.02.21-23.51.07:219][343]LogNet: Error: UEngine::BroadcastNetworkFailure: FailureType = NetDriverListenFailure, ErrorString = , Driver = Name:GameNetDriver Def:GameNetDriver SteamCoreSocketsNetDriver_1 [2026.02.21-23.51.07:219][343]LogNet: Warning: Network Failure: GameNetDriver[NetDriverListenFailure]: [2026.02.21-23.51.07:219][343]LogNet: NetworkFailure: NetDriverListenFailure, Error: '' [2026.02.21-23.51.07:219][343]LogBlueprintUserMessages: [NutShotGameInstance_C_0] Net Driver Listen Failure [2026.02.21-23.51.07:219][343]LogScript: Warning: Script Msg: DestroySession - Invalid player state [2026.02.21-23.51.07:219][343]LogScript: Warning: Script Msg called by: NutShotGameInstance_C /Engine/Transient.GameEngine_0:NutShotGameInstance_C_0 [2026.02.21-23.51.07:219][343]LogWorld: Failed to listen: [2026.02.21-23.51.07:219][343]LogNet: DestroyNamedNetDriver SteamCoreSocketsNetDriver_1 [GameNetDriver] [2026.02.21-23.51.07:219][343]LogSockets: Warning: SteamCoreSockets: Cannot get information on an invalid socket handle, returning null [2026.02.21-23.51.07:219][343]LogNet: Error: LoadMap: failed to Listen(/Game/NutShot/Maps/BombRush/Rooftops/Rooftops?Name=Player?listen?Game=/Game/NutShot/Gamemodes/FFA/GM_FFA.GM_FFA_C)
I don't think you want to ?listen when doing seamless travel as the net driver is already setup, as it's telling you
yeah, seems like you are trying to create something new while its already here Error Cannot create listen socket. Already have a listen socket on P2P vport 17777
right now its with seamless off but ill get rid of ?listen at the end see if that works
I think you confused what docs and compendium meant by "ending a game". In your case you're ending one session to kinda start a new one, but technically you're moving on to a different map, you have the same game going on kinda
seems like we are mixing the therms here
for me a "game" is the literal map you played (ex: a specific gamemode)
and a "session" is the whole hosting thing, that lasts as long as the group isnt terminated
That makes sense, but I believe the docs are using the term "multiplayer game" meaning "session"
okay so bottom line is, if i want all players to move to a new map and gamemode without disconnecting i have to use seamless travel
yup
okay then, so i just have to figure out these UI issues then
im gonna read through that section again in the copendium
i think it has to do with the player controller creating the UI on begin play, but im not sure if i want to use possessed
I'm not actively using seamless travel because I have dedicated servers that stay on the same world, but I had some issues as well. I ended up listening for some map switching delegates that I would use to destroy widgets or something like this, I think I found the answer in the compendium
okay so disabling seamless travel works in PIE im going to assume it works on steam im gonna push that and test, im pretty sure the entire time the problem was caused by adding ?listen at the end so the moral of the story is check the logs lol
also thanks again
Confused on this. ?Listen shouldn't have anything to do with seamless travel.
i think its when i called ?listen in the execute console command but its already running on a listen server, i thought it was something you had to set everytime but apparently its something you only set once
the UI problems came from seamless travel and the net driver listen failure came from the ?listen at the end is what im thinking
That caused it to try to re-setup net driver which failed as the port is already occupied
#multiplayer message
howdy, im new into replication. Was wondering if this setup its the correct aproach. Its working as intended but im worried if this is a bad implementation the performance will suffer with up to 4 players connected.
What im doing its basically grabbing an item with a physic handler when the player presses q. All the logic its not included, this part its just tick updating the position of the handler so when players look up and down the physic object moves with the camera.
if there is no item on the hand (left hand item invalid) I just do nothing
didnt work
last attempt gonna add the ?listen back and disable seamless travel maybe its an editor issue
okay so even when i remove ?listen from the console command, i still get the error [2026.02.22-00.47.34:387][244]LogNet: Error: LoadMap: failed to Listen(/Game/NutShot/Maps/BombRush/Rooftops/Rooftops??Game=/Game/NutShot/Gamemodes/FFA/GM_FFA.GM_FFA_C?listen)
printing the string it shows i dont have ?listen at the end but i still get the error in logs?
got rid of the map voting system and put it in directly too
okay im pretty sure i found the fix
explains the double ?? in the options too
In p2p, does all players connect only to the host, just like dedicated? Or does clients have connections between each other?
Only the host
There's no actual P2P, listen servers just have a player as the server
In p2p, there is no authority.
Every machine connected to each other while in server client model, server act as the auth and there is no connection between clients.
Theres no p2p with mp rolled by Unreal. You do have to write your own network code.
Server client model is the meta in modern game though so just stick to that i suppose.
p2p
Server client model.
in p2p , there's no host. Clients have connection between each other.
This allow game to continue even if someone disconnect.
This is true, but for some reason in the late 2000's or so, people decided that "peer to peer" means what Unreal calls "Listen server". Where one of the players in the game is also the host, with authority over the game
I.e. the way games like Halo worked until Halo 5
Until most games switched over to a dedicated server model
was the actual question about Listen server?
Yeah, that is what I meant when asking the question, but I'm also considering real p2p...
I have a co-op game with hordes of enemies and thinking about p2p + deterministic lockstep (aka: Only sending player inputs over network with deterministic gameplay)
why do you have to do p2p for this?
Anything is possible if you're willing to spend enough time on it, but Unreal has been based on the client-server model since the beginning, so it'd be a lot of work writing your own networking layer
Every players inputs for frame n needs to reach every other player. So if you go through server, there is additional latency
latency will always exist though.
Yeah, but I figured client1->client2 will be much shorter than client1->server->client2
IIRC a lot of actually peer to peer games back in the day were lockstep
Well, input data is extremely small. Only important part is if you completely lose network, but that doesn't work with server too
So if someone in the game had a bad connection then everyone is getting a crappy frame rate (for the simulation anyway)
sounds like soul callibur or tekken
@violet walrus what sort of game are you making?
it's probably harder to reconcline in p2p environment.
Yeah, but other solution is to sending huge amounts of data instead. I figured this could be easier to implement and will have almost no network issues (out of sync, etc)
It's basically co-op shooter, but it's tower defense. You are the tower. There is swarms of enemies everywhere
If the player is just building towers and not controlling a turret to shoot fps style, does latency matter here?
No, it is shooter. You are the tower. You don't build them
I mean not literally a tower, but that is the jargon I guess
Well fps games like fortnite , unreal tournament, valorant are built with server client model.
as long people have decent internet, there's no issue. I wouldn't go p2p for this.
Yeah... But they don't have thousands of units everywhere. That's basically where all the bandwith will go, if I use that model
And probably won't be enough so they will often be out of sync
well if you are going p2p, you do have to push that data to all other players too.
Not if all the simulation is deterministic. Then I can get away with only sending player input and simulating on each machine
imo, instead sending all the A.I characters movement data. Server can just send a minimum data like the command.
I mean bare minimum they have to be at the same position or very close
Which is like 60% of the bandwith
I see, well I hope the mp elders have opinion on your objective.
I'm still considering and exploring stuff, but UE's network is basically sending most relevant data while trying to stay under the available bandwith.
In my case almost everything will be relevant, because it is such a small space and the amount of data is huge.
So it is bound to get out of sync or hitch from time to time.
Also I can't make all the units separate actors and must do instancing... Afaik UE does all the networking on actors when deciding relevancy, what and how often to send which is also kinda incompatible
So it is almost certain that I can't use default networking as is. At least the way it is intended
yeah a single actor exists in the world to to handle replication
Youd want a replicationmanager
And batch what you can
WizardCell got a post on this
can GAS attributes work with push model ?
i was wondering if this was still the way when using push model with iris when replicating attributes
void UGDAttributeSetBase::GetLifetimeReplicatedProps(TArray<FLifetimeProperty>& OutLifetimeProps) const
{
Super::GetLifetimeReplicatedProps(OutLifetimeProps);
DOREPLIFETIME_CONDITION_NOTIFY(UGDAttributeSetBase, Health, COND_None, REPNOTIFY_Always);
}
I think so. Kaos has ours set up like this and we're running Iris.
Params.bIsPushBased = true;
Params.RepNotifyCondition = REPNOTIFY_Always;
DOREPLIFETIME_WITH_PARAMS_FAST(ThisClass, Charisma, Params);```
Thanks Coldsummer sorry for delayed i heard the similรคr that you explained, but i can`t reproduce it correctly, is it timing or wrong RPC calls ๐คทโโ๏ธ. I try to find a example of it, because i think many people have same issue ,too or i am the new ๐ Dork .
Where I'm guessing you may be having trouble is that "Begin Play" ends up firing on each instance of the game.... So on your server it has its own Begin Play, and on all other clients they also get a Begin Play of that component.
To differentiate these, you need to determine what is the server and what is the client, and what is the owning client and know if the actor the component is attached to would be controlled by the server itself.
To do this easily the component should be attached to a replicated actor that a player would be in control of, such as their controlled pawn.
The only "Run On Server" event that needs to be called is on the "Owning Client" path at the end, and that is where you could send the server data from the local save game from the client. If you want the server to wait for the data from the client, then you shouldn't use the Begin Play to trigger any logic that is dependent on that data being received from a client on the Begin Play on the Server path, just use your "Run On Server" event to continue with the logic knowing that is what will be running on the server and replicating data down to clients.
You can then use the "Actor under Listen Server Control" path to have the server load their own local save game data.
Thanks Datura, yes i have a Team A (Server)and Team B (Client) fixed and i already set some Bruises when the Player Spawns again it load Correct all Bruises back( just on Runtime set and not saved). What you send me here i think is the Solution for me to separate who is the CLient who is the Server, i Study that I will let you know if i can implement it in a correct way after Test on Steam, thank you for your time.
When an actor becomes relevant to a player does the order of execution always go OnRep updates > Begin Play?
Yes, OnReps should be called for the Properties on that Actor before it has BeginPlay called on it.
Cool thanks mate, that's a good thing to know!
Just FYI, the call to BeginPlay originates from here in relation to your question.
/** Always called immediately after spawning and reading in replicated properties */
virtual void PostNetInit();
This is on AActor
Thanks, what I wasn't initially aware of is that BeginPlay is called every time an actor becomes relevant to the player again, I didn't realise that when its culled through Net Cull Distance the actor is not just 'hidden' but essentially removed and recreated when it becomes relevant to the player which explains the BeginPlay call
That is correct, the ActorChannel is destroyed, which causes the Actor to be destroyed.
When it is relevant again the ActorChannel is created which spawns the Actor, which then loads in rep properties calling OnReps, once thats done BeginPlay is called again.
Yeah that makes sense, I was getting an issue because I am setting something to a default value on BeginPlay but also setting the same thing to different values in an OnRep but then when the player who wasn't relevant at the time then became relevant they were seeing the wrong value, however I see now that's because OnRep calls first (which would have set it to the correct value) but then the BeginPlay calls immediately afterwards setting it back to its default value (which is why they're seeing the wrong value), thanks for clarifying!
๐
Sorry again, I have a problem with the listen server in which my tail's phisics are not working correctly as seen in the video. The client side works, and the client sees the listen server working as well. The clients see eachother's tail perfectly too. It's the problem of the listen server towards the client. Any ideas?
I think the video is struggling to send for some reason
This is the video btw
why do you need replication here?
I do not i realized
That's why i didn't mention it this time
But without me replicating or trying to replicate anything
The listen server is still incorrect
show how you're enabling physics on the tail or whatever
LogNetPlayerMovement: Warning: *** Server: Error for B_Hero_ShooterMannequin_C_0 at Time=20.756 is 1.887 LocDiff(X=-1.598 Y=-1.004 Z=-0.003) ClientLoc(X=2167.300 Y=869.010 Z=92.150) ServerLoc(X=2165.702 Y=868.006 Z=92.147) Base: TestingGrounds:PersistentLevel.Landscape_0.LandscapeHeightfieldCollisionComponent_36 Bone: None Accel(X=0.000 Y=0.000 Z=0.000) Velocity(X=-245.374 Y=-158.306 Z=0.000)
LogAbilitySystem: Warning: Attempted to remove tag: Attack.State.HyperArmor from tag count container, but it is not explicitly in the container!
LogNetPlayerMovement: Warning: *** Client: Error for B_Hero_ShooterMannequin_C_0 at Time=20.756 is 1.884 LocDiff(X=1.595 Y=1.004 Z=0.000) ClientLoc(X=2167.297 Y=869.010 Z=92.147) ServerLoc(X=2165.702 Y=868.006 Z=92.147) NewBase: TestingGrounds:PersistentLevel.Landscape_0.LandscapeHeightfieldCollisionComponent_36 NewBone: None ClientVel(X=79.211 Y=69.249 Z=0.000) ServerVel(X=-0.000 Y=-0.000 Z=0.000) SavedMoves 10
LogNetPlayerMovement: Warning: *** Server: Error for B_Hero_ShooterMannequin_C_0 at Time=21.071 is 3.234 LocDiff(X=-2.387 Y=-2.182 Z=-0.003) ClientLoc(X=2176.390 Y=878.860 Z=92.150) ServerLoc(X=2174.003 Y=876.678 Z=92.147) Base: TestingGrounds:PersistentLevel.Landscape_0.LandscapeHeightfieldCollisionComponent_36 Bone: None Accel(X=0.000 Y=0.000 Z=0.000) Velocity(X=74.368 Y=67.261 Z=0.000)
LogNetPlayerMovement: Warning: *** Server: Error for B_Hero_ShooterMannequin_C_0 at Time=21.105 is 2.995 LocDiff(X=-2.134 Y=-2.101 Z=-0.003) ClientLoc(X=2181.030 Y=883.340 Z=92.150) ServerLoc(X=2178.896 Y=881.239 Z=92.147) Base: TestingGrounds:PersistentLevel.Landscape_0.LandscapeHeightfieldCollisionComponent_36 Bone: None Accel(X=0.000 Y=0.000 Z=0.000) Velocity(X=142.745 Y=135.295 Z=0.000)
LogNetPlayerMovement: Warning: *** Server: Error for B_Hero_ShooterMannequin_C_0 at Time=21.141 is 2.379 LocDiff(X=-1.579 Y=-1.779 Z=-0.003) ClientLoc(X=2184.940 Y=887.570 Z=92.150) ServerLoc(X=2183.361 Y=885.791 Z=92.147) Base: TestingGrounds:PersistentLevel.Landscape_0.LandscapeHeightfieldCollisionComponent_36 Bone: None Accel(X=0.000 Y=0.000 Z=0.000) Velocity(X=115.257 Y=121.456 Z=0.000)
LogNetPlayerMovement: Warning: *** Server: Error for B_Hero_ShooterMannequin_C_0 at Time=21.159 is 2.076 LocDiff(X=-1.319 Y=-1.603 Z=-0.003) ClientLoc(X=2186.470 Y=889.430 Z=92.150) ServerLoc(X=2185.151 Y=887.827 Z=92.147) Base: TestingGrounds:PersistentLevel.Landscape_0.LandscapeHeightfieldCollisionComponent_36 Bone: None Accel(X=0.000 Y=0.000 Z=0.000) Velocity(X=97.165 Y=110.499 Z=0.000)
LogNetPlayerMovement: Warning: *** Server: Error for B_Hero_ShooterMannequin_C_0 at Time=21.179 is 1.798 LocDiff(X=-1.096 Y=-1.425 Z=-0.003) ClientLoc(X=2187.830 Y=891.190 Z=92.150) ServerLoc(X=2186.734 Y=889.765 Z=92.147) Base: TestingGrounds:PersistentLevel.Landscape_0.LandscapeHeightfieldCollisionComponent_36 Bone: None Accel(X=0.000 Y=0.000 Z=0.000) Velocity(X=81.226 Y=99.4
p.NetShowCorrection 1
NetEmulation.PktLoss 5
NetEmulation.PktLag 100
p.NetCorrectionLifetime 4
Is there a way too handle root-motion animations on network? When tried on packet lag and packet loss, the animation movement causes way too much jitter where server tries to correct the location.
Sorry i took a while something came up, ill be home soon. But it is basic; input - local to component - rigid body - component to local - animation
Maybe i could do something like disable it when one has authority?
Is it directly driven by input? Input is local only.
What are you actually trying to do here?
What should the end result be.
Just have a silly little physics driven tail working on both screens. No need to be replicated exactly or anything
Id you can wait 5 minutes i can show you a screenshot
But what would i put instead of input pose?
That can purely be just a result of turning on bone physics or using a physics-based animation node in the anim bp
I thought you meant input as in WASD, not input POSE.
Anyway, this isn't #multiplayer anymore, it'd be #animation
Initializing properties from game mode to game states if ok?
I want to create starting state based on game mode ๐ค , but maybe I should use modifed child game state? ๐ค
I was thining of just passing Starting conditions to GameState on GameMode::BeginPlay ๐ค
Maybe create bool flag in GS to check if its initial or not
GameMode has an InitGameState function for this.
You should split data between GameMode and GameState only in a away that the GameState only knows about stuff that has to be replicated fwiw.
This won't break loading game?
here!
No idea what you mean.
Does InitGameState happens after loading saved game? ๐ค
Has nothing to do with each other.
ok
I am trying to make sure that players can only join games with the same version. As far as I can read I need to set bUseBuildIdOverride=true and BuildIdOverride, is there an easy way to make sure build id is updated in CI, a parameter or something?
It it supposed to work without manually setting build id manually?
I saw this video, and solved version, whats up now? ๐
Also whats the point of replicating animations?
So kawaii physics works! BUT the tail looks completely different and I'm not too happy with it in the end ๐
and again, i don't mind not replicating, but i don't know how to stop it from replicating
Another solution is having a dedicated server, which may be good in the long run
Am I supposed to manually set FOnlineSessionSettings::BuildUniqueId manually?
Looking at source, it seems that GetNetworkCompatibleChangelist returns ENGINE_NET_VERSION
Is this a UE5 change, I remeber this just working out of the box in the past.
I just used a delayuntilnexttick node to solve an ongoing issue and now I feel dirty.
Frame delays are fine.
Unless the thing you fixed can take a variable amount of frames.
How can I tell if I check if I'm on server or client through code? Is there like an IsServer()?
World->GetNetMode
you really really should read the pins because they explain how this works in much more detail so you can understand it
yes, in blueprints (kismet library) there is a function an IsServer() function that returns true or false
but it does exactly what megafunk just said
though world is not accessible through blueprints
Do you care about that or actually care about if you have authority or not?
Authority is only meaningful on a replicated actor fwiw... locally spawned things will always be authority
Ah thanks guys I was just using it as a quick debugging check.
I do have a question about integrating GAS with the CMC for predicted movement. In order to avoid RPC timing issues, I'm thinking the best approach might be to not use Gameplay abilities at all for movement and simply apply tags and effects on the server from the CMC authoritatively while letting the client predict movement in the CMC with read-only restrictions to external GAS state. Could someone give me some feedback on this?
So essentially: The client can predict movement using the current tick's input + reading gameplay state, however it cannot modify that gameplay state. it then sends its prediction and input through the CMC to the server, who (on top of normal CMC resimulation and validation) uses the input to update gameplay state.
yeah I actually watched this video a few times but they're a little unclear at some parts so I was hoping to get some clarifcation possibly
Let me rephrase my question: The CMC does not have the ability to reconcile purely stateful data, like counters. Yet unreal claim's in best practices for networked movement abilties that to, avoid the RPC timing issue, movement data should be sent through the CMC ServerMoveRPC instead of using GAS. So the conflict that I don't understand is how are we supposed to store stateful data in the CMC if it has no means to reconcile divergence of stateful data?
Quick question: Can I create and start a session without changing map? (Assuming map opened with ?listen already)
In certain scenarios you need to create a session to get the proper data for connections
Such as using EOS' P2P or Steam's relay network
Creating a session if you're using IP connections might work
Interesting... I thought a session simply provided a way to join ?listen maps and nothing more
Certain online subsystems need a session to have proper "P2P" connectivity
Depends on your settings
guys is there any plugin for unreal engine 5 for pawns replication in multiplayer?
Out of the box, Mover probably
Hey I am having this same issue, were you able to solve it ?
sorry bro. i don't remember exact issue rn or was it solved or not.
Just a heads-up, Issue is that when using AGameModeBase in Game Level, clients are able to find sessions but if we use AGameMode in Game level find sessions returns with 0.
it could be that lobby is full. did you set how many players can join?
Yes, I checked lobby is not full, players can join
where is this findsession logic is implemented in your architecture?
is it in playercontroller?
NO, Host and Join both in GameInstance
make sure playercontroller is valid. if you are spawning characters dynamically it takes some time to assign playercontroller to the character. ill mention you if i remember or find same situation
Hi. When i destroy my GASP character, spawn it again and posses with flood my log with:
LogNetworkPrediction: Warning: Independent Interpolation starved: -26
Any idea how to prevent the flood?
The only answer is to fire the halos
There is a way to unregister them, but it's so badly documented that we never really figured it out.
We wanted to unpossess a pawn and reposses it later and the entire log just exploded and we never figured out what to do.
Hi guys, Iโm currently developing a multiplayer project in UE5 using Blueprints. Iโve been working with the default Character Movement Component and have integrated it into my character setup.
However, under higher latency conditions, Iโm not satisfied with the results (movement responsiveness, prediction feel, corrections, etc.).
For someone who is not very experienced in C++, would GMC (General Movement Component) be my best option for improving multiplayer movement?
what are "higher latency conditions"
does this project NEED server authoratative movement?
have you tried tweaking the dozens of built in network manager settings in your INI etc?
Yes, sorry should've mentioned that
It does need server authoritative movement, I was testing around 100+ simulated ping
- if this is not a competitive game you do not actually need server authoritative movement
- is this 100 ping on both sides or just one? are you also simulating loss? is this from emulation or in a real built game or what?
are you trying to add new "movement abilities" to this or are you mostly using the default character? when does it correct? just walking around?
it is competitive with a big focus on frame data, precise inputs, etc etc, i need server authoritative to avoid cheating etc
a dodge roll for example was introducing some noticeable rollback despite doing my best to stay strictly within the confines of cmc
yes, let me check exactly the tests I had
https://github.com/Vaei/PredictedMovement/ you could use something like this plugin which allows you to actually extend the cmc correctly for new "movement abilities"
If it is a serious competitive game, learn C++
and yeah this is like... this is going to be hard to control from BP in general
I see, even with GMC ?
I don't know about that plugin, you are free to try it if you want
That said, an answer to your original question, GMC can help in this regard as it is designed to be fully extended by BP if desired.
You should still learn C++ though
It's not that I'm not willing but I am aware of how daunting networking can be, and unfortunately I imagine it would take a while until I properly develop the skill set to program a custom netcode
You're not designing custom netcode
ah I see, and it's better than the bp stuff ?
well, it depends on what you are doing but generally speaking BP multiplayer is extremely limited in a variety of ways
I'm trying to make a sort of stripped down pvp centered soulslike combat prototype
so not necessarily as tight as a fighting game and i don't think it would need rollback netcode
You can even get by far enough just learning from Delgoodie's CMC series
but still would like something robust enough
Souls games are just client auth for a lot of it lol
yeah i'm aware but for this specific idea i'm trying to put the focus on the pvp aspect of it
which isn't the typical souls like
There are far more client auth multiplayer games than people realize ๐
Either learn C++ and extend the CMC or grab the GMC and hope it works for you. Choice is yours.
that plugin I posted above kind of helps extend it in a more user friendly way I guess
Both are tested well enough (CMC more so) to not be wrong in either approach
and given this is a prototype I would argue you have less reason to server auth in some sense
but I guess you don't want to have it completely change how things work if it ends up being something you continue working on
Is the built-in networking in CMC fundamentally different from what it's doing in BP, or is it more about how extensible and configurable it is?
yeah that's it, i'm trying to build sort of a foundation and then hone in on gameplay but I don't want to go back and retroactively incorporate networking stuff
in order to ACTUALLY use the cmc prediction you must have it represent what is happening in saved moves
the cmc is a tiny rollback sim that only works if it has the same input and output on both sides (within reason)
so if Iโm not satisfied with how it behaves under latency when using it purely through Bp does that basically mean Iโve hit the limit of whatโs exposed and Iโd need to start extending or modifying the C++ side (e.g., custom saved moves, prediction logic, etc.) to go further?
ah i see
but there isnโt a โdifferentโ networking path in BP vs C++, just a difference in how much control I have over it right ?
you could try to sort of cheese in your features using root motion or just turning off corrections during fast movement
hm right
this is the gmc plugin i was referencing by the way
๐ฅ DEVELOPER SHOWCASE - Check out this showcase of GMC-based games made by our community.๐๏ธ TRAILER - Watch the original GMC release trailer.๐ฎ DEVLOG - Hear about indie developer Rory's experience with the plugin (not sponsored).๐ SURF DEMO - Surfing GoldSource physics demonstration.๐ BHOP DEMO - Bunny Hopping GoldSource physics ...
is mover 2.0 worth looking into as well ?
I just understood what I was doing wrong specifically with blueprints, it seems like it's a common issue as well but I was trying to incorporate a sprint feature
and was doing so by changing the max walk speed in char bp
hello, trying to check user login status using OSSv2 and Common User Plugin:
getting linker error checking
ELoginStatusType UserStatus = CommonUserSubsystem->GetLocalUserLoginStatus(PlatformUserId);
i believe the issue stems from CommonUserTypes.h
using ELoginStatusType = UE::Online::ELoginStatus;
i seem to be checking the user status incorrectly? how else can i do it?
edit: something about using UEnum::GetNameStringByValue() it really didnt like. dont fully understand why but i can just compare the value to the namespaced enum:
if (UserStatus == UE::Online::ELoginStatus::LoggedIn)
What would you use if you're decently comfy with C++ and just want dummy simple bipedal movement and minimal perf overhead?
Just walking and jumping, and only like 30% of the time per player.
I'd just write my own movement component. The base movement component that you should inherit from is pretty lightweight and does minimal stuff. So it is pretty customizable.
the CMC does a lot of math to handle standing on moving things and resolving walking along a surface
it is not simple to replace that kind of stuff with just the default move and slide
If you don't need it - that math doesn't matter
you don't need a lot but "walking" is not just sliding
stair stepping
depenetrating, dual surface handling
I'll need based movement, driving a vehicle with your homie standing on top would need to work.
the vehicles are non-predicted
I'm thinking I might just have to learn enough c++ to get me by for the custom movement I have in mind, I'm watching delgoodie's series and I understand what you meant now
fwiw movement bases are actually not complicated in practice as it's basically just... relative to it for all math and just ticks after. Stair stepping and the hundreds of small math tweaks it does everywhere else imo are way harder
When I would change MaxWalkSpeed from outside the prediction system CMC does not treat that as part of the saved move which seems obvious now
I'd just use the CMC unless you really need something custom personally. CMC can be performant enough for most people.
But if you really really wanna strip things to the barebones, just write your own stuff.
unfortunately Mover is just a bit too new to reasonably recommend and I have not seen people use it without having to fix a ton of stuff
That series will get you well on your way of working with the CMC in a networked environment.
What does a movement component get you, just that it writes to Velocity (wherever that lives)?
Gotcha, and I assume I can still work with BP for the other stuff so it shouldn't be so daunting
Correct
you can definitely do a lot of work still in BP but the core "what is in the saved move" code is C++ only without external plugins
Just a starting point. They've moved the navigation stuff to an interface, so you could just add that to your entirely custom actor component if you really want.
Awesome, alright well gotta start somewhere, if i'm serious about this it's definitely the bare minimum to fully give cmc a legit try before investing into something like gmc, thank u guys !
and yes this makes more sense to me now
Mover is roughly similar but breaks up what each move is into separate objects and callbacks that are not nearly as tedious to replace or compose
(for example movement modes are not an enum but separate objects that handle it like an interface thingy etc)
but the cmc is pretty solid and mover is not as nice yet
the goal of Mover being to avoid this tedious C++ step I guess
It would be nice if they just made the CMC accept arbitrary instanced structs into the default savedmove flow with some simple extension imo
that way bp only people would have some chance of being able to extend it with reflection
Yeah, I'm just wondering if it's also realistic for me to think I'll be able to pick up on it well enough to write stuff past the sprint system delgoodie's covering in his videos, following a tutorial is one thing but if I want to incorporate more complex movement mechanics later on I'm slightly concerned
But I imagine they are very scared to actually change much with CMC because just how many projects rely on it.
the ultimate problem is the same, you just have two simulations and they try to be close
fair enough yeah
they don't need to change much to make it extensible
He explains the why. If you can't after going through it, go through it again and practice. He 100% gives you all the knowledge you need to make your own stuff.
I guess fwiw some moves can be merged and some are more important
Okay that's reassuring thanks !
for example FSavedMove_Character::CanCombineWith is essentially trying to figure out if saved moves are similar enough to treat as one thing
On the topic of GMC, afaik the dev is starting a v3 rewrite soon