#multiplayer
1 messages Β· Page 716 of 1
hahaha, yes, but it's our bread and butter, gotta deal with it
Dave Ratti wanted to rewrite it for a long time
but that got on hold unfortunately
whos dave ratti?
Then he leftπ₯²
and why did he leave?
The Epic games dev behind network prediction plugin.
Dave Ratti was one of the main networking guys in Epic π
quite beloved around here, and he liked to approach the community from time to time
A new networking solution for the engine
He was quite helpful. Even had a few videos on his channel.
that wouldve been awesome tbh, i asked for some info on that in some UE4 stream and only got the silent treatment
imo its very very needed
Ah.. don't take it personally.
u cant have the best renderingengine in the industry and have a class that needs rewriting badly
It was the holy grail. With the new networked physics too.
Hmm.. the class doesn't really "need" rewriting.
The engine just needs a new networking solution
well it works fine, why do u think it needs a new networkign solution all together?
It's designed for small maps with low player count. And takes a lot of hackery to support a larger player count
Because the scope of the engine has evolved.
See above
oh ye, i heard they had to work quite a bit on it because of fortnite
True. But Fortnite has a lot of custom stuff
tbh i wish they had proper suport for MMO's or at least make the code base more manageable to the point where u dont need to write third party solutions
rep graph, adaptative net update freq, push based networking, skipping things for replication, batched RPC's etc etc
Kill all dreams you have of making a mmo
Trust me
if i did it would be a hobby thing
i did manage to make a overwatch style shooter with matchmaker using playfab
You would spend a hundred years for that hobby to produce anything useful.
Although.....
Things may eventually change
With the way the engine is evolving
whispers mass
well, if i did something liek a 100 to 200 player server
Mass
You would need to modify the CMC extensively for this
but yeah... mass is supposed to be used for specific problems
actors are there to stay
At the moment. 50 is the playable cap
without code changes?
Yeah
Actors are not so bad.
you can make it run better clicking a pair of buttons
well, there was a guy in the forums a few years ago making a mmo dev kit for unreal
ie: linear interpolation... etc
and he tested with like 150 players and he said it ran fine
Custom server I think
not sure what he did tbh
but the movement was quite simple
it was just ur regular walk around thing
not rly sure about that
no flashy moves
Has anything changed?
I would love to know
well im profiling recently and scalability is still not so great
no optimizations what so ever
just 50 cmc's in a blank level
Even that is still tasking. The CMC does a lot of calculations even for simple movement
You'd have to do some custom stuff. Like slowing tick rate for distant characters. Removing some redundant checks.
it's, what you could call, playable... but the game time goes up quite a bit... considering you are supposed to have more things than just characters in a game
they could expose something like a distance culling var to the CMC, would probably help indies a lot
No function like that exists in the CMC. You have to use a manager object.
And iirc this is mainly for AI characters.
umm
actors have that already
if ur talking about relevance
Do don't want to slow player movement. Since the server runs it's own calculations
Nah, not relevance.
The server also simulates character movement and servers generally aren't the highest end computers so it's taxing on them.
Right
You'd need a manager actor for ai characters to slow their tick rate and other stuff when they're far from the player characters.
This way you can have 3x maybe 5x more characters in the world
If most of them are ai though
It's not hard to steal this code from the LOD processor from Mass entities
Actually. I would love to explore this.
Yeah. I've gone through the project. Awesome work you did. I hope to contribute also.
open to it, now we are collecting community feedback for Mass for Mieszko
btw, verifying didn't fix it
I'm stumped why I can't use that struct as a variable type
And it's all bp?
Nice. I'll see what I can add.
Much of my suggestions would be from my time with bevy ecs thoughπ
We are now taking a mini break, quite exhausted from life as of rn x'D
It's nice to get a good rest once in a while
Hi, I wonder if anyone in this thread can help with a replicated move problem.
I am working on a fast paced FPS with a fairly robust movement system, heavily customised from the base UE code.
The reason, under high ping / high loss conditions, server corrections become excessive, and the limiting factor in resolving this, is the megre three moves that can be (re)sent per packet (New, Pending, Old).
I have done a lot of work on coding custom CharacterNetworkMoveData structures, FillNetworkMoveData and Serialization functions.
I can serialize and send an array of SavedMoves to cover +500ms ping and +10% packet loss. (next step will be to send only deltas to save space).
The issue, to de-serialize the data container at the server, I need to cast my custom structure to be able to replace the three moves with my array, but ServerMovePacked_ServerReceive is not virtual, so cannot be overridden, and the function that calls it, ACharacter::ServerMovePacked_Implementation, is also not virtual. Any ideas welcome?
This might be a silly question, but cant u just change the source to make them virtual?
sounds like ur working on a farily complicated project that would warrant engine source changes
would love to help further but im just getting started with the CMC myself
It is a big project, a small team of us are updating a 20 year old game from the IDTech engine to UE, but so far we have managed everything without touching the engine directly, which makes keeping up with the latest engine releases easier, so for the sake of this one function, it is frustrating.
i know how u feel
I implemented my CMC custom movement thing but im still getting a bunch of net corrections?
any ideas what could be going wrong?
Do you have a very long piece of paper, I have spent the last six months chasing down and fixing many causes of corrections, half of them issues with the UE code.
I used lots of "PrintDebugString" messages to track down issues and patch them one at a time.
The first thing you need to do is start identifying under what conditions they are better or worse, so when you run in editor with low ping and low loss simulation, do you still get lots of corrections.
im just using the editors default settings i assume
If you have implemented any custom code that affects position or velocity, then that must be replicated to the server too, and past back in corrections, otherwise the Prediction system goes out of sync.
Pastebin.pl is a website where you can store code/text online for a set period of time and share to anybody on earth
this is my code
i override calcVelocity
and just pass a bool to the CMC
some one told me that was my best bet on how to implement a dash
do i need to send back my velocity or something like that?
There are a few ways, best thing is to follow a tutorial on youtube, it would be too much to type here. The problem is, once you get all that implemented, you still have to go in an fix the correction problems caused by the base engine code too π€¦ββοΈ
well i followed a tut, but the tuts dont do things exactly how i did so i am a bit lost
how do i go about finding where the bug is?
what would be a good place to start?
Disable your new function, do you still get corrections?
will test
gimme a sec
can confirm that corrections only occur when calling the dash
under the Play dropdown, Advanced..
Turn OFF the Enable Emulation
Or, just set the latency and packet loss to zero.
The existing move replication only sends three moves at at time, so anything over a ping of 40 you will start to see corrections whenever anything gows a bit out of sync.
mine is turned off by default
i added the following line to the function "updateFromCompressedFlags" and now the dash doesnt work
bRequestDash = (Flags & FSavedMove_Character::FLAG_Custom_1) != 0;
If you get corrections with that off, then the server is not executing the same code as the client, or is running the same code but in a different order.
Prolly that event is running on client, that's why the value isn't being updated\replicated
i am assuming the same code is being executed because all the code is in the CMC and that exists in both the player machine and the server, so its probably the order then
im gonna print velocity to see if its the same in the server and in the client
LogNetPlayerMovement: Warning: *** Server: Error for Shadow_C_0 at Time=4.594 is 27.308 LocDiff(X=17.001 Y=21.370 Z=-0.001) ClientLoc(X=2925.690 Y=-960.900 Z=207.860) ServerLoc(X=2942.691 Y=-939.530 Z=207.859) Base: None Bone: None Accel(X=0.000 Y=0.000 Z=0.000) Velocity(X=-815.878 Y=-1025.886 Z=-555.644)
is this locDiff a variable that can be changed somehow?
I had one issue when we implemented Limping, it was using something like GetWorldTime, to vary the walking speed, the problem was that the limp was executed part way through the code execution, so by the time it was executed on the server, it was the next tick time, I resolved that by using CurrentServerMoveTime instead, as that is syncronised, so if you use time for thinks like how long to dash, it needs to be suncronised time.
Delta time is ok, that is the "Change in time" so should be ok.
This is the type of thing I use to debug, and sometimes use a screen recorder to then go back and read the output frame by frame if there is something complex or intermittent I want to capture.
if (GEngine)
{
if (CharacterOwner->GetLocalRole() == ROLE_Authority)
{
GEngine->AddOnScreenDebugMessage(-1, 1.0f, FColor::Silver, FString::Printf(TEXT("Server: %f %s"), GetWorld()->TimeSeconds, *Velocity.ToString()));
}
else
{
GEngine->AddOnScreenDebugMessage(-1, 1.0f, FColor::Cyan, FString::Printf(TEXT("Client: %f %s"), GetWorld()->TimeSeconds, *Velocity.ToString()));
}
}
You can make messages specifically for values that you want to observe.
this line here, i am under the impression that i need to add it
You can use Location rather than Velocity, or both, then see if the location changes when you press dash at different world times.
is there a way to mark an exec chain to wait for server code to finish running?
Request tiles event > (Server) Request tiles > (Client) Update Tiles
You should not have to ask something to wait if the code is running correctly, the same on both server and client.
I'm looking at options
I can definitely move my update tiles into a repnotify function
but I'm wondering if there's an option like that
tbh, putting it into repnotify is probably what I'm looking for thinking about it
I want something to happen client side when the server code is done running
If it was very frequent, maybe set a bool and check on tick, but notify sounds best (im no expert though)
not exactly frequent no
making a 2d tile system
visuals client side
structs representing data side
but since it's tiles specifically, they're probably not changing a ton
it can probably be a bit inefficient in updating it because of the type of game I'm working on
thanks for being a sounding board :)\
Although I see the code daily, it is a hobby project, and one of the other coders did the movement abilities so I dont have a working knowledge of the exact implementation.
For info, I had to create a custom RPC to pass the bit packing call through my custom character class.
I have imported an old map and it has about 4000 meshes, these meshes are mostly small. and make up the map. I imported them from cd4 with datasmith and it let me add simple collision to my meshes, since these are one sided meshes would it be a problem? it came from an old 20 year old game and I was thinking it shouldnt be a problem, but will it lag my game because there is so many?
https://gyazo.com/3edc088a967b00fae1dbebec1c312a93 Mount seems to despawn after certain amount of distance in ue5 has anyone seen this before?
This shouldn't be a ue5 issue, maybe because you are out of relevancy range for that mountain
Though mountains aren't usually actors, and then they are always relevant? 
depends on ur gpu ofc, but it should lag on anything below a 3000 series because you will have way too many draw calls
also this is probably not the best place to post that question
Just spent 2 days suffering cus I forgot auto posess was on from testing
@fathom aspen the problem does not persist on same map with out world partician
Oh yeah world partition. That has been introduced in ue5 and it could be it really, so idk :(
@limber gyro sorry I thought this was mobile!
how can i replicate a function that generate a procedural level?
if i run that function on server then only the server can see the generated map
generated from a seed deterministically, replicate the seed. That's only half the problem though
You also need to generate the objects in the level with deterministic names from that seed
And mark them as net addressable
This can ofc only be done from C++
Guys, did I understand correctly?
Even I spawned AI Controller on server, save it to the variable and replicate, this AI controller will be never replicated to the client?
really? no blueprint?
no chance
so i can't make a maze game multiplayer with blueprints
You can't do 90% of multiplayer in Blueprints
The problem you have is you need to spawn the procedural parts client-side, but they need to be net addressable and stably named which AFAIK you can't do in BP
I mean, you don't have to make everything net addressable with deterministic names
You only need that if you want to be able to RPC references to those components
But ye just means none of that stuff will be usable for network at all, which could be a problem in other ways too
why the seed doesn't get replicated by the client?Am I doing it the wrong way?
Because the BeginPlay calls aren't timed with Replication
The Int just hasn't replicated yet
Use an OnRep for the Int Variable
okay
hey guys, i have been trying to implement a dash in the CMC and im still getting corrections, ive overriden the velocity first on the "calcVelocity" function and then on "OnMovementUpdated", they both generate corrections and im completly out of ideas on why the corrections are happening
maybe some one can take a look at my class and check what i am missing
Pastebin.pl is a website where you can store code/text online for a set period of time and share to anybody on earth
because tbh i have absolutely no idea
what should i put inside OnRep_Seed function?
i tried like this but it is not working
I mean can't you just spawn the stuff on server and let it replicate out? Depends on how much stuff you're doing but it's totally doable.
10x10 maze might be easy, but a 100x100 might be a bit much
Has anyone used VOIPTalker component to make a voice chat?
I'm not able to make it work.. I've added to a player controller, registered a player state and sets voice attach component to a capsule, but it does not work in a package game..
hey eveeryone, i'm trying to multicast a niagara but it doesnt work for some reason wheareas it works for particules any idea why ?
what exactly do u mean by multicast a niagara?
are u trying to spawn an effect on all clients?
yes exactly
well it should work in theory
what else are u doing with niagara?
did u check which line is not being triggered?
are u properly passing that hit result from the client to the multicast?
not yet i gotta send a build to steam
i guess that yes because it works for the particle
at the right location and everything
im a bit confused here, ur saying its working with particles
niagara is used for particles
is not working with all particles?
what are u trying to spawn that is not spawning?
ok so, is that line of code being hit at all?
u can simulate on the editor
yeah
thats what i do
it could be smthn eelse
i have added a pack from the markeeetplace
and marked for add eeveery file
is ur game gonna have a dedicated server or is one of your players going to be the server?
so why would u want to spawn particles on the server? why would that be a problem?
the server doesnt need to see particles
yeah
i dont want them to spawn on server
all clients
so multicast should work
so yeah i agreee
yes, so whats the issue?
shouldn't beee any different than eeditor
well the niagara doesnt show
when i play on dedicated seeerver
ok so when u connect to a server it doesnt show
lets go back to the line trigger thing
check if its triggering that line
if its not u gotta check that PSC variable that u have
okay so
everything works locally
my friend told me that the build to steam doesnt include niagara for some reason but doeesnt know much more
can't find anything on internet about it
Hello. New to UE networking here. I've got a question about loading objects at runtime and then replicating them. Here's the scenario:
- server loads an object (it's an asset, but has no hard references to it)
- server assigns said object to a replicated hard reference property (i.e.
UPROPERTY(Replicated) UObject* SomeProp) - client gets the reference replicated
- ????
I've tried looking but found no answer - what happens on client? does it cause a blocking load of the asset? does it set the reference to null (thus causing a mismatch between server and client)?
If I cast to the player controller on the gamemode and branch if the player controller is local, then true means its the servers controller as the gamemode only runs on the server right?
Its stored in reference as a uobject. Its a very shallow class. If the encapsulating class is replicating them its replicated as well
Qhat do you want to achie from this?
sorry, I don't understand what you meant
the "problem" in my case is that when replication happens, the asset is loaded on server but not on client
i don't understand how to spawn on server and replicate on clients, i watched tons of videos but i can't understand
does anyone know if there's a difference between playing your game in net mode client vs. as a client in net mode listen server?
i'm seeing some discrepancies
yes
These are two different networking models:
- Play as Server: The server is a player, and recurring clients join to the server session.
- Play as Client: The server is headless, meaning that it has no controller, subsequent clients join to the server.
In the listen server model if the server pleyer quits playing, the session will be destroyed
the dedicated server is not a player so it is not supposed to play vfx or sfx or even animations
so there are lots of implications surrounding this concept @elder spindle
What i meant was that the encapsulating class is set to replicate as well. If your uobject is stored inside an actor, the actor must be replicating as well. When an actor is replicating, uproperties that are replicated, are held as hard references depending on their class/type. Ie, asset is loaded the moment the encapsulating actor is relevant
You spawn a replicated actor server side. What specific usecase are you trying to achieve
yeah this makes sense, but my question is: if you play in net mode listen server, if you specify more than 1 player. and if you do, then every other player will be connected to the listen server as a client. in that case is there (or is there supposed to be) any different between playing as one of those connected clients, vs simply playing in net mode client connect to a headless server?
in listen server if you want 2 clients u need 3 viewports
got it?
cause one will be the server
yup i understand, but it doesnt really help sorry
i have a blueprint that generate a procedural maze and i'm trying to replicate it
im trying to understand why i see a difference when i play on net mode client vs. when i play as a client connected to a listen server (not as the listen server) on net mode listen server
Yes, lyra devs made comments about how annoying listen server can be. Dedicated server is easily separated by has authority but listen server isnt quite so. Use case would be for UI/sound situations. If you were listen server and called play ui sound, speending on the impl, theres a chance that could get fowarded to clients as well
this should be just a variable
that u set to true
so u spawn it on the server and it will spawn on the clients aswell
like this?
yeah in my case the client on the listen server is working correctly, but the client on net mode client (dedicated server) is executing a server rpc for apparently no goddamn reason
Yes. Before you spawn, do an autbority check, also the spawned actor ahould be set to replicate in cdo
Better if you walk us through it
because the server instance has authority as its the server
is ur BP room Generator replicated?
yeah sure
so there will be differences based on where you execution your code @elder spindle
is it not showing in the client?
i just followed this tutorial https://www.youtube.com/watch?v=Q4aAGLBqnsc
This is a video tutorial showing how you can implement a backtrack algorithm inside unreal. This is currently how I'll be generating the maze data for my current project Salvos.
Part 2 shows you how to spawn in the walls using static mesh instances and can be found at the link below.
Part 2: https://youtu.be/lzpnrjCBVQM
u have to check the variables of that blueprint
it show only on the server
go inside the bp, on the right side check your variables
and search for "replicated"
see what u find
should i have to replicate all of them?
im not exatly sure about that
is ur BP spawning objects?
if so ur probably gonna need to replicate them all
yes but in both cases i'm playing as a client. does it matter what type of server im connected to? i dont have any checks for IsDedicated
i have two functions, generate maze just generate an array with the paths and spawn maze meshes spawn static mesh to fill out the paths
Are you testing with 3 clients in listen server and 2 clients in dc server?
i dont remember if a "mesh" can be set to be replicated at all
you can get an equivalent view of a dc server using 3 clients in a listen server setup and see actions between both clients
but if it can, when its set to replicated it should show up in the client
Interesting ly enough if the seed generates the same exact mesh you dont even have to replicate it. Just multicast it
Exact maze*
its not the same :c
oh wait
on the clients if i use multicast then its the same maze
on the server its completely different
Then the tut you used is broken. Seed is supposed to make the same exact randomness, if it uses the same seed with the same exact parameters the maze should always be the same
lol i discovered an unrelated bug, but i get the same issue
actually its different because seed variable is not replicate properly
is it wrong?
You dont replicate the seed. You pass it inside the multicast parameters
correct so you get me... if you want 2 clients, you gotta test with 3 clients in listen server
NO
YOU REPLICATE THE SEED.
...
You absolutely replicate the seed. Otherwise late joiners will never get the state change
and how do i replicate it
Mb mb, yeah keep the repnotify
so its not wrong?
like that Michele like what you did.
then why its different
Whats inside the rep notify?
nothing
how are you calling that function?
What replication conditions are on seed?
sorry if im being confusing, but again this isn't my issue
none
Ao you have a race condition
it seems like clients in net mode client are executing a server rpc, while clients in net mode listen server are working correctly (not executing the server rpc)
You spawn the maze inside the repnotify
that code is wrong, I encourage you to go to the basics
begin play executes in both server and client
so you are server rpc-ing in server, which doesn't make sense
and which class is this?
which is your issue
wow now its the same maze even if the seed variable is different from client/server
you say there are inconsistencies, ofc there are I'm telling you the why
now, what is your issue
read above, this code is wrong
it is the blueprint where i generate the maze
so a random actor not owner by anyone
exactly
you are not supposed to server rpc there
where should i put it?
because it's not owned by a controller
The print string still has the race condition issue. But the maze is fixed when tou spanw inside the repnotify. Try printing the seed inside rep notify
you don't need a server RPC
because the begin play will execute only in server here
I'm going to setup a simple experiment for you to see the equivalences @twin juniper
you'll have to be more specific, show code and such
thank you so much!!
also Michele, I strooooongly encourage you to re-read the cedrix exi compendium if you didn't yet
and if you did, re-read it, there are some core concepts here that still need to be clarified
im going to do that, ty
@twin juniper mind jump vc?
rep graph is too slow for prod right
depending your use case
if you have co-op game with a low quantity of replicated actors, not for you
now... if you surpass the barrier of a little game probably looking at it as a good idea
it distresses the server charge by linearizing the culling in one single place
also useful to define "replication gates"
i can try but my english is not that good >//<
nice im from italy xd
right I'm waiting you now in the vc feedback and support
im under nda so i cant get too specific. basically, we have a server rpc function and implementation for looking at interactable objects in the player character cpp (CheckInteractObject, CheckInteractObject_Implementation). CheckInteractObject is called on a timer at 10 times/sec. CheckInteractObejct_Implementation draws the line trace and sets a replicated variable based on the results. thats about it
Are you calling rpcs on a timer? Thats expensive. Do the check when you actually interact
its not my implementation, but how else would you know what to interact with?
does any 1 know how to check if i am sending all the necessary information to the CMC for a custom movement?
its basically a "what am i looking at right now" function
Do the line trace locally. When you need to interact, only do the rpc then
When players join my lobby gamemode they give their default player information (username, cosmetics) to the host. The host then stores this. When the player changes cosmetics in game it tells the host it has changed and the host updates the array storing it and replicates the changes to all players on the server.
My issue is my game changes levels and the only thing to persist through levels is the game instance.
So I can store all server information on the hosts game instance, and when the level starts pull the information from the game instance. The issue is, when the players all connect and are given their controller and characters I need to tell them their information from the host (like their cosmetics etc).
I don't know how to tell the right players what their name and cosmetics should be. I was thinking of checking if their steam (using steam subsystem with advanced sessions) names match up but that allows them to change name and break my system.
Any advice?
Seamless travel can persist certain actors, you can store it in one then persist when traveling. Youcan the. Store it as a map with keys as their user id and values as cosmetic
ah, very nice. tyvm
yeah this makes sense, though i know very little about network programming, i just started getting into it yesterday.
welcome to it π
and yes what uPnP suggested is basically a client side action that derives in a server side action
and it's dangerous!
Because clients could be teleporting objects so they are at their reach so they can grab them
that's why when you rpc the request for grabbing the object you need to issue a validation phase
ie: checking how far your server character is from the server object
@elder spindle
yeah ive seen that is an option as well
i appreciate the advice, but do you guys have an idea about my original issue?
also, any idea why Only Owner See isnt working?
What issue? listen server vs dedicated server thing?
yeah
You could always try it out first on packaged debug game. Pie editor has its own can of worms so lets rule that one out first
For rpc. Listen server will trigger on all Server,Client, Multicast
Its basically a player thats a server
It sounds so simple but you have to approach it differently on a case to case basis.
You can package it then play as if you released them to testers. That is if you have a interface or ui setup to join matches already
We really cant help you if your nda is in the way. Its bullish if you cant even do your job because of it. Kinda paradoxical
Do tou you have any other analogy?
i mean i dont think some throwaway screenshot will be a big deal
If im deving a game thats is open to listen servers, i 100% always test on 3 players with 1 as listen servers. With bad network emulation on top, if the game doesnt break then you did a very good job. Only thing left is to make sure the game is secure
top is client 1 on listen server, bottom client 2 on headless server (client 1 is the main viewport window but its the same)
im trying to figure out why i have a debug line in one and not the other
Wdym headless server?
this
So youre saying the line trace isnt being fired when playing from listen server? Can i see the rpc call all the way to the line trace?
when i play on a client connected to a listen server yes
this is in the player bp
oh hold on
thats all of it
i just noticed the check for GetNetMode() < NM_Client but again shouldn't that make them the same?
Have you tried with a usual has authority check? I feel like netmode is stratified between dedicated and listen server
using get game instance within the gamemode gets the game instance of the host exclusively right? As the gamemode only exists on the server?
Yep
ill try it
same result like this
installing editor symbols for debugging atm
im actually at a loss. what i expect is that you shouldnt see any debug line at all. since if youre saying that those pictures are on clients, then they shouldnt see it since the trace is being done by the server. if you say one is on the main viewport. i suggest you select New Editor Window (Pie) inside the play options. I believe you have it mixed up since the main viewport inside the editor has always been the server if it was either dedicated or listen
i believe playing in net mode client the viewport is a client. there is no way to "play" a dedicated server (hence "headless")
in net mode client every viewport/window/client gives the same result. it has a line trace
oh yeah sry mb, sleepy head isnt thinking straight. there still shouldnt be any debug trace, that much should be clear
in listen server mode only the viewport(listen server) has a line trace, and all client windows dont have it (desired)
no worries, you've been very helpful so far
have you tried toggling 'Run Under One process' inside project settings?
Should be inside editor settings, not project settings; should rule out some editor side effects as well
that fixed it lol
so i imagine running under one process causes clients in dedicated mode to evaluate as servers for some goddamn reason
sometimes it works, sometimes it makes a whole load of problems. I personally keep it on to keep it light, then if I have bugs I cant seem to figure, I just build and run outside editor. Good to know its fixed
i mean it feels like a bug for that to happen, and it doesn't really explain whats going on. cant build the game in debug config so cant check how the HasAuthority() check resolves but im guessing thats where the problem is. listen server works correctly so ill probably just stick with that
looks like running as standalone game works as well
probably does the same thing
thank you for the help
holy shit i found it
right under run under one process theres a "Show Server Debug Drawing by Default" flag
what a fucking adventure

next question: "Only Owner See" doesnt seem to work on my widget component
read that as well. went over my head that it was part of your problem hahaha. I believe that's new?
yeah idk its such a niche flag but ofc theres a flag for it
It does return true right, but the reason isn't fully correct. For example, the GameState runs on both, and you can still get true there too, but that's right for server side game state. So the correct answer is: it returns true because the local authority is in control. Also controllers on GameMode are always server side, as GameMode is server only, so there's no point in checking that, if that is what you're doing!
What do you think casting is?
Basically getting it, so if I want to run events on my custom player BP I need to cast to it so I can get its events
A GameMode is not a PlayerController, so that cast will always fail
Cast basically means "give me this object, if it's what I think it is"
No, a cast is a type check / conversion.
It's "I have an Animal, please cast it to Dog because I wanna do dog stuff with it"
You get the thing, then you cast it to the type you want IF NECESSARY, then you can get its variables.
Casting is not the getting
I see, tyvm
Hi all, how would you go about telling the server and client a door is unlocked once a player with a key has unlocked it.
The server does the telling but just have a replicated variable bIsLocked
That hasn't been working for us, any ideas why it may not replicate prooperly?
Is the variable marked as replicated and are you setting it on the server?
anyone have an idea why "Only Owner See" isn't working
Is a Player Controller the owner of the actor it's attached to?
at least thats my issue 90% of the time lol
It's not the owned of the widget, it's the owner of the actor which contains the component
The root of that ownership chain needs to be the player controller
yup it looks the like player bp doesn't return anything for its owner
I have an object that I create client side currently, and I want the server to "know about it" so I can reference 1 replicated variable inside. As far as I can tell, I can't replicate objects easily?
How do I do this? Multicast the original object creation from the server so everything gets a copy of it?
Are you or anyone currently in this chat able to help my programmer on the Feedback and Support voice chat? My programmer can better show our issue for anyone who knows multiplayer programming?
I'm at work but first confirm that the variable is replicated and being set on the server, NOT set on the client
Confirmed server. Triple checked, double checked, server side for certain! lol
And how do you know it's not replicating? Print string on tick of teh bool shows server and clients disagreeing?
Getting my programmer to fill you in on this thread
So I have did it a million ways, the print string shows bool only happening on server
I also had it showing client and server, with the same results
So to confirm, server says Unlocked, clients say Locked
Basically, I can either let client and server open door with key individually, then if they shut the door, its locked for the other player, or I can set it to where server can open, and its open for everyone, but not vice versa
Client and server both say locked, sometimes only server says locked depending what im trying
Server says if door is locked or not. Server is the truth.
Client unlocking door should involve a run on server event. Client never sets the bool itself
the server sets the bool
So i have a basic key channel system, player, key and door all have key channels, if key and door match, door is unlocked.
Just show your setup. How you're setting the bool and how you're printing it or otherwise testing it.
I dont know how to tell the server the door is unlocked for all when any player opens it
ok, i have photos before any changes, just the original single player set up with the interacted replicated, and teh doors replicated
ill show those first
and obbiosuly, the door, key, and player and variables, replicated
i also, ahve a set up inside the player, but this was my first try in the door bp
Is Target the interacting pawn?
Nah bruh, don't do the flip flop stuff. Just set a bool
- Clientside input
- Run on Server Event
- If(condition), set bool (replicated, repnotify probably)
OnRep_MyBool
Do stuff
IDK if your doors have 1 state variable or two (are unlocked and open seperate?)
so after key set bool, right?
this particular door is alwasy locked unless a key is used
but does unlocking open it? Or just make it capable of being opened.
how big is your world with the door? ideally 2 players?
and am i right to suspect that there are many doors that wont be relevant to certain players?
but not always?
its a constant state
because here's the thing. what if you opened the door. then another player joins the game. or has been in a very far area then recently went to the door
the door doesnt have a state that its opened.
wont happen, they join together
you can't multicast stateful changes and expect it to work
and relevance distance if the whole map
that is what replicated variables are for
whole map would be analogous to a map of what game?
can any one of you join a voice chat so we can share screen and you can see?
tell us how you'd do it?
on your opening player controller > call event that is cast to server that updates the door's open/shut/locked value
and you repnotify the variable to cast that information back to the clients
notify letting you make a function out of it if you need to do any other changes
repnotify could just set the transform to the finished rotation (closed or open)
overall, for anything visual repnotify is kinda mandatory far as I've seen
just because you can't set actor base variables (like location/mesh/material) to replicate
for anything with 'state' that needs to be triggered upon relevance
repnotify > replicate
I think you could do everything repnotify and be fine
but everything replicate won't work a lot
you multicast stuff like explosion sounds, for example, if player wasn't close enough to hear it, they don't need to hear it later either
fire and forget
fair, but you could have code that deals with that somehow
just replication though you can't fix everything
because it doesn't cause any function calls
there are nuances to even opening doors via RepNotify
as the solution where non relevant player suddenly appears near bunch of open, previously non relevant doors and those doors start opening with creaking noises
is hardly production level code
equivalent to dead enemies getting up on their feet to play their death montage
and synced network clock
synced network clock as an ntp clock or using the built in stuff? @solar stirrup
any thoughts on my earlier question about object replication? I mean specifically objects
built in, honestly close enough that you don't care, add half rtt if you feel like it, helps get it a tad bit closer on bad connections
I just need to know how to tell the server to tell all clients to unlock the door for everyone once it has been opened by a player with a key
I have an object that I create client side currently, and I want the server to "know about it" so I can reference 1 replicated variable inside. As far as I can tell, I can't replicate objects easily?
How do I do this? Multicast the original object creation from the server so everything gets a copy of it?
door animations are working on both sides already
i disagree but I agree at the same time? you know the feeling
simple replicated bool
void ARTS_PlayerController::RequestWorldTime_Internal()
{
ServerRequestWorldTime(GetWorld()->GetTimeSeconds());
}
void ARTS_PlayerController::ServerRequestWorldTime_Implementation(float ClientTimestamp)
{
const float Timestamp = GetWorld()->GetTimeSeconds();
ClientUpdateWorldTime(ClientTimestamp, Timestamp);
}
void ARTS_PlayerController::ClientUpdateWorldTime_Implementation(float ClientTimestamp, float ServerTimestamp)
{
const float RoundTripTime = GetWorld()->GetTimeSeconds() - ClientTimestamp;
if (RoundTripTime < ShortestRoundTripTime)
{
ShortestRoundTripTime = RoundTripTime;
ServerWorldTimeDelta = ServerTimestamp - ClientTimestamp - ShortestRoundTripTime / 2.f;
}
}
float ARTS_PlayerController::GetServerWorldTimeDelta() const
{
return ServerWorldTimeDelta;
}
float ARTS_PlayerController::GetServerWorldTime() const
{
return GetWorld()->GetTimeSeconds() + ServerWorldTimeDelta;
}``` @pallid mesa
Thats what i did, still not working
well, the bool works, just not for everyone
How good is that solution compared to built in
and its replicated,, and tried rep notify
very
much better
sounds to me like you're calling the replication from the wrong context
Because I use built in + RTT / 2 for my elevators (timestamp based movement) and I get no issue whatsoever lel
I think the CMC handles discrepancies in movement fine when you're on an actor
Never had any rubberbanding on a moving platform
Doors? maybe
as it re-runs every 10 sec, so calculates delta from lowest ping time
cmc has an ntp clock algo built in lol
huh, probs why then 
Tried it on character, and from in door blue print
character is owned by the server
zlo, mind if I steal your code???? π
go ahead
if you do client>server in player controller
I can guarantee that will work
I forget who owns character off the top of my head
I have engine changes for ntp around the net driver, but its annoying
i also have static functions that wrap around those
so i can just do USolsticeUtilitylibrary::GetServerWorldTime(this)
Can u get on voice so i can share my screen
@south otter looks to me like character should be a server owned object
if it's kinda quick ye
unreal hangout
ah hehe that's nice and blueprintable
so im getting some weird results when i check the owner of the player character
not sure how to interpret this
this is for 2 clients. it looks like it prints for both characters on each client
but on both clients only one of the bps returns an owns, and its not even the same both times
does anyone know of any resources that talk in detail about implementing rollback based peer to peer multiplayer in UE4/5?
Do you mean listen server or true peer to peer?
true peer to peer, I'd ideally like 2-6 players to connect without one being the sole authority on the game state, but if that's more trouble than it's worth and I could make it invisible to the players anyway I might not bother
Yeah good luck, that's far beyond a tutorial. That's completely contrary to the Unreal(tm) networking model.
That'd require an unholy amount of engine modifications
I mean I don't expect anyone do have done the work for me
Yeah that's gonna be one of those "if you have to ask" type problems, I sure wouldn't want to have to do it.
Now if you had some black box library that your game talked to and every machine thought it was running in standalone it might be doable, but you'd have to do all networking yourself and toss all the replication stuff really.
Although peer to peer and "listen server that trusts clients sorta" are effectively the same thing
where does the difficulty come in specifically? like I think I must be misunderstanding the problem. because I only need a handful of deterministic entities predicted on the client side and I'm doing their physics by hand anyway
in my mind it's just, share everyone's inputs, keep the illusion of real time gameplay if they match, resimulate the timeline if they don't
Unreal is client/server at its core. If you have to ask what the problem is, it's too big. But you could probably do it as listen server, lots of fighting games have done it I'd guess.
yes, mk11 has excellent fighting game netcode
The problem is there's no such thing as "send this to everyone else" for anyone besides the canonical server. There's no sense of a connection other than that of a client-host. True peer to peer would be a nightmare in Unreal.
It's like web vs Bittorrent.
right, well a listen server that trusts the clients then
I'm guessing for MK11 they have a dedicated server that acts as referee but yeah, that'd be much more doable.
anyone have an idea why my "Only Owner See" flag isn't working properly?
it's the predictive simulation that's the important part anyway and 2 players is the most common use case
So have you made the simulation up yet? Does it run in its own scene that can rewind and replay or are you doing the gameplay in the Unreal context with actors and such moving around?
If you just want simple client authoritative movement there are some set ups you can use with the smooth sync plug-in
Is there a gdc talk or breakdown? It would be very interesting to see how they handle discrepancies in latency
this is a project that's just design docs right now, I just wanted to make sure I wasn't missing something obvious, I'm more of a vfx person right now and was hoping to avoid beginner mistakes by asking. it's going to be a fighting game framework where every action an entity can take is in discrete time slices and where all the physics are stylized and deterministic. was planning to have rewind and replay functionality regardless of the networking but I haven't built the implementation yet
https://www.youtube.com/watch?v=7jb0FOcImdg there is in fact! haven't watched it since it was new and I should again
In this 2018 GDC talk, Netherrealm Games' Michael Stallone describes the drastic engine changes, optimizations, and tools that are involved in rolling back and simulating up to 8 game frames in 16ms in games like Mortal Kombat and Injustice 2.
Register for GDC: https://ubm.io/2yWXW38
Join the GDC mailing list: http://www.gdconf.com/subscribe
...
wasn't aware of that and will look at it, thank you!
Any attempts to establish peer to peer connections within unreal would require massive rewriting of the engines networking. If you have to ask how to do that, I think itβs safe to say there is no hope, unless you start down that long road with the intent to learn how to do all of it by yourself which could take years
Unless you are a wizard, you are stuck with server Client Connections, which means that you will never have real control over the ping of the players
Maybe your aren't the owner? Or the View target is something else?
I found out the hard way how this all works when I had a camera actor that was the view target instead of the controlled pawn
Quick question - an actor with an update frequency of 0 will still process RPCs and spawn on clients right?
I believe so yes, it should be easy to test that yourself
yeah it's got to be one of those, cause it's basically checking if owner = view target
do you know how to check what the view target is?
when i check the owner for my player bps i get this
CheckViewTarget
Or GetViewTarget(there are bunch of them)
Hello, i'm about to create an inventory for a multiplayer game. I would like to have your thoughts before I start it!
So I was wondering, for chests, should I :
1- Simply replicate the content (array of id+quantity)
2- Send the content of the chest to the player that opens it?
There can be up to 20 players near a chest, and there can be a lot of chests (lets say up to 100)
I can already see cheat with 1- because a player can read the content of a chest without opening it
What would you choose in this scenario ? Or do you have another suggestion ?
Thanks i'll take a look
Is there any way I can make a hosting system where you would create a server with a name, and other players would join you by entering the name of the server?
You just add a Name as data in your sessions, and have your UI filter out sessions based on the searched name.
Hey can anyone help with the UE5 Server. I've build a Server but after running it gives this error after some time
Hi everyone. I'm doing a networked project with lots of custom movements. I added a sprint, dash and WallRunning, however, I still need 5 (double jump, wall jump, climbing, sliding and swinging). more and my limit are the compressed flags. My C++ knowledge is okay, but I didn't find resources on expanding the flags.
I read here about that 4.26 changed how that works and allows to get around the limitations, but I didn't find example codes to look at.
Currently I'm using UE5, so you know.
Can somebody link me to some example code or explain it more in details? I already looked at Unreal Engines documentation, but I didn't see where to expand on those flags at all.
I'm confident in Blueprint and made those custom movements all in blueprints a year ago, but that project wasn't networked.
Thanks for your help.
Hi friends
does the Net Insights provide data per second?
So far I could only obtain data per net event instance
and compute average per net event instance
but this doesn't give an insight on how data behaves over time
If not the network profiler does
Hey! I am using the default character movement. This is replicating very well, but I have noticed that in high speeds, the client starts to become choppy.
When I jump, I can clearly see choppiness in the movement. The server runs well without chopping.
Do you know of any parameters I could look at to fix this?
hello, Does ***clientTravel *** keep previuos player transform after traveling into new game session?
Is there an easy way to find whether an error in my error log triggered server-side or client-side?
It would save me a lot of effort debugging in general
there is a max tolerance you can configure before the server corrections are applied
you can also see them with i think p.ShowNetCorrections or something similar in console
default tolerance is 3 UU iirc, which is okay for speeds of 500ish
(human at running pace)
Alright, Ill give that a look
the net profiler provides Outgoing bandwidth
but i can't see ingoing bandwidth
anyone here tried to extend the net profiler to provide such info?
I can see it in insights but it isn't very insightful
Is there an easy way to check if an actor can send Server RPCs locally?
"Is it owned by a locally controlled player controller"
Pawn has IsLocallyControlled and PC has IsLocalPlayerController
Normally any RPC user will be owned by either
Question is about "Server RPC"
"can I multicast" is just HasAuthority, anyway
AH hahaha okay reading comprehension sorry
π
and yes, + sending a server rpc will give out a warning when the thing is not owned
I don't believe so. You would need to do that yourself, see APlayerState::CopyProperties for reference
Yeah I'll just do that
was wondering if there was a more specific field set on stuff like a net connection
Hi guys so im trying to figure out why Only Owner See isn't working
can anyone point me to the implementation in the engine source?
Hey all. I've been stuck on a networking issue for a while. I have a game that has set puzzles that use RepNotify functions to set how the puzzle is generated. It seemed to work in UE4 pretty well, but after moving to UE5 it only seems to work about 2/3 of the time. The other 1/3, the RepNotify literally just won't get called for clients, like it gets dropped. So this is obviously a major issue for the players, or late joiners.
I've seemingly tried all the different kinds of combinations in the replication settings menu, but the update just gets dropped for clients sometimes and won't get called. Even if the net priority is high
If I create an object with the same set of code both server/client side (in controller beginplay lets say)
do references to that object work between the client/server?
If the object is replicated from the server to the client, yes.
objects can't be replicated
If the object is created by you on the client then no.
I mean the object class specifically
Yes the can.
if you try to replicate references to them, you get dummy pointers to objects that don't exist
If it's an object on an actor, just make it an actor component?
You want to replicate the object class?
I'm not attaching it to actors
Everything has to be attached to an actor to replicate, somewhere...
well, you can make things replicate through the player controller or player state
and those replicate
Those are both actors.
So, yes, you can add actor components to them.
So I was reading about this about UObject Replication: A new, community-hosted Unreal Engine Wiki - Announcements and Releases - Unreal Engine Forums It notes in here that the Outer for the Sub UObject must be the Actor its replicating from. My question is, can we use existing UObjects by Renaming them? (as it appears I could change the outer t...
(fun fact once you refactor an object > something else in blueprints you can't turn it back into a generic object)
Source control / backup!
mhm, I have backups but they're too old for that little change lol
source control is a massive pain for UE though...
I tried and failed to set it up so said screw it at least I can do something
It's really not.
I admit, perforce is shit. But you can use something else.
That is, perforce is shit for a single person, it's an enterprise solution.
Use SVN or plastic SCM (I don't know much about plastic)
SVN is super simple really.
thing is though
I'm only using blueprints
no C++ at all
does SVN work for that?
the alternatives all seemed pretty bad for blueprints
SVN is fine
alright thanks for advice I'll have to set that up this week
want to finish my first task, and it's too late to save that mistake lol
I really wish I could remember why I had trouble with actor component
If you want to convert it back to an object instead of an actor component and it isn't too complex.
atm it's fairly simple
You can make a new bp, re-create the variables and then just copy+paste the entire graph.
Have to recreate the functions too ofc
honestly though what I really need to do is test what you said about objects
for knowledge's sake
make sure I can get it working
You literally can't without c++ I think.
mmm, that would make sense tbh
it's kinda what I thought
but then I realized I created my objects client side not server side
and replication dun like that
its not tbh
it is tbh
honestly might as well
Or use SVN
it's a solo project so I don't really need checkout/etc
I just need the ability to roll back
I might try SVN to see
I know git absolutely hates blueprints
and due to reasons I gotta use em these days
:/
better for my carpal tunnel
π«
<3
indeed you can't
alright guess I'm going component
t minus 37 minutes until I found out why I couldn't use components
has anyone had any luck getting Only Owner See to work? seems not to do anything for me
Works fine for me
What do you mean by not work? As in everyone's can still see it? No one can see it?
Or only the server can see it?
Are you spawning it on the client?
Or spawning it on the server (just the once) and letting it replicate.
It sounds like you're spawning unique instances on every client... actually on the client.
its a default component in the c++ class, it gets created in the class constructor
how horrifying
That doesn't matter if you're spawning the actor incorrectly.
im not sure what you mean by "spawning" in this case
How do you spawn the actor that contains the component?
actually i seem to have found the problem
apparently screen space widget components dont respect the Only Owner See flag
This might be one of the few places where spawning it locally is the correct option then. π
so now the question is how to work around this
yeah sounds like it
how could i do that?
Is there a way to use more than the 4 custom movement flags? I'm trying to get multiple movement modes replicated, but I reached the limit already and still need a few more flags.
I heard something about using enums but not sure how to set that up.
do i need to change the constructor at all?
can i move that logic into begin play?
Go for it.
Just remmeber to remove the default component, you don't need it and it'll probably actually just get in the way.
yeah in this case i might just do it in blueprint cause i dont have the component by default anymore and i need to reference a widget on the file system
You can add a widget component variable and assign somethign to it on begin play.
UWidgetComponent* WidgetComponent```
If you want to assign it with blueprints, Add BlueprintReadWrite to the UPROPERTY
oh i see what you mean by the default component thing
same issue lol
Then you're not checking for authority.
nope it works correctly when the widget is rendered in world space. i found a 7 year old thread on it apparently its an engine issue
IKR this is making me so mad, and I kind of need it for a health bar over friendly teammates
that would probably be because their owner is by default GameInstance
If you create them on a client... actually on the client, not the server, then other clients can't possibly see them.
You also need to make sure that the created component isn't replicated.
if you were to instantiate the widget manually, then set it as a UserWidgetObject on the WidgetComponent, it should work just fine
but yeah, if IsLocallyControlled() CreateWidget works better
in the header
authority check off begin play
only owner see is checked
each client can see the other's widget
component is not replicated
if those ar echaracter blueprints
just put a branch with IsLocallyControlled check
and create the widget component only if true
and it will work just fine
from BeginPlay is also fine
this implementation crashes my editor any time i look at an interactable object.
im using an OnRep function to hide/unhide the widget
if only the player needs to see his own
there is no need for any replication there
should be all handled locally
you just send a server RPC when you Start Interaction, server does some sanity checks that its possible, and runs the interaction code
again the widget itself is not replicating. its OnRep of a different variable
no widget is ever replicating
and server doesn't need to know or validate if client should see an interaction prompt
interactable object should replicate its own state, from which client can figure our if it can be interacted with and just show the widget locally
ok ill try doing the hide/unhide locally
you generally don't want to put yourself in a position where you need to constantly network sync several different objects together
and everything that can run locally, should run locally
our minimap and fog or war systems, for example, don't replicate anything at all
but they work just fine
im not the one who implemented the replication lol. i was actually recommended to use the OnRep function to hide/unhide by our lead programmer
but it looks like this works
thank you btw. i found a simpler work around atm but i've heard this from a couple people about this part of our replication set up and it definitely makes more sense to me than what we have right now. will require a more substantial rewrite
So I've been hit with a bit of a mind bender that I can't quite figure out
I'm trying to create an actor component that will spawn actors client side, but in dedicated servers doesn't spawn any actors to reduce load on the server
namely using it to contain code about handling how those batches of actors change when the server changes an array of structs inside it
so here's the weird thing
nothing at all is set to replicate
server side I spawn the actor component and attach it to the controller (I forgot an execution pin, I thought I'd have to create it both server/client side originally)
the component doesn't replicate, none of the variables replicate, none of the actors are set to replicate
only server side is this code running
but the actors spawned by the component on the server side version of the controller still appear client side
almost like "add component" is set to autoreplicate somehow on replicated actors like the controller?
I managed to blindly unit test my way into something that works moving my context detection into the begin play event of the component, meaning that it is actually replicating despite everything being set to not replicate
but why does it work that way
Hey I'm asking this here because it is more the multiplayer part that I need know. I imagine that the reason Root motion isn't recommended on all animations is because it's moving your characters absolute location and rotation thus increasing the amount of network traffic, and clients would probably be misplacing the final location. However this shouldn't be the case if AI are running and playing root motion animations from the server right? Or am I totally wrong?
If you spawn an actor on the server, it'll replicate
Assuming bReplicates on that actor is set to true
So it replicates it down to clients as well
"component replicates" = false
I mean the actor you're spawning
I have an answer, but it's utterly uninformed so I'm not sure I should say it lol
Doesn't matter if the component replicates or not
shoot
the spawned actor also doesn't replicate
hard setting movement makes lag super obvious since everything is teleporting, if a client falls behind there's lag smoothing that can be applied
I deleted something in an unrelated class and it stopped working, so I'm re-sorting my code. Possible it was using code from that other class that I thought wasn't used anymore
which is really strange that it would work at all given that
Yeah if an actor isn't set to replicate it shouldn't spawn on clients
So either you're somehow manually spawning them on clients, or your actor actually does replicate
what I'm guessing happened
was the other class was spawning them client side
while the new class was only spawning them server side
so when I switched the server side code > client side
it got spawned x2 on the client side and the actors overlapped
so I didn't notice lol
I'm migrating code and I thought I'd finished migrating it all
guess I missed something
to kinda finish that thought: unreal has some inbuilt latency correction, but hard setting locations doesn't let it do anything
yeah that's what I meant by clients would be misplacing the final location
which would cause teleporting and jitters to resync the location
what happens when you get that is "vibrations"
the client/server disagreeing on a location really looks bad
I was doing some super basic UI stuff in a test and just coded it that way because it wasn't the primary importance
and man oh man does it look bad lol
Is there any sample code for "FCharacterNetworkMoveData"? I have no clue how to use it. I read the documentation but didn't understand how I use that in combination with FSavedMove
I'm using UE5, btw.
They use it in shooter game.
Also this seems like it might be useful: https://nerivec.github.io/old-ue4-wiki/pages/authoritative-networked-character-movement.html
How would I go about adding that data to a created session?
Is it possible for actors to spawn independenlly on client and server, but have a shared network guid and be replicated. Kind of like how I assume replicated actors that are placed in a level work? I ask because I'm working on an in game level editor, so some multiplayer levels wont be .umaps but will instead be actors I read from a .sav and spawn in game
I could just spawn on server and replicate them that way
but it might save bandwidth if players and servers can spawn their own actors and somehow sync the network uids after
You're going to have to send them to every client anyway, so you're not really saving anything.
In the end, the data sent over the network is equivalent
Other than, I suppose, the data sent from the server back to the person who submitted the .sav
In the end it's probably less of a headache to just get the server to do it.
even for a somewhat large group of actors, we can presume that this logic will only run once at teh beginning of a game
so some added cost isn't important
in other words, you're overthinking it
and trying to make some weird backwards wraparound replication just sounds like a mess
ill be streaming levels in and out w/ this method
you could, however, have them be totally not replicated
but yeah I see the point that stuff will get sent anyways
it doesn't sound like you're streaming in and out
its zones in an open world kind of setting
but I think you are right to let UE4's default networking handle it
no need to overcomplicate
if it lags Ill solve it then
but not worry for now
Forgot to say thanks!
can someone please tell me how is this https://www.unrealengine.com/marketplace/en-US/product/fps-multiplayer-template different from Lyra for UE5 ?
Lyra is designed to be more modular
And uses the latest fancy epic backend stuff
It's also heavily GAS based and doesn't have any first person stuff out of the box
I don't remember how to do it specifically. If you're using advanced sessions, I know there was an array or something on them you could add new data to and pull it from. Depends on what you have access to.
Oh sick, I was wondering if people still used that plugin
I'm on the right track then, thank you.
That doesn't seem to fix my issue. My issue is that I don't have any remaining slots for compressed flags anymore and "FCharacterNetworkMoveData" appears to make it possible. I have like 8 different custom movement types and with just 4 flags... I don't know.
Why doesnt it go through the if (PC->IsLocalController())
The immediate response would be - it's not a local controller?
So, that Marketplace asset is a better base project to build upon (for solo dev) ?
At the bottom of this page there is information about using and extending move data
https://docs.unrealengine.com/4.26/en-US/InteractiveExperiences/Networking/CharacterMovementComponent/
You can add your own flags to the custom move data you create, so you are not limited by the 4 flags that are spare in the compressed engine flags bitfield
hey folks
what is No owning connection for actor issue for?
Means something doesn't own it, you're probably trying to call an RPC on something where it doesn't make sense
Thanks. It's pretty complicated, but I think I kind of understand how it works now π
Also this one might be worth watching: https://www.youtube.com/watch?v=DoZyH86n_gs along with the code examples here: https://github.com/Pantong51/AdvancedMovementComponent and here https://github.com/HarryPearce/JetpackTutorial
Thanks! That's really helpful!
asking here instead, would somebody be able to point me to what is failing here? Im trying to spawn a vehicle for a selected building BP via a UI button:
its running fine on the first picture but it doesnt fire on the building BP (second picture)
I believe this is an rpc failing due to being called from a widget, which is client only ..
Also not sure the spawn would need to be multicasted if its spawned on the server (and replicates)
@hoary spear how do i make the widget call that event on the server then?
(i removed the multicast, thanks for that)
I believe you should go via the playercontroller , someone correct me if there's a better class
So widget -> pc -> rpc to server pc -> spawn units?
Havnt done this in ages so i might be wrong
Is BP_WarFactory a replicated actor that is owned by the player? Only then can you call a Client->Server RPC on it. Seeing as you're doing a Get all actors of Class, I'm guessing it may not be something the client owns if multiple players could theoretically be selecting it.
Otherwise, Squize is right, you probably would want to go through the local PlayerController to perform the RPC as you know for certain the player owns it.
so if its in the widget i can just get the playercontroller like this?
Yep
this is my first try at replicated events from UI, so im quite unsure about certain stuff
thanks Erlite π
π
Would this return the PC even if the widget isn't owned by it?
I would think so 
It'll return the local playercontroller
I see, regardless of whether it's owning or not
This could lead to potential bugs if he's not owning that widget then, and he's intending to do something player related with it. That's why I would just do GetOwningPlayer in that case
Set up your networking through something (PC, Pawn, whatever) and just have your UI be a frontend to those calls.
Like say you were making a trade window. You'd make a RunOnServerEvent InitiateTrade in your pawn, and the UI would just call it. UI knows nothing of the network, just that it's talking to your pawn or PC
It gets the local player controller
Which is always your own if you have a widget

For each individual player, they are player index 0 on their client?
Well what you want to do is call a server RPC instead
Like really why not just call a server RPC?
My answer was right. You are trying to call a client RPC from client
And that's a no no
It'll work... just not as you expect π
It's like calling a normal function I guess
Yeah.
Change this from replicated to owning client to replicated to server
And it should just work.
I wonder if there would still be a slight overhead because it was intended to be an RPC 
