#multiplayer
1 messages · Page 724 of 1
Oh nice
hey guys small problem, im new to this but you guys might know the answer pretty quick... in multiplayer mode Player one spins on a chair and player 1 can see the chair spinning.
But player 2 if watching ... only sees player one spinning and not the chair.
Ok, so that's a pretty solid solution then. That's great. I'll have to research that. I'm building my own UI to show friends and invite / join them.
I appreciate you steering me in the correct direction Zlo! That was really helpful.
Also same with the webbrowser... if player1 changes the website only player1 sees the webbrowser change. Player2 doesnt see any change
OnSessionUserInviteAcceptedDelegate = FOnSessionUserInviteAcceptedDelegate::CreateUObject(this, &USolsticeOnlineSubsystem::HandleSessionUserInviteAccepted);
IOnlineSubsystem* OnlineSub = IOnlineSubsystem::Get();
if (OnlineSub)
{
const IOnlineSessionPtr Sessions = OnlineSub->GetSessionInterface();
if (Sessions.IsValid())
{
OnSessionUserInviteAcceptedHandle = Sessions->AddOnSessionUserInviteAcceptedDelegate_Handle(OnSessionUserInviteAcceptedDelegate);
Steam and EOS are both implmentations of OnlineSubsystems. That's what I was asking you, if you were trying to get a party working on the OnlineSubystem level or INSIDE a specific server.
Listen server right? With Player 1 being host?
Your replication setup isn't set up right. Show how you're spinning the chair.
Hey all, so I use a setup in PIE that is a listen server and a client. For some reason, though, when I hit play and the server and client pawns are instantiated (this happens through the game mode) the client instantiated pawn does not have its owning connection set. Output log is as follows (when trying to send an RPC to the server from a client pawn):
LogNet: Warning: UNetDriver::ProcessRemoteFunction: No owning connection for actor BP_ThirdPersonCharacter_C_1. Function RPC_Server_UpdatePing will not be processed.
I've overriden some functions in my game mode class such as OnPostLogin, so am I supposed to be doing something there? Nothing internal (engine code or unet code) has been modified in the slightest, so does anyone have any knowledge of issues that could cause this?
ok is that the same for the webbrowser TV?
idk probably
how to sync server and client ticks???
You can't
Yeah got it. Look, I have a train in the game and it moves on the client and on the server, but I don’t understand how to synchronize them, since the client is faster than the server by 1 tick, I wrote the math correctly
You'd normally use some shared game time and play it based on that
I don't really understand why?
Can you give me where I can read about it?
Synchronising objects between client and server is like, the entire multiplayer support. It's the problem. There's a different solution for every situation. For a train, since you likely have an idea of when it's going to start, or what its position should be, you'd simply define it based on the server time, and have your clients use that too. GameState has a basic version of a shared time
Yes, but why do I need time??
how will this help me
Because you'll do train location = FVector(Speed * (CurrentSharedTime - TrainStartTime))
There, completely synchronised train
Hello, I'm attaching the characters to a moving platform, but to the clients the character keeps jittering a lot even with the platform not moving(it works fine if i don't emulate lag, but it is impossible not having lag). It starts jittering on the moment I attach the player. It don't happen if I uncheck the replicate movement. There's some way for it to work with replicate movement?
ok thanks ill check it out
that's not working for me
Finally solved it. It had to do with "Use Controller Desired Rotation" vs "Use Controller Rotation Pitch/Yaw". So much time wasted on this ughhhh....
unpossess isn't called on client
That doesn't sound right.
2 clients = 2 controllers
Client 2 should never be getting input meant for Client 1 unless there's something routing it to both, either on the OS level or the Unreal Editor level or something
Did it replicate with 2 launched instances or only in PIE?
Still having issues working on resolving other things to get 2 launched instances connected in a session, but so far fixed on PIE.
Can't find the session with a standalone launched instance, but can find and connect to it with standalone mode PIE.
For some reason both launched standalone instances have to recompile all shaders. So it basically stalls. I'll have to do a fully packaged build overnight and test it in the AM.
Have you tried just right clicking the uproject file and hitting launch game?
ill give it a shot
I'm also on 5.1 direct from ue5-main so that might have something to do with it lol
yeah it still has to recompile all shaders when I right click the uproject file and go launch game.
i put this function of print just to see if it s working or not
and the print worked perfectly
Hello show up after 3 second when the all the players join
the exact problem it s when i try to Travel from a level to an other
and i think the problem came from the difference of the Unreal version
i m using Unreal Engine 5
try increasing your DDC size in BaseEngine.ini
Hmm the logs indicate that there is no DDC.ddp file being generated anywhere.
Can I run event in PlayerController that is going to trigger only on the owning client? If I understand it correctly every client gets its own PlayerController, but does he also own it? I'm trying to call event from Server RPC to Owning Client RPC, but it's only triggered on Server (all from inside of PlayerController)
When I print get owner from inside character it prints his player controller, but when from inside of that player controller I call Owning Client RPC it isn't triggered..
are you making a transition ??
Yes PC is client owned. And yes you can run client and server RPCs in the PC. I'm not sure what you mean by "from...to...". You would need to show us some code
Unreliable you'd use for something like look direction which is updated constantly so it doesn't matter if it misses a few.
Does anyone know how to visualize the server position to see the difference in the server and proxy positions? I thought there was like a debug command or something but I cant remember and google not coming up with anything for me.
Well, the server and client don't know each other's positions.
How would you visualise it?
Only thing you could do is visualise the on rep for the position on the client.
Hello everyone!
I'm having a bit of trouble with multicast RPC at the moment (UE5). The multicast function is getting called in server and the chain of ownership is correct too, as far as I can tell. However, that multicast function is only getting called at the server and is not being broadcasted to all the connected clients. What could I be doing wrong and where should I start looking?
For some context, what I'm trying to do is really basic. The function only sets variables in an ActorComponent.
What kind of actor is it on?
I had a similar problem and it was an ownership issue
From the GameMode itself
OHHHHHHHHHHHHHHHHHHHH
Got it. Thanks! I think I'll review the networking compendium. 🙂
there is p.ShowNetCorrections i think
you won't be able to see position on the other side, but you'll see debug capsules when server corrects the client position
Hey all! I just implemented a lag compensation system for attacking in my project, and it's pretty normal, it saves the transforms of each pawn on the server in the last x seconds and then when someone wants to attack instead of just doing the attack logic it gets the location of each pawn not at the current time, but at the current time - the pawn's current ping and uses those locations in the attack logic instead of every pawn's current one.
This is all very standard, except I'm wondering; Is it sensible, when getting the locations of each pawn to account for ping, to not get the location that was current ping seconds ago, and to instead get the location that was (current ping * 2) seconds ago? This reasoning comes from how the server also takes time to replicate the pawns' positions to each client. Can anyone advise me for or against this idea?
P.S.: I tried to explain this as best as I can, except I still feel it isn't very clear so if anyone needs more info to help me with this, feel free to ask.
I think it’s better for the receiving clients to have a slight delay than to introduce any additional latency to the attacking client, essentially causing his attack to lag on his end.
This is obviously without knowing how your attack works or the mechanics of your game.
I completely forgot to mention; when a player "attacks" their attack request is sent and attack logic is handled on the server. This is to restrict cheating heavily and is the entire reason why I need this system in place.
Well its rather straighforward, in PlayerController on Begin Play I call Server RPC InitializePlayer, from within this event I also call Assign Quests, this event calls another event from GameMode that sets players quests on server. Now what I want is after the quests are set, client should spawn all of them as actors (Quests is array of classes from which client spawns objects)
I tried to call Owner RPC Assign Quests right after Server RPC Assign Quests but it's only being triggered on server, or rather host because I use listen server
Understood, well in that case I wouldn’t multiply ping x2 since other players have different pings.
So if someone with 100ms attacks
And someone else has 10 ms
Then it will be glitchy if it’s blindly multiplied by 2
I see your point and agree, thanks for the help
Sorry thought you meant pawn - yeah Unpossess is not called client-side for controllers.
Is there a weird thing with UE5's physics thresholds? I've been making the UE5 VR template into a multiplayer template but I've noticed that editor placed physics actors will not start simulating on the client unless they are a certain distance away from other actors. eg the yellow boxes in the template will just hover if they are within about 10cm of another surface.
Hi, i was wondering, with UE5 would there be any processing offloaded to a GPU for a dedicated server?
it won't
you can't really count on most dedicated servers to have a GPU worth offloading stuff to
so even if you could do it, there would be little point to it
That’s what I was looking for. Thanks
Hi all, I had a question earlier which wasn't picked up. When I run stat net in the console, does anyone know what the in/out rate (bytes) actually refers to. Is this the amount of data in bytes being sent/received per tick, or per second? I'm trying to arrive at a basic figure of how much data the server is having to upload, and how much the clients are having to download per second. If each client is receiving 4kb per second, that's fine, if they're receiving 4kb per tick, that's an issue potentially...
its per second
Hello, I was wondering if replicating 10 arrays of length 1 has approximately the same network usage as replicating 1 array of length 10?
Alright thank you, I'll stay with one array
btw I saw your article on your website for creating an inventory with UObjects, and that was very helpful !
@winged badgerAwesome, thanks!
How can I allow clients to trigger a "Run on server" custom event on an actor in the scene? In my case i have a balloon; if a character hit the balloon actor it calls an event on the balloon which adds a force impulse to itself...(i think) the problem is that event is not run because the character does not own the balloon. I know I could stick the event in the gamestate instead (and Run on Server from there instead)...but this is seems messy seeing as the force is specific to this balloon actor
Thanks....ive routed it through the player controller, and works ok that way....but i notice that the replication on clients looks stuttering (the force added to the balloon create a lot of quick spinning and stuff)....so currently the server is adding the impulse force and then the clients are replicating the balloon movement. Would it be better to turn off movement replication and instead multicast the event, so that all client adds the force locally?
Note that increasing the network update frequency on the balloon to, for example, 1000 seems to smooth it out, but i'm assuming that is a bad idea to rely on crazy fast network updates? (also it's not an issue with a bunch of network corrections)
oh wait having all clients add the force locally is not an option anyways due to my first point 😐
No. Do not multicast.
and you can't send a server RPC from GameState
Replicating physics movement is a whole topic unto itself. There's a ton of tuning settings in the project settings and you also want to experiment with applying forces and impulses on server only or everywhere. It's not just a fire and forget setup
If you were to multicast event and not replicate movement, the balloon would move on all machines, but it wouldn't be the same. I might see it go left, and you might see you go right. Who's correct?
I'm assuming force is deterministic, so all results should be fairly similar, then resync at the end of the force, so: 1) Pause replication on movement 2) Apply force locally 3) Unpause replication
Now if it's not important to game play at all, you can just simulate physics locally everywhere.
Is this for gameplay or is it just cosmetics?
Then yeah, don't try to outsmart yourself. You are going to want to get the server authoritative replication working. Do you need prediction or no?
If you do need prediction, good f****** luck. It's going to be hard
prediction?
When you hit the balloon, does it need to move immediately or is ping delay okay
It needs to move right away, like soccer or something
physics in unreal is not deterministic
Yeah you're going to have a bad time. It's doable but you will really really need to know your stuff to make it smooth and not janky with latency
combined with network its a geniune nightmare
What would you suggest instead of using forces?
I'm working on a multiplayer physics-based game I have one thing that makes it a lot easier. I do not need to locally predict anything. All I do is send the inputs to the server and watch things happen
Read up on network prediction and lag compensation. Stuff like this is super hard because everybody is in the future on their own machine versus the server. So when you have interactions between multiple clients, like two people trying to kick the ball at the same time, things get really weird really fast.
Just move the balloon to a specific location type of thing (so kind of fake physics?) Would work better?
Cuz on my screen, I kicked the ball. On your screen, you kicked the ball. Who kicked the ball?
The Rocket League video actually had a decent explanation on how they did that stuff. It's pinned in this channel 🙂
Assuming that's similar-ish
Yeah this is fundamentally the same problem as rocket league and yes, I would never in a million years want to have to actually do that as a one-man show. Not going to happen.
Yeah it's pretty similar to rocket league
Now, if your players are physics driven as well and you are okay with not doing local prediction, it's fairly simple. But the higher you're peeing, the longer it will take for something to happen on the screen from when you send your input
What Rocket League does is predict the ball (and even vehicles they said? But I'm still completely unsure how on earth they did that).
Their approach is very complicated and it involves like rewinding and resimulating physics etc. I'm doing multiplayer physics vehicles but they are big and slow, so waiting 30 milliseconds for the throttle to increase is fine.
If you don't have to do that I would totally not yup. Their rewinding is rather crazy work. Also to be fair they swapped out their physics engine too.
So if you were like making gang beasts soccer, and a little bit of slop in your controls is fine, it'd be easy.
If you try to make Unreal tournament soccer, with real snappy movement, good luck
Reject real-time. Make everything turn-based.
everything is turn based, just when turns are ticks they are lying to you 😄
funnier ticks = Always Tick Pose And Refresh Bones
when setting up HUDs for players should the setting up of the HUD be in the player controller or the actual character?
no
it should be in a class derived from HUD
and set as HUD Class in the GameMode
I wish I had a good turn-based idea.
@winged badger what if I have multiple different huds for different players?
it still provides safety of being local only and 1:1 relationship with the PC
which means it will prevent you for slapping the client widget on server's screen, at minimum
if it needs to show different widgets based on player setup, if can do that just as well as character or PC could
So is there a way to make a multiplayer game where players rotate towards their mouse location without it being super costly?
I've done this before in the past using event tick where the server would update and multicast everyone's new rotation, which had to be reliable to avoid lots of snapping. Safe to say I'm sure it was the cause of most of my traffic problems
Hi! I'm using chaos vehicle and it works fine in single player. But in multiplayer my vehicle wheels sometimes start to fall through the floor and it occurs more frequent with more clients. At 4 clients wheels fall through the ground almost instantly and with 1 client they fall when I drift at high speeds. Any ideas on how to fix this?
I have like 2. But they're not going to be worked on until like early next year most likely 😭
It doesn't have to be reliable, of course
It simply needs inteprolation
(And yeah, it should in fact never be reliable)
ah yes I don't think i even knew about interpolation the last time I did this, thanks this should do fine!
question, so im running this setup in a replicated actor, to scale the fx in it client-side with time. this works on server but not on client. however, i checked with a print node that the value that is supposed to be written to radius is indeed calculated correctly on client. it just doesnt seem to write to the niagara system properly. howeverever, if i set it to a static value instead of this dynamic one, that works correctly on client. can someone tell me whats going on here? im kinda out of ideas
I think you should only run that on the client. Just send an event from the server and run that on clients. You don’t want to replicate event tick whenever possible.
but i am running this on the client. but this is no dedicated server setup so server is also a client so it needs to run this as well, for its own player. but they're running this separately
Of course, but it shouldn’t replicate to other players every tick
The server should call the event
how does it replicate tick here?
this is just normal, local tick, no? there is no network event here
But the particle system shouldn’t be replicated
You simply use multicast to run that logic on clients
its not replicated
its just part of the actor
its spawned independently on client
when the actor replicates
It’s not unless the component is replicated
Which you shouldn’t do
You need to spawn the actor on the client
Not on the server
Otherwise the client can’t change the variables as it doesn’t have ownership
then why can it change the variable if i just set it to a specific value and not this calculated one?
Changing a variable is not the same as changing the Niagara particle system.
no i meant the niagara parameter
then why does this work?
and also, why does it not work when i spawn a new system client-side?
cause i tried that too
That’s good then
See if time created or something else is returning a different value on clients
Or height
the values are all calculated properly, i checked all of them with print nodes on client
Have you tried just incrementing the value on tick?
If you can’t change the scalar parameter on the client, then it’s an ownership issue
then i wouldnt be able to change it at all
but if i set it to a static value, it changes on client just fine
which is why this is so confusing
If it’s static it’s not changing…
It’s the same size as the server
So not replication is needed
no replication is needed in any of the possible setups with this, because they're calculating the value independently
Anybody know why my "Locomotion" State wont transition to "Jumping" State on Server but will on client?
Transition rule is a bool checking if the jump key was pushed. Yes it is replicated. It works properly if simulated in the preview. On Standalone it works. But once its a multiplayer setting it breaks. Everything else about my locomotion system works great except the Jump Animation.
Just to clarify the Jump itself is working and replicating but the animation is not.
You’re running it in a multicast
When it’s a replicated variable
You only need to run it on the server
And jump is already replicated iirc
So remove the variables fro mthe Client comment
You just need to set the variable for all clients to see
Try calling Jump on the action button and remove everything else and see if it’s still replicated
It should be assuming you’re using character movement
And movement is replicating
nvm i found my issue
im suprised u didnt spot it lol
Take a closer look at the green commented section xD
It still isn’t the correct way to do it
What’s the point of a replicated variable
If you’re using multicast
Also jump is already replicated in character movement
Im confused and still learning. Are you syaying I wouldnt need the variable at aall?
Im aware of that but some things I wanna do will end up breaking that default replication
So how would you do it
Ohhh yha, i was trying to figure out what was wrong i did that during my wtf phase lol
this is how i do thjat stuff
my walking example
Correct?
No
You don’t need to multicast movement
Only do it on the server
And it will replicate
Only replicate it on server
Movement will be automatically replicated to clients
If the actor is set to replicate movement
So do it on the owning client and server
And that’s it
Oh Yha I dont have character movment auto replified
Jump key doesn't exist on server
Does printing Is Jump Key Down on server result in a true when you jump on client?
I figured it out. Was more trying to figure out why he doesnt think my method is "correct"
So what was it?
Jumping should be handled by the CMC, you shouldn't have to do any of that stuff
Now you'll get a lag when you jump
it's not subjective
Hello, in cpp, is there a way to automatically call the OnRep function on the server when a ReplicatedUsing variable is changed? I see that in blueprint RepNotify variables automatically calls the OnRep function on both server and clients
you're setting a replicated variable in multicast
which defeats the purpose of using a replicated variable
and calling the jump method on each client
I stopped replicating the variable
is that what u were trying to say?
Hello! Anyone can explain me how unreal handles UTexture2D assets in the server? Does the texture gets created in the server and replicated?
Multicast are designed for one time event (example an explosion), if the variable should be known by every player even if they was not close from the actor that has this variable, it should be replicated. I don't know what you are trying to achieve but keep that in mind
A player Jump
If you a grabbing your list of friends through the friends OSS, wouldn't you be able to get a valid FUniqueNetId from the response?
I can get the list of friends and their display name, but calling GetUserId() is returning an empty object
Do they have to be connected to the same server / world in order for that call to work?
I think you can remove all server stuff and just keep Input Pressed > Jump | Input Released > Stop Jumping
Jump is replicated by default
If you want to keep the variable "IsJumpKeyDown" you can make it replicated and set it like you did after the input you have to make a server event that set the replicated variable, or use a multicast without replication like you did
But do you really need all players to know the "IsJumpKeyDown"? If it's for replicating the animation, there is a variable in character movement that is set to "Falling" (I don't remember the name) when your character is in air (ie jumping)
Yep, he said the exact same thing I've been saying
but you don't want to listen to me for some reason
Yha but he said it in a way I understood lol@shell forum
@fresh chasm@shell forum So is that just bc its integrated in? What about for something like sprint would this method be correct?
No, you would only set the variable on the owning client and server for movement speed
iirc MaxWalkSpeed has to be set on all (server and clients) so a RepNotify would be perfect. So when the player press the sprint key, you execute a Server event, that set "IsSprinting", then in "OnRep_IsSprinting" you change the MaxWalkSpeed
Youtube tutorials suck -.- Is there any vids of this you can link me too. All the ones i have found are of how I did it
Just set the max walk speed on the client and do the same on the server
you dont need a tutorial
Check the docs there are always good infos https://docs.unrealengine.com/4.27/en-US/Resources/ContentExamples/Networking/1_4/
Also you can download the Content example from epic, there are a lot of examples
How can I setup references to players controller and his HUD? First I spawn pawns as NPCs and then server lets some clients possess this pawns and after client gets control of his pawn I need to setup references on this pawns BP for its controller and HUD.
I have this BP created but it always fails at assigning players HUD
Wow, that hurt my brain to try to read >< but one thing to check as a general thing is dedicated servers don't load widgets. If you are running a dedicated server I would check to see if the load UMG flag for dedicated servers is on
const IOnlinePresencePtr Presence = ServiceContext->OnlineSubsystem->GetPresenceInterface();
if (Presence.IsValid())
{
const FUniqueNetIdRepl ReplId = GetLocalUserNetId(0);
const FUniqueNetIdPtr NetId = ReplId.GetUniqueNetId();
Presence->QueryPresence(*NetId.Get(), InQueryUserIdArray, IOnlinePresence::FOnPresenceTaskCompleteDelegate::CreateLambda([Presence, InQueryUserIdArray](const class FUniqueNetId& UserId, const bool bWasSuccessful)
{
for(const FUniqueNetIdRef& UserIdRet : InQueryUserIdArray)
{
TSharedPtr<FOnlineUserPresence> PresenceInfo;
if (Presence->GetCachedPresence(UserIdRet.Get(), PresenceInfo))
{
UE_LOG(LogCommonUser, Warning, TEXT("Found user precense - current status: %s Is Online: %s Is Playing This Game: %s"), *PresenceInfo->Status.StatusStr, PresenceInfo->bIsOnline ? *FString("True") : *FString("False"), PresenceInfo->bIsPlayingThisGame ? *FString("True") : *FString("False"));
}
}
}));
}
So upon inspection of the PresenceInfo, it looks like the data there is correct (IsOnline is true), but the GetCachedPresence call is returning false...
So I can see the data with a breakpoint, but the GetCachedPresence method always returns false
Ah, nvm
I thought it returned a type of bool
it's returning a type of enum
problem solved
What does it say if you print the "GetHUD" ?
empty string, I tried triggering owner client RPC from Event On Possess inside PlayerController and it seems to work so far
That might be because HUD only exists on client
Yeaa I got confused because in Character BP if you want to use On Possess event it says that it only triggers on server but when I use this event in PlayerController it doesn't say that, so I though it triggers on client but little did I know
But another issue which this solution brings is that when I call Owner RPC from Event On Possess which is called on Server, this Owner RPC still may not have the possessed pawn reference. How could I avoid this?
Isn't there like an OnRep_Pawn or something?
That would get called on the client once they possessed it
Then couldn't you just call the server to do its thing?
I don't see how you get out of making another full round trip with the way you are designing this
Well basically Server sets up bunch of quests for Client, and after Client receives a pawn, I need to setup Clients HUD with all these quests.
Probably better off to just use an OnRep for your quest array and have your HUD just fill out after getting the rep
Yea thats one way to do it for sure
Are you doing this in blueprints?
Yes
It's been a while since I've looked at it, so I can't recall if it is multiplayer-supported, but there is a free mission component project on the marketplace you could always take a look at
That might give you some ideas
or it might not support multiplayer and be a complete waste of time, so I would confirm that first
Just call a run on owning client event during event possessed.
Found "Easy Quests" but it says: "Network Replicated: No"
You mean something like this?
Does anyone have tips on replicating chaos? Simulating with 500 ping provides a pretty jumpy result. Didn’t know if there’s some kind of client side prediction somewhere in the engine
Quick shout out to @signal lance for being awesome and helpful
But I haven't done anything now 😅
lol you helped me yesterday
It just entered my mind out of nowhere
Most people just complain; gotta take time to give postive vibes too.
Ah the shared ptr stuff, I remember
Most people just complain; gotta take time to give postive vibes too.
True true
I hope you have a wonderful weekend!
Thank you, you too
I've been debugging this for an embarassingly long time. Would there be any reason that Character->GetActorRotation().Yaw seems to return a yaw of 0.0f when querying other clients? I had thought that yaw was replicated (clearly is somewhere as they rotate)
Where can I get the current replicated yaw of a character?
Rotation isn't automatically replicated unless you're using control rotation
you can simply replicate the yaw on the server on turn input event.
InitializePlayer is a server RPC and it's being called from server so it's like a calling a normal function on server. Same thing goes for AsMindHuntMode::AssignQuests server RPC(it's being called like a normal function on server) that is being called from a server RPC.
It's not called Owner RPC but Client RPC. Calling a Client RPC should execute fine on owning client.
Good luck modifying the engine source code
Hey, I'm creating a small multiplayer fishing game demo. When i start fishing, the player should only be able to control the fishing rod with mouse. When the bait hits water, camera goes underwater and you can see fishes swimming around it (other players cant see these things and you dont need to see their baits either when camera is under water ). You can press another button to switch back to thirdperson view and there you can see if other players run around you. Does anyone have idea how this kind of functionality works or even small hint to get me started. Surely you cannot just switch gamemode when you start fishing. Should the thirdperson view be on the main level where all the characters move and when bait hits the water, it switches the level on the players computer, other players then sees the character standing on rod in his hand? How would u even make that happen? Even small tips are gladly appreciated, thanks 🙂
Add a camera to the bait
And then set the view target of the player to be that camera
You can’t change gamemodes mid game
Is it normal that I have to create a multiplayer logic first in BP before converting it to C++? Or should I start practicing creating it using C++ from the ground up?
HI, can i set a boolean just to rep notify and dont put the fuction code in the rep notify? or does a rep notify only works when code is in the repnotify function?
I found it easier to make in blueprints first
Then switch over to C++ once the actor is complex enough to warrant using code
I see
What do you mean? If you want it to just replicate without a notify function you can just set the variable to replicated.
i have a door with is locke dand unlocked with a particle system active when closed and inactive when open.. SO if a player disconects and joins back.. i need that he see the actual state of the door
You will need a rep notify for that
can i set the bollean closed and open just to rep notify? or do inned to put the activate and deacctivate particle system in the repnotify function?
I believe you would put the activate/deactivate in the repnotify function. I can’t recall whether particle system components handle replication for you.
I don’t believe they do though
i see ok i gona try that... not sure at all... rep notify is pretty new to me
aother question th enetupdate rate is set to 100 on most actoris where and when i shoudl reduce this? On all meshes? or only moving ones or ai ?
You shouldn't need to tweak that: #multiplayer message
so reducing them to 50 wouldnt make any change at all?
Seemingly it would make your actors be considered less frequently for replication and it would save some performance. Though a better case would be to use the Push Model which works without using the NetUpdateFrequency(you consider a property for replication only when changed) however it has been tested quite too many times and little that helps
Hey, do someone knows the method to get the subnet mask of the current local network ?
ok thanks i play around with that
But yaw clearly is replicated somewhere as clients visibly rotate in yaw, just not in pitch by default
I could separately replicate another float for yaw as I'm doing for pitch but it seems that the info is already there on the client somewhere
Wrong question finally : I'm trying to broadcast a given port, but using the SetBroadcastAddress() doesn't seem to change the local address to the broadcast one (it's still the same). How should I use it to broascast?
That's the only way ? :/
Well technically you can wrap your OnRep function with a server RPC and call that inside your OnRep. Would I do that? Hell nah
That mean one server call per client right?
Correct
Well I would not do that too ^^ I thought there was a easier way since the blueprint onrep do that by default
Well BP OnRep work much differently than how cpp OnReps work
In BP they are called when the property changes, so even when client changes the property the OnRep is triggered which is a dumb way of doing OnReps
Oh ok I didn't know that ^^
how can replicate AI anim bp var for clients ?
usually inside the AI Pawn
the animation blueprint is not replicated
and most common/recommended way to run it is to fetch the data from the TryGetPawn inside the (Blueprint)UpdateAnimation and get everything prepared in advance for the animation graph so it can run on a separate thread
if i use multicast every body in any location of map receive this?
if you multicast from anim BP, nobody will receive that, except the machine that called the multicast
no in pawn
if i replicate it replicate on Net Cull Distance
but if i multicast
you can MC there, but its generally better to run replicated variables here
all relevant clients
🤔
let me make my question simple
multicast check Net Cull Distance ?
it checks relevancy, which might check NetCullDistance
if something doesn't make it relevant or note relevant by default
Hi all, i am new to game development. I have a basic question that, how we can share other player locations realtime with another players?. I searched internet and i found out about websockets but idk if we can make http call from unreal engine or not. Also what are best practices are followed to perform this operation. Please share some reference blog or source for it.
like bAlwaysRelevant, bOnlyReleventToOwner and such
in that case it will never check the cull distance
with unreal we generally don't use sockets, but in engine replication system
Hey Zlo, if you are still here, I have a quick follow up question about that session invite stuff
I've been looking at the signatures of the delegates and the methods / etc.
But I am not seeing where to get who is the target person to join
am I missing something? I mean there is the session invite accepted, but its signature only contains the person being invited from the looks of it
there is nowhere in there that holds the invitee
so how would I know internally to join the invitee and the invited in some internal data structure based off of that?
Especially if they are joining from the overlay, which means I have even less visibility into that
How does one keep track of which functions are only being called on the server or client?
I'm not talking about RPCs, but functions that are called from gamemode or from RPCs or from an if(hasauthority) for example, hope that makes sense.
I have a question
If I want to set a player score do I have to set it in the playerstate?
How do I avoid so that a player can't mess around with this score?
Gamemode is only on the server, so that's easy. I always preface my RPCs with Server_, Client_, or Multi_. So when I do end up using them I know.
Only change it on the server.
Yeah but we're having trouble understanding the logic flow here
I want it so that my client when it overlaps with something else gets a score increase
Where is the actual score variable located? In the player pawn class? the player state?
I know, I am asking if for example you call a function on a random actor from the gamemode. You wouldn't have that function as an RPC, but it would only be called on the server, how do you remember that this function is only called on the server?
So on the server, when it overlaps, increase the score. Or send an RPC to the server saying, "hey I overlapped the thing". Then have the server verify that it was possible and then increase the score. Score can be kept wherever you want. Player State is a good place, sure.
Each player state can have multiple player controllers right?
If there are multiple coop players in the same client
Because it's from the GameMode, and that only exists on the server. Leave comments about the why for things. If you're asking how people remember where every function is - that's kind of a difficult question to answer. "How do you remember?"...."I just do?"
It's up to you to architect the game. Having some kind of standardized flow would help give you a general idea where a call should be.
If I set my score in the player state then I need multiple variables for each player controller right?
Honestly not sure when it comes to local co-op on the network. But I do believe it's 1 player state per PC.
Ahh, I was wondering if there's a best practice/standard other than just remembering, for example you have a 100 functions on an actor, it becomes impossible to remember which ones are called on client and which ones on server
So I check the overlap on my pawn but I have to make sure it's on the server right?
You just do the important calculations on the server.
yeah but what I don't get is how to talk to the server and set his score
my pawn overlaps, I check if it has authority then what? My pawn doesn't hold any score variables
Ideally I would want to talk to my own player state?
https://github.com/getnamo/SocketIOClient-Unreal
Would anyone vouch for this?
In BP - the function node itself would say something like "Runs on Server", "Runs on Client", "Runs on Multi", so it isn't as big of a deal, but it's still a good habit to get into. Especially if you are in C++ land. So just remain consistent.
That's good to know, I think maybe postfix might be better than prefix so as to not confuse them with RPCs
When the overlap happens on the server, have the server increase the score. You would then update the playerstate's score.
Oh - you're talkin' about just in general, like general functions and not RPCs?
yup
Oh, that's completely personal preference. I don't think anyone actually does stuff like that. At least, I haven't seen or heard people do it.
Again, where is this score variable located?
I'm trying to understand using the most simple example. Let's have it so that my player when it presses a button it increases its own score
Gamemode, gamestate, playerstate, w/e the heck you want.
Yes.
And then the server adds it to my player score by accessing the variable in the gamestate/playerstate?
I assume I have to pass in my playerstate/playercontroller or something in that rpc function
Yes.
I haven't seen anyone do it either, but sometimes when I'm looking at a function that I've created a long time ago, or created by someone else, it takes me a while to figure out if it's called from client or server by following its call heirarchy, so I was wondering if there's a better way
To me, if you have functions that are only supposed to be called when on the client or on the server, those should be RPC calls. Which would have the prefix.
Could just call GetController() when on the server.
Or if you're RPCing from the controller itself, just get the player state. UE knows which actor is doing the RPC call.
Right now I press a key, it calls the server function, in the server function I do get controller and cast to my custom player state and set the score variable
in the player state does the score have to be an onrep notify?
or is it replicated by default?
Did you tell it to replicate?
Good idea, even if I don't plan on having them as RPCs, it might be best to just explicitly define them as RPCs. IIRC if you call server RPCs from a server, it becomes a regular function call, and the same happens with clients and client RPCs, so there shouldn't be an issue with sending these over the network
I did
Then it is replicating.
Blueprint Runtime Error: "Accessed None trying to read property CallFunc_GetController_ReturnValue_1". Node: Cast To PlayerStateKeivn Graph: EventGraph Function: Execute Ubergraph BP Third Person Character Blueprint: BP_ThirdPersonCharacter
This is a nullpointer right? I'm not sure why I keep getting it
Shouldn't I be able to cast my playerstate as a custom type from my own pawn?
I do get controller -> get player state -> cast player state
PlayerControllers only exist on the server and on clients that own that player controller, so if you are trying to access another players playercontroller, it will be null
The error was that I wasn't checking before hand if the pawn had a controller
doing a check for a controller fixed the issue
I keep getting errors and lagging on my server logs
Warning: ServerMove: TimeStamp expired: 85.747459, CurrentTimeStamp: 86.849335, Character: Marine_Fixed_C_2147482366
does this mean I am having replication issues?
I am tyring to do a pung style auto run
If I call SetOwner on an actor that controller should be able to call annotated Server functions right?
I've tried it about 20 different times at this point, without exaggeration. the anim reference is correct because a different function for switching weapons with the exact same event setup works fine. it's a simple run animation blendspace and only the local screen can see it, client or server. any ideas? missing something simple? doing it all wrong?
I don't think Animation blueprints can be replicated. On your multicast get rid of the "Anim Instance" variable, and instead get the anim instance from the mesh.
Also, you can't take the float value from a different execution path over to the multicast. It'll likely always result in you multiplying by 0.
awesome, that was it, thanks a bunch for the quick response
If you make the actor controller owned then yes
Hey guys, when someone is the server in a listen server scenario, post processing on the world works just fine but if a client connects to it it has no post-processing. Any ideas?
I have a simple Light BP, if actor overlaps its trigger he can turn it on and off, and I would like it to be replicated. Can I do it somehow inside of this BP? Because calling Server RPC to change RepNotify light visibility isn't working because client isn't the owner of this BP Light.
net load on client off on pp volume, or you did something unspeakable to it
hi all ue4.27, one question. I have a client/server game. On the client I use SpawnDefaultController() for a pawn. When I play as client and try to do GetController() for that pawn on server, I get nullptr. How to spawn/access pawn's AI controller on server? thanks
GetController returns the controller possessing the pawn. Make sure the pawn is possessed
@fathom aspen thanks. Where to spawn the pawn's controller on the server then?
You should spawn it on the server if you want the server to know about it
There is a custom viewport involved but it's probably a silly thing like that, thanks sometimes we miss the simplest things 😄
Spawning it on client would just do nothing:
and player pawns should never spawn default controllers
that is more of an AI pawn thing
Exactly. AI = Server
I did this:
FUNCTION(Server, Reliable)
void SpawnController();
void SpawnController_Implementation();
and on the server in SpawnController_Implementation I call SpawnDefaultController(), but it doesn't create it
from the client I call SpawnController()
yes, no
goto pinned messages on this channel
find Cedric's network compendium
and read it a few times
you currently lack even the most basic understanding how the unreal network architecture works
because what you did there is shockingly wrong
well blame UE official documentation : )
And away from mp stuff, you shouldn't need to declare _Implementation in the header file
i do that only in rare cases where its virtual
At least not if you're overriding it 😄
What the best way to spawn replicated props, such as
-Pickupable props ( ammo / health )
-Destructible Glass
On a large level.. For example, PUBG has thousands of these props on the level.
-
Are ALL of the props spawned on the server at the start of the level?
-
Or are the props dynamically spawned when a player enters a zone on the map.
pubg has 100 players at the start
so tracking all 100 of them to spawn stuff when they are near would be somewhat of a pain in the arse
PUBG prolly has a replication graph
maybe they upgraded, but its way older then rep graph
Yeah considering it came way before fortnite
i see
they will be interacted with just once, then they are gone
so you don't want to keep them as active replicated actor
just flush net dormancy, force net update post interaction, if you need to do some effects, and destroy them
dormancy will still spawn them on clients as they become relevant
so they should see the pickups just fine
👍
cool, so in terms of the spawning logic.. The server will just spawn everything at the start of the level
rest of the stuff, simple interactibles that persist on the level, i find network manager approach works perfectly
and the dormancy will handle what gets spawned on the client when they get close to the pickups
you might want to stagger it alittle
right, so there's no huge hiccup
as not to cause server hiccup at start
gotcha
vorixo did the network manager explanation https://vorixo.github.io/devtricks/network-managers/
How to replicate hundreds of actors without replicating them
they work well for non moving actors
no
sadly, I'm still on UE 4.26
i've been using them in 4.18
ahh cool
@winged badger did you refer to this? "If you check out the table again, you will notice that, for example, a Server RPC will be dropped if a Client calls it on an Actor
that he does NOT own." ?
I am reading UE4_Network_Compendium_by_Cedric_eXi_Neukirchen.pdf
read the entire thing, then ask questions please 😄
but that was one part of it, yes
you created a chicken or the egg
What does isStandalone return? Does it return true if you’re in a single player game with no session created or only if the game uses no replicated events at all? I can’t find any documentation for it.
Still kind of confusing as to when it returns true/false.
So a game running with create session would always return false, even with 1 player.
And a game that was simply opened with OpenLevel would return true, even if using replicated events and such?
local session from my understanding is a session running over the LAN
Has nothing to do with replicated events
OR single player games
that's weird though, in _Implementation I get GetNetMode() == NM_Client ; so that's why SpawnDefaultController() returns, _Implementation is called on the client's side
Hmm
It seems to return true when I run as standalone in the editor, and false if it's a listen server regardless of the amount of players.
not sure how it will function in a packaged game
Depends on how you run your packaged game.
A packaged game can be listen/dc/standalone
Hi, i've been playing with anim layer linking in a multiplayer project and have some issue with relevancy.
The anim layer comes from an equipped item, when the player loose relevancy and come back, he's now in T pose since the anim layer is no longer linked.
Who can i make it works ?
I tried setting the variable of the weapon as OnRep and include the anim linking in the OnRep function but that dosent trigger when relevancy is back
So if you open a level with ?listen, it would be false. And normal OpenLevel would be true? Seems to make sense.
sup. i've got an issue that's driving me absolutely mad right now. i've got a CapsuleComponent that isn't moving on the server. i've drawn a bunch of debug points on tick to demonstrate what's happening.
you'll notice the red looks like a perfect circle. that's the radius of where my character is initially swinging (the CapsuleComponent just isn't moving). the blue is the simulated proxy of my weapon actually moving the collider. the server stays completely still but the simulated proxy moves everywhere.
what do i need to do to get the collider to move on the server as well? does this have to do with ChildActorComponent? basically, my character's weapon is added at runtime as a ChildActorComponent to my ACharacter. the weapon itself has the collider. the actor, AWeapon, is set to Replicates, and my Collider is set to Component Replicates as well.
anyhow, sorry for the sudden word vomit. this is just driving me mad
looks like it's common for ChildActorComponents to not properly replicate 😦 it looks like the simulated proxies themselves create child actors. i'm reading that i'd need to create just a regular actor and then attach one to the other
that's hilarious. i was talking around that time too. thanks @fathom aspen
Haha yeah I noticed that, thought he was talking to you, but he wasn't 😄
so i'm still having the same issue though. :\ the collision capsule doesn't move on the server
How is the calsule moved?
the capsule is attached to the weapon
the weapon is replicated
the capsule is moved by an animation
the weapon is attached to a mesh
maybe the mesh isn't moving on the server?
unlikely, because other clients see the mesh moving
The capsule itself is moved or the weapon is?
Is the capsule just riding the weapon which is riding the skeleton which is driven by the animation?
@dark edge
blue = simulated proxy. red = authoritative
i'm just printing out the location of the collider during the ticks in which the ability is active
Do you have animations turned off on server?
how do i check that
Dig around in settings, there's some setting about animations on dedicated server
Does it work?
lmao
it was set to Always Tick Pose
when in doubt, think of the stupidest reason it could not work. The skelmesh's on server were literally not animating
Yes because what was being replicated is "Play AnimationX", not the actual movement of the bones
that'd be WAY too much data
so is this way too much data now then?
No the same data is going across the network. Just now your server is playing animations when before it wasn't
But most games probably just do clientside hit detection then on the server you do a sanity check. It sucks to have your sword hit a guy on your screen but not on the server.
i feel you, but i have no idea how to even go about doing that
It'd be like
Client "Mr. Server, I hit these guys"
Server "uh they're halfway across the map, no you didn't"
hmm i see
so i RPC to the server and ask if they're in range
essentially
this is so much more complicated because of GAS
the ability is technically happening both on the client and the server. so i guess i could do the hit detection on the client, RPC to the server, client and server continue in sync
anyhow, i'm now further than i was before. ty
I see that video helped
You did the debug thing too, nice animations btw
appreciate that. not mine tho 😦 one is a marketplace asset and the other a contractor made but we're no longer chatting. oh well.
so everything was working fine with bones on the server. but because i'm a freak, i just implemented this: #multiplayer message
it's jank.
- ability is triggered locally and on the server.
- on the server, ability just hangs.
- on the client, collision is set up. animation plays. the two capsules collide.
- the client sends an RPC using
AbilitySystemComponentto a custom function i made that all it does is call a static function on the ability. - the ability runs some server-side code applying effects to the hit character.
i have not yet written any validation for this, and i'll probably just end up going with the other, less optimal solution that turns on bones for the server. but at least now i understand what's happening.
is there any way to add fake lag into the networking code during runtime?
wow, yeah. feels horrible on GAS as-is.
with 250ms it looks terrible
Nice stuff dex. I've been looking into the validation part, still not 100% sure how to confirm client data on server.
good call. i ended up noticing this and this is now how i'm doing it with GAS. i'm starting to understand what prediction keys are for.
okay so at first the clients can't decide who to be so they rapidly interchange between autonomous proxy and authority, and then they collapse their superpositions but don't get entangled as they both choose authority
On which actor are you checking the role?
oof, tough question
basically the one possessed by each client
ah yes, the cars don't appear in the same level
That's because they are prolly spawned client-side, so that's self explanatory
The client has authority over them(each client has authority over the car he spawned)
my head needs a break and a reset, how do I get them to yield authority?
They already do?
okay so my requirements are that I need the cars to appear in the same level and respond to the lag params I've set up
You need to spawn them server side and make the car actor replicated(set bReplicates to true in ClassDefaults)
one gets ROLE_Authority and the other shows up as ROLE_AutonomousProxy
give me an hour, please, I need to digest this age old code and get back in form or I'll lose my job
For the clients one car should be ROLE_AutonomousProxy and the other one ROLE_SimulatedProxy.
Both cars should be ROLE_Authority on the server.
Take it easy
Okay, so this isn't happening
for reference
Well we still don't know how you output that text widget on the car. But I can clearly tell that you don't have a SwitchHasAuthority before printing, that's why it's rapidly interchanging between the two
Btw. if you didn't read it already, I would recommend you to read through this documentation: https://cedric-neukirchen.net/Downloads/Compendium/UE4_Network_Compendium_by_Cedric_eXi_Neukirchen.pdf @twin juniper
But before you care about that, you should care about having the cars see each other...
Which is done by reading this
Don't worry about the job, you'll get a better one once you get the knowledge 🧠
checking the Actor BP
1000 incoming and outgoing with 20% packet loss is quite a lot of lag
I usually test with min 72 and max 150 with around 2% packet loss
Oh yeah. That's not a realistic amount of lag at all 😄
Unless you really think some players are gonna stick around playing on a server with 1000ms ping?
Honestly I would quit rage at that point
For sure
I'm trying to see if the interp logic works
Even half those amounts is a lot of lag, that would be like your ISP is doing maintenance while the server is being ddosed at the same time.
I need this very specific job because it's really easy and incorporates surmounting three steps.
- Getting the toy project to work
- Getting the sample project to work
- Mix and match
my friend here in India good ping is about 140ms
and it can go up to 300-400ms for connections across continents
okay so maybe something like min 100 and max 450 with around 5% packet loss then
Go for it. Though I wouldn't rush things if I ain't got the basic knowledge in place
close enough!
I do have the basic knowledge but it's misplaced 😦
I hate memory in this instance
@twin juniper don't try to solve so many problems at the same time. This will definitely melt your brain. Try to fix your game first and then test latency.
check and check
let's go through this ducky senpais!
Okay so I know how the text gets printed:
TickComponent
DrawDebugString(GetWorld(), FVector{0.F, 0.F, 100.F}, RoleString, GetOwner(), FColor::White, DeltaTime);
BeginPlay
RoleString = UEnum::GetValueAsString(TEXT("Engine.ENetRole"), GetOwnerRole());
GAS is a doozy
I'm sorry but while the document is really clear and concise in terms of what I can expect on the server and client, I'm still in the dark about why my pawns aren't showing up.
@fathom aspen@steep flame
I'll try to sleep over it but I'm feeling abysmally dismal after trying to grok the text
Hi, I have a particle system attached to my player, how do i make it replicate? (I have set component replicates to true however it still doesnt replicate to the client)
I believe the answer is to have the server spawn the actor
otherwise the actor is local to the client and won't appear anywhere else
how do u do that?
Call the spawning function from a server only event/function
replicate a state that causes the particle system to show
it can be pretty much whatever you like, a boolean, enum, integer, it doesn't matter, choose whatever makes your code most readable
then set that variable to replicate, with RepNotify
and from OnRep_MyState spawn the particle system locally
in blueprints, OnRep will also execute server side
I am just setting it to visible/ not visible i am not spawning it
its a component of my player
Ok thanks I’ll try that out in a bit
any book recommendation for UE4 multiplayer ?
pinned messages, Cedric's network compendium
i have a weird issue where i have a projectile which is supposed to stick to whatever it hits and then explode (Destroy itself) after some time has passed
and on the server it works as intended
on the clients not so much
the client sees the projectile bouncing off whatever it hits
and exploding after the time is up
I'm at the exact same question myself.
Physics replication issue?
i dunno
still 100% in the dark about this
I believe a little bit of faking may be required here. Spawn a proxy sticking mesh on the client once the "attach" event (RPC) is triggered. Recycle the actual projectile.
I say with 0% knowledge of networking and 100% knowledge of setting up the stage props inside a game level.
This is not directly a programming related question so please direct me to the correct channel if this isn't. Is there any suggestion/encouragement/recommendation regarding to connecting to databases from dedicated game servers? Would it affect anything performance or security wise? As to my knowledge there isn't anything coming from the engine to establish a connection with a database, are we bound to the plugins/external code for this? Other option is I guess having an external server where I communicate with my game server to do database related operations. For my case both seems like fine, what other criteria I can consider to make my decision regarding to this?
ok so update
this is really odd
if i fire the same projectile from the client it sees it sticking to whatever but the server doesnt see the projectile at all
so your sticking part is probably gated behind an authority check
and this was expected from how the original problem presented itself
which is weird because i call a multicast to fire the projectile which is NetMulticast, Reliable, WithValidatation and the _Validate method just returns true (for now)
so shouldnt the server allow all RPCs from the client?
Oh that makes sense
Anyone who has modified networked slide to the character movement component? Do you think it's better to:
- Make custom movement mode and custom Phys function for it (like PhysWalking has) or
- Keep movement mode as walking but override stuff like CalcVelocity etc? Slide is pretty close to walking anyway, just with different acceleration and velocity and turning. Currently trying to go this route but CMC is a beast lol.
generally, you'd need to subclass FSavedMove so it carries the Sliding movement flag
and use it, which would require subclassing the CMC as well
I already do that
did you get it working single player yet?
no, I'm trying to understand how CMC calculates velocity when walking. Even when I override it with static value, something is projecting it on slopes etc, so it seems like CalcVelocity isn't the only place that affects velocity for example, so I don't have full control whats happening
thats why I'm thinking maybe custom movement mode would be better
probably, since without it you can't really configure it from editor
unless you hardcode the values relative to an existing movement mode
and that is not pretty
and you're likely going to have few days worth of tweaking it until it feels just right after its working
i think that i should do stuff like animations and sounds client side and then call a server RPC for actually spawning a projectile?
depends on the game
Classic case of something needing role reversal imo
FPS will never feel right if you don't let client calculate its own shots
the reason why I'm trying to modify PhysWalk to support slide instead of custom movement mode, is that it already handles stuff like collision well. I will keep trying and switch to custom mode if I can't get it to work right with walking + overriding the functions
i have absolutely 0 idea what that is
People, I am not able to figure out how to make this example work.
Basically the projectile is being spawned only by the client (listen-server included). You need it to actually replicate by having the server do the spawning/tracking?
oooooh that yeah that's definitely it
Glad I could be of help but I have 0 idea how that works lmao
and in fact, I do need to know how to do that?
most people will opt for using a particle system to look like a projectile then spawning actual projectiles, if they can get away with it
After all it's a matter of hurtling a mesh across space and having it stick, so it could very well be instanced.
problem here is prediction
for it to feel right, client needs to see the projectile before it gets a round trip later information from server
If it's a Simulated Proxy one could use some interp/extrap to get it right, right?
spawning an actor separately on server and client and having it replicate is doable, but the timing is a bitch for a rapid firing weapon
having each machine spawn its own projectile is probably better if you're going with an actor projectile
That makes sense for bullets or rapid fire as you said, even hitscan benefits from this
but how will this work for a sticky rocket, like say the Redeemer missile?
Okay maybe this example is too contrived as the missile can be treated as a fully replicated pawn
hitscan has no reason to spawn full actors for bullets
Sure, basically any projectile can be spawned locally, we just need to know when it was fired and when the shot connected, and maybe derivatives (start and end velocity)
Speaking of prediction, my entire prediction logic is not working and looks useless from the listen-server's side.
so do i use the value of MyState to set the visibility in OnRep_MyState
https://gitlab.com/Vivraan/krazykarts
Any help is appreciated.
From Sam Patuzzi's Udemy Course: https://www.udemy.com/unrealmultiplayer/
@twin juniper i did that, it doesnt work
how have you set the code up?
show both the .h and .cpp file contents if you may
I have used blueprints
one sec
Here @twin juniper
that is not the OnRep for that variable, hate blueprints
delete that OnRep function, swap your varaible to non replicated then back to repnotify now after it was renamed
and don't do this set on Tick,
you can just use NitroActovated as RepNotify here
The pdf by Cedric really does a good job explaining these basics!
Does anyone have an example unreal project utilizing steam for matchmaking and lobbies?
ok so
i set it up this way for now
i spawn the projectile on the server
and right after that a client rpc is called to play all the animations and sounds and stuff
but the projectile just doesnt spawn
is it spawning for the server?
if it is, ensure bReplicates = true. If it's not, you need to figure out how to spawn the actor
What's the recommended method of binding a widget to a delegate, when the delegate is broadcast on the server?
I'm unable to bind to delegates to events in UMG widgets, because I assume the widgets don't exist on the server.
well... there are many ways to do this but I personally like to handle this using a messaging system ie: the engine's ULocalMessage system
which allows you to broadcast and send events from the server to your clients
BroadcastLocalized and such
so yeah... if the event is server side, just get the controller you are interested in
and send a client RPC
I see. So send a client RPC using ULocalMessage? Does it allow me to broadcast once and listen for it anywhere?
I'm having trouble to find a guide on how event-driven UI updates are usually done in UE and the documentation is spotty.
Well I'd wager you treat your UX as purely views. In this case, separate all data and use this messaging system to transmit whatever you need.
I've tried replicating this. But instead of using an event dispatched, I want to use a multicast delegate from my actor component in CPP
https://docs.unrealengine.com/4.27/en-US/InteractiveExperiences/UMG/HowTo/EventBasedUI/
Correct. However, I assumed that the delegate system would be the correct and preferred way of notifying the UI
It appears to be a good way in a non-networked case.
Would you mind elaborating why it wouldn't be in a networked case? I feel like I'm missing something obvious 😄
I believe it's because delegates aren't really designed for the networking case (afaik). Looks like it's meant to handle cases only on the client-side (so you can use RPCs and then dispatch via delegates?)
Ah okay, then I was misinformed about their use case. Thanks for the clarification
Again you must best look at the source and figure out how they work tbh
sup. i have my enemies all to replicate movement. this works great in settings with no lag. however, as soon as i introduce lag, applying any kind of impulse locally doesn't do anything until the server registers that the impulse happened. is there a way i can the movement component to respect local impulses and eventually correct server-side if necessary?
I'll look at some examples in Lyria I think. Thanks for the advice
i think it's this:
I think the network model is server authoritative and thus it won't execute on the client until the server has done so first. For certain things at least.
I worked on a 100p FPS game, as a Producer mind you, but issues like these were ever present, especially on laggy servers.
yeah i feel you. i just want to disable that for the simulated proxy while the impulse is happening as these are not actual players. once the impulse is done i'd turn it back on
Not sure how you'd do it. The AI are owned by the server, not clients, so the engine won't let you do much with them. I think it's just a shortcoming inherent to network play you'll have to deal with unless you have the team to do some major engine overhauling. Take it for what you paid for it as I haven't done this before.
Okay so the years-old example demonstrating smooth movement interpolation using Cubic Hermite Interpolation without physics is working... smoothly. However the issues there are that the position, rotation, and velocities map roughly. The end state is 99% of the time what's present on the server, but delta movements can get exaggerated or outlandish. This is all fun and games, but the game I'll be working on:
- Requires Chaos Physics
- Will use EOS for matchmaking (dealing with in the next week)
- Requires precise replication of the transform at any given point (airplane dogfighting, ships and naval warfare)
How will I tackle these specific challenges? Are there any resources I can grok before descending into this task?
For reference, here is KrazyKarts: https://gitlab.com/Vivraan/krazykarts
From Sam Patuzzi's Udemy Course: https://www.udemy.com/unrealmultiplayer/
I don't believe there's any shortcomings here, since networked FPS was the primary function UnrealNetwork was designed to deal with (Unreal Tournament et al). I guess we're looking at a situation where we replicate physics in a buffered fashion -- record moves and play the impacts in a sensible fashion. Granted, no two clients will see the same thing, but this may ensure a smooth experience on all clients.
i figured it out. actually pretty simple. you have to apply root motion instead. root motion takes precedence over replicated motion.
With max ping at 500ms and packet loss at 10%, the game always disconnects, causing the clients to load into their own levels as ROLE_Authority.
LogNetSerialization: Error: FBitWriter overflowed! (WriteLen: -1, Remaining: 7625, Max: 7625)
LogNet: Warning: Closing connection. Can't send function 'ServerSendMove' on 'GoKartMovementReplicator /Game/VehicleCPP/Maps/UEDPIE_2_VehicleExampleMap.VehicleExampleMap:PersistentLevel.BP_GoKart_C_0.MovementReplicator': Reliable buffer overflow. FieldCache->FieldNetIndex: 3 Max 4. Ch MaxPacket: 1024.
LogNet: UNetConnection::Close: [UNetConnection] RemoteAddr: 127.0.0.1:17777, Name: IpConnection_61, Driver: GameNetDriver IpNetDriver_47, IsServer: NO, PC: PlayerController_1, Owner: PlayerController_1, UniqueId: NULL:NARVRUL-F734C23F4F553B96089526802AC1D373, Channels: 11, Time: 2022.06.19-18.26.31
LogNet: UChannel::Close: Sending CloseBunch. ChIndex == 0. Name: [UChannel] ChIndex: 0, Closing: 0 [UNetConnection] RemoteAddr: 127.0.0.1:17777, Name: IpConnection_61, Driver: GameNetDriver IpNetDriver_47, IsServer: NO, PC: PlayerController_1, Owner: PlayerController_1, UniqueId: NULL:NARVRUL-F734C23F4F553B96089526802AC1D373
LogNet: Error: UEngine::BroadcastNetworkFailure: FailureType = ConnectionLost, ErrorString = Your connection to the host has been lost., Driver = GameNetDriver IpNetDriver_47
LogNet: Warning: Network Failure: GameNetDriver[ConnectionLost]: Your connection to the host has been lost.
LogNet: NetworkFailure: ConnectionLost, Error: 'Your connection to the host has been lost.'
LogNet: Browse: /Game/VehicleCPP/Maps/VehicleExampleMap?closed
Is there any way to prevent this from happening? I'm just testing extreme cases.
500 ping is more than extreme, it's entirely unplayable so I'm not sure why you'd even care.
10% packet loss is also kind of crazy
Little late response, but you can absolutely use delegates, you just need a way to fire them on clients. Usually I fire delegates in OnReps of variables if the UI needs those variables, and on the server wherever I set the variables I just manually call the OnRep (just make sure you either guard stuff in the OnRep that shouldn't run on the server, or just manually fire the delegate on the server instead of calling the OnRep)
Awesome, thanks for sharing. I'll look into OnReps a bit more. Thanks!
some other keywords would be RepNotify (thats the blueprint version) and the uproperty specifier for it is ReplicatedUsing
Any tips for having two pawns for a player? I'm using Lyra and at first attempt it feels like there's no support for quickly switching between two pawns.
At least, the mapped inputs don't carry over. Its like Lyra binds inputs in the pawn.
Any pointers, cuz I'm pretty confused where to start. Atm when I switch the 2nd pawn none of my Gameplay Abilities can activate anymore
it should run SetupPlayerInputComponent after possessing i think
you comfortable with c++ debugging @marsh gate ?
Novice
That makes sense, I'll look into SetupPlayerInputComponent
can you locate the code where it binds gameplay ability inputs?
Yes
also, i assume first pawn is not destroyed, so does it activate its abilities after possessing 2nd one?
I don't know yet as I am having a hard time even repossessing the first pawn, because it can only be done server side, and I'd like to do it via GA and not a RPC
dedicated server setup?
PIE runs as client, so yes. I haven't build a dedicated server yet. But plan to
your PIE option
Yes I checked dedicated server
net mode when you drop down next to play button
well, for start you can switch to listen server
its a host and a client in one
figure out what you want to do without having to fight the network
then swap back to dedicated and implement it
interesting workflow
Where would be the best place for a client to connect to dedicated server? Currently I have it in MyPlayerController::Begin() , but seems like that causes the map to be recursively opened over and over
you should really go to pinned messages and read cedric's network compendium you'll find a link to there a couple of times
since this demonstrates that you don't know the very basics yet @young spoke
i read it...
your problem here is that your controller at the start
opens a map, which spawns new instance of that same controller class which calls BeginPlay, which opens the same map...
etc
yeah, so how do you tell a client to connect to a server?
you should really have some UI involved, so you need to click to connect
some automatic connecting can be done
i'm just going through the basics, I don't need a UI. i'm just trying to understand the overall workflow of where this should take place
but not if your MainMenu of whatever it is has the same class as your controller on the server map
and it is generally a good idea to have separate PlayerController classes for MainMenu, Lobby and Game
makes things... less convoluted in the long run
a very hacky fix would be to put that travel command inside if (GetNetMode() == NM_Standalone) block
then it would not trigger after the first connection, as your NetMode would be NM_Client then
MainMenu, Lobby and Game would be different maps in this case? with their own PlayerController, i.e. MainMenuPlayerController ?
yes, and GameMode GameState,, HUD, PlayerState and whatever else makes sense
so MainMenu PC would open Lobby PC, Lobby PC would open Game PC and then no recursion
no MainMenu PC would open Lobby Map, which has a LobbyGameMode, that says PC class is LobbyPC, which would not have the code to connect in BeginPlay
Ok, i see
in the interim it seems like i need another check if(getNetMode() == ENetMode::NM_Client and is not already connected to server) to get my single PC example working
when you start you will be NM_Standalone
if you're either server or client, that won't be the case
cool, ill try that
are there any example repos out there to help get familiar with push model replication?
yessir. I see notes about checking out APlayerState for a real-world example but wondering if there's any repos out there really making full use of it throughout
there is very little to it
you create FDoRepLifetimeParams
you do something like
void APowerConsumer::GetLifetimeReplicatedProps(TArray<FLifetimeProperty>& OutLifetimeProps) const
{
Super::GetLifetimeReplicatedProps(OutLifetimeProps);
FDoRepLifetimeParams Params;
Params.bIsPushBased = true;
DOREPLIFETIME_WITH_PARAMS_FAST(APowerConsumer, bPermaDisabled, Params);
DOREPLIFETIME_WITH_PARAMS_FAST(APowerConsumer, bHasSectorPower, Params);
DOREPLIFETIME_WITH_PARAMS_FAST(APowerConsumer, bOverriddenNetworkManager, Params);
DOREPLIFETIME_WITH_PARAMS_FAST(APowerConsumer, bLinkedObjectDestroyed, Params);
DOREPLIFETIME_WITH_PARAMS_FAST(APowerConsumer, bIsActivated, Params);
}```
then mark property dirty when its changed
and thats pretty much it
no advanced scenarios that aren't documents in the comments?
it can take replication conditions as well
and you can change the params then DOREPLIFETIME other properties
note that gains are fairly minimal
don't expect more then 10% shaved off of NetBroadcastTick
Appreciate the insight 🙂
should a projectile be replicated? i'm currently replicating a projectile because it's easier to get it to appear on everyone's screen but it feels laggy af
hitscan never, physical projectile probably better to spawn it on each machine locally
there's a couple approaches, you can replicate a projectile with projectile movement component but it will have a delay for the person firing it. You can set up a system for predicting a fake projectile on the shooting client and then replace it (or not) with a server-spawned replicated projectile, and do some compensation to catch the server projectile up to where the firing client's projectile would be, or you can just straight up spawn local projectiles on each machine
hitscan projectiles shouldn't be actors at all
also what zlo said, usually by projectile you are talking about "not hitscan"
yeah it's not hitscan. it's a fireball
takes some time to hit target
however, what you mean by hitscan? like, i determine the target ahead of time?
do a trace beforehand?
you can replicate a starting point and the trajectory
instead of replicating an entire actor
hitscan just means instant hit, there's no actual travel time, you just line trace and instantly generate a hit
then spawn them locally
yeah right but i'm wondering how that would be applicable to a projectile
this is very interesting
or, you can increase the actors net priority, recommend around 2,7
shooting client RPCs origin and direction to the server, server multicasts that to all other clients, who spawn a fireball projectile at the origin facing that direction, then u let each machine handle its own fireball
obviously only the server's can actually deal damage or whatever
the others are just visual
now that i'm here and there's some ppl around, i'm applying root motion to an actor and dude it's stuttering like crazy for the predicted one (but all of the other clients are fine)
i think best network performance, especially if there are many of those flying around is single high priority, high frequency actor replicating (class, start point, trajectory)
like, the player that initiates the root motion on the simulated proxy sees a bunch of stutters but the other clients don't
and spawning the projectiles locally when it get a new entry
i'll make a note of this in the tracking system and tackle it in the future
i love that every conversation i've ever seen with Zlo in it ends up at fastarrays 🙂
they are pretty cool tho
it is better, you don't need to diff the tarray which is annoying
especially since those projectiles don't live long and get destroyed as well
oh i agree, i just remember asking a really similar question a few months ago and you giving a similar answer
it is the single best network tool in unreal engine 😄
@winged badger do you have experience with root motion and replication? i'm doing some network emulation and it looks horrrrrrrible
not sure how it would look in real world but i can't imagine it'd look any better
use gameplay tasks
very little experience, as i didn't code that part myself, but i know they work well
so there's a gameplay task for this but it only applies to the current mesh, not another mesh
i have experience with gameplay tasks, i'll take a shot at it
we have predicted abilities like jetpack jump that uses a root motion animation and a float curve for z offset
and its smooth
when my character lands a hit, i want the enemies to move back slightly. they do, but it's laggy
i'll try a gameplay task
you using GAS?
can you use them outside of GAS? i vaguely remember trying to set root motion tasks up with my own ability system and it was kind of a pain
you can we don't use GAS but we use GameplayTasks
yea i'm using GAS
as far as i understand it best way is to give the enemies KnockedBackAbility
hey, is it possible for a client to send a request to a dedicated to change map?
before they connect in, basically the standalone has a map selection, and a server selection, it then sends a command to the dedicated to switch to the map they selected and connect to it
You can talk to a server you haven't connected to yet using OnlineBeacons
thanks, So I am guessing I need to call the beacon while the server is running to run code to switch levels?
each level needs its own beacon actor, so I should spawn them via gamemode?
I haven't played with them just yet so I can't clearly tell. Though my inner inclination says the GameMode class would be a good candidate
Or prolly whatever does the action of switching the levels, should at some point spawn the beacon actor
ok, Ill look into it thanks
Hey guys, got a question for ya - what's the difference between SetClientTravel and OpenLevel when connecting to a server? I know either one is meant to work when passing in an IP, but the latter has an options parameter. That parameter is what I need for authentication with the third party thing we're using, to get the session key over to the server when the connection occurs.
Is there a way to pass in options with SetClientTravel? Anyway, I just don't know much about this so info would be great.
You can tell what's the difference if you look at the source code:
void UGameplayStatics::OpenLevel(const UObject* WorldContextObject, FName LevelName, bool bAbsolute, FString Options)
{
UWorld* World = GEngine->GetWorldFromContextObject(WorldContextObject, EGetWorldErrorMode::LogAndReturnNull);
if (World == nullptr)
{
return;
}
const ETravelType TravelType = (bAbsolute ? TRAVEL_Absolute : TRAVEL_Relative);
FWorldContext &WorldContext = GEngine->GetWorldContextFromWorldChecked(World);
FString Cmd = LevelName.ToString();
if (Options.Len() > 0)
{
Cmd += FString(TEXT("?")) + Options;
}
FURL TestURL(&WorldContext.LastURL, *Cmd, TravelType);
if (TestURL.IsLocalInternal())
{
// make sure the file exists if we are opening a local file
if (!GEngine->MakeSureMapNameIsValid(TestURL.Map))
{
UE_LOG(LogLevel, Warning, TEXT("WARNING: The map '%s' does not exist."), *TestURL.Map);
}
}
GEngine->SetClientTravel( World, *Cmd, TravelType );
}
As you see OpenLevel calls SetClientTravel and appends the Options string param to Cmd param in SetClientTravel.
OpenLevel is BP oriented with that Options param and the sanity checks, but essentially you can make your own CustomOpenLevel and do whatever you find suitable before calling SetClientTravel
Massive thanks, I really ought to make a habit out of checking source before asking.
I'm having trouble possessing my pawns in the network mode of the editor. How can I possess my pawns?
any help with this will be appreciated dearly!
Except EOS what are other options for voice chat on dedicated server?
Especially for multiplayer
Guess there's Steam
There are a number of options, though I usually advice to stay away from voice
I've been facing lot of issues with voice chat lately
No shit
So here's my 2 cents: a lot of players never want any voice chat with strangers if they can avoid it, and a lot of those who want voice what will rather arrange it with their friends on Discord
Having public server-wide voice chat is a great way to get everyone's game wasted by one 13y old edgelord
So you have technical options here that may work, but consider the impact on players
Alright so I've finally opened the sample I need to work on.
Here, these two airplanes can fly as usual, and they get replicated as one would expect, quite normally. It's just that there's a lot of rubber-banding and nonsense physical interactions that are going through.
I have a sample for replicating smoothly without using any physics, which utilises cubic interpolation. What are the steps in which I'll need to solve these current replication issues? The path seems to be to write a bunch of components which help replicate and commit movement (separately). There must be a buffer of movements that has to pass from the autonomous proxy to the server, but I don't know how to access that for Chaos Physics (writing one for vanilla Newtonian movement is fairly easy). Any light on this will be crucial for my sanity and continued efforts!
That said, Discord Rich Presence (if it still exists?) looks cool.
any help will be appreciated!
how do i check if code is being executed on server in c++?
HasAuthority(), usually, though that also means "client on unreplicated actor"
so i have a server RPC that runs
and is on server
i checked
but the RPC is supposed to create a line trace and execute a function on hit
and it just
doesnt
Probably that object isn't player owned and thus cannot run server rpc
Not an UCLASS obviously means it has no network support of any kind
Also that it's not UObject so I doubt it really isn't
What's the parent class?
FGCObject
Zero network support then
shit
Just use an actor component
Hey! Any idea why an actor replicated from the server would sometimes fail to spawn on clients? Reconnecting solves it.
[2022.06.20-11.57.33:500][979]LogNetPackageMap: Warning: InternalLoadObject: Unable to resolve object. FullNetGUIDPath: [421]NOT_IN_CACHE
[2022.06.20-11.57.33:500][979]LogNetPackageMap: Error: UPackageMapClient::SerializeNewActor. Unresolved Archetype GUID. Guid not registered! NetGUID: 421.
[2022.06.20-11.57.33:500][979]LogNetPackageMap: Error: UPackageMapClient::SerializeNewActor Unable to read Archetype for NetGUID 2474 / 421
It feels like if you connect too fast, it just doesn't spawn
So say you have a fire weapon function, and at the end of it you spawn a bullet decal or blood particles/whatever. Currently I am calling this on the owning-client to get the instant effect, and then doing a multicast to make it appear on the other clients. The issue is, this makes it run twice on the owning client. One solution is not to run it on the client, but then you get lag on the decal/effects, another obvious one would be only to send it to all other clients, but I don't believe there is a way to "skip" a specific client on the multicast. Is there a better way to approach this?
Just check if the weapon is locally controlled in the multicast
The weapon is an actor not a pawn
Do you mean just check the owner?
Oh right, yeah check the owner I suppose ^-^
Okay so casting the owner to a pawn/character, checking if locally controlled, and also checking the role that it isn't the server seems to work 😄
Thanks for the suggestion
Np!
Oh so actor component and then i just add it to the characters
that makes sense
in more ways than one actually how havent i thought of that
Good question
quick question: i have a nonuclass class that's just a line trace for hitscan bullets, do i need that to be a UCLASS too or?
No idea what a nonuclass is
Generally speaking, you want to use UObject for long-term objects that need GC support, networking, config, editor or Blueprint support
You can use structs, USTRUCT or not for simple data objects
For objects that have zero multiplayer or UObject stuff you can use raw C++ classes
sorry meant a class that's not UCLASS
anyways i have this Multicast
it notifies every client that someone got hit with a bullet
i call it from the server
and then im told
if the multicast function is static, "static functions cant be replicated" but if its not static it finds an "illegal call of non-static member function"
so im kinda stuck now
nvm
hi, im new to unreal and im trying with a multiplayer fps, until now i have fixed every issue i was having unless one wich is that when the server shots the client sees the projectile but when the client shots the server cant see the projectail, im using a simple unreal engine 5 first eprson template and i have searched for a lot of tutorials but all of them are for ue4
@glossy pelican Most tutorials for UE4 are applicable to UE5.
Read the compendium:
https://cedric-neukirchen.net/
If you don't want to read it watch this:
https://www.youtube.com/watch?v=JOJP0CvpB8w
An overview of the essential concepts for writing multiplayer game code in Unreal, in under 25
minutes or your money back.
Sample project: https://github.com/awforsythe/Repsi/
Patreon: https://patreon.com/alexforsythe
Twitter: https://twitter.com/alexforsythe
00:00 - Introduction
01:24 - Net Mode
03:33 - Replication System Basics
05:13 - Acto...
still need help!
Is there any way I can access a replicated by default player pitch variable without the control rotation using the player's pitch? I don't want the whole player to rotate so I need that off, but outside of that I can't find a way to get the player's pitch on other clients. Will I need to manually replicate this?
I've been told this is expensive on the network
I have tried GetActorEyesViewpoint, and GetControlRotation
One value that works is GetPlayerViewPoint but this is part of the player controller and thus only exists on the owning client and the server
@worn wagonGetBaseAimRotation?
The whole ControlRotation GetBaseAimRotation Aim yaw garbage BS is a clusterfuck.
Must be old cruft from back in the early days.
You bad motherfucker, thank you so much
Must have missed this function
The question mark is because I wasn't even sure it was what you're looking for, I just know it's a thing that exists.
My game only has yaw aim lol
Worked like a charm 😄
Do most people try to use it or just replicate some rotator in pawns on their own?
OOOOOOOk back with this issue again
User presses lmb -> The game does a server RPC that spawns* a hitscan bullet and it checks for hits, when it gets a hit it executes the OnHit function -> The server then executes a client RPC back making all the client stuff happen like playing an animation and sound
now following breakpoints this is what's supposed to happen
and if im testing with a listen server, the server user can fire and this is exactly what will happen
everything will work like a charm
but if its a client the issue is with *
it doesnt spawn the bullet
at all
the code runs
it just doesnt happen
the bullet class is an AActor that spawns in the world and does a line trace, then deletes itself
@fallow shadowShow your code
Also why not just have the gun do the trace, why spawn an actor at all
What actor are these RPCs going through?
The character you are playing as
Show your code
Because i want to reuse the bullet in different weapons so its easier to have a class to just spawn than to copy paste the line trace to every weapon
also I will later, i cant right now, but what part of the code do you need?
I'd just have a gun/hitscan component but it's whatever.
Assuming everything is set up correct, want to make sure the bullet being destroyed isn't your problem.
I just use a Gun actor and then do firing logic there.
Subclass from it if you want different guns, or use data assets
This, or a GunComponent that you can slap on anything to do the firing.
good point
i just want to make sure this works now, ill polish and optimize later
So does the shot actor tell the gun or character to call the RPC?
So it's
Input -> RPC -> Spawn shot actor -> shot actor tells character -> rpc -> effects?
Its more like
Input -> RPC (server) -> Shoot bullet and if hit registered do something -> RPC (client) -> effects
the client RPC is also called from the character
in the code the method that calls the client rpc is literally physically right after the line that shoots the gun
so it has to shoot the gun first before doing the client RPC
How does the hit get from the shot actor that you're spawning temporarily to the character?
If you're doing ANY rpcs within the shot actor you've painted yourself into a corner.
[2022.06.20-16.30.18:749][145]LogNet: NotifyAcceptingConnection accepted from: 86.20.33.198:51087
[2022.06.20-16.30.18:749][145]LogHandshake: SendConnectChallenge. Timestamp: 1483.425649, Cookie: 202199119232093004111184148088164050088252049082247037007247
[2022.06.20-16.30.18:814][147]LogNet: NotifyAcceptingConnection accepted from: 86.20.33.198:51087
[2022.06.20-16.30.18:815][147]LogHandshake: SendChallengeAck. InCookie: 202199119232093004111184148088164050088252049082247037007247
[2022.06.20-16.30.18:819][147]LogNet: Server accepting post-challenge connection from: 86.20.33.198:51087
[2022.06.20-16.30.18:820][147]PacketHandlerLog: Loaded PacketHandler component: Engine.EngineHandlerComponentFactory (StatelessConnectHandlerComponent)
[2022.06.20-16.30.18:820][147]LogNet: NotifyAcceptedConnection: Name: 0_AA_EntryMap, TimeStamp: 06/20/22 16:30:18, [UNetConnection] RemoteAddr: 86.20.33.198:51087, Name: IpConnection_2147482510, Driver: GameNetDriver IpNetDriver_2147482550, IsServer: YES, PC: NULL, Owner: NULL, UniqueId: INVALID
[2022.06.20-16.30.18:821][147]LogNet: AddClientConnection: Added client connection: [UNetConnection] RemoteAddr: 86.20.33.198:51087, Name: IpConnection_2147482510, Driver: GameNetDriver IpNetDriver_2147482550, IsServer: YES, PC: NULL, Owner: NULL, UniqueId: INVALID
[2022.06.20-16.30.18:880][149]LogNet: NotifyAcceptingChannel Control 0 server World /Game/Maps/0_AA_EntryMap.0_AA_EntryMap: Accepted
[2022.06.20-16.30.18:880][149]LogNet: Remote platform little endian=1
[2022.06.20-16.30.18:884][149]LogNet: This platform little endian=1
[2022.06.20-16.30.18:946][151]LogNet: UChannel::ReceivedSequencedBunch: Bunch.bClose == true. ChIndex == 0. Calling ConditionalCleanUp.
[2022.06.20-16.30.18:946][151]LogNet: UChannel::CleanUp: ChIndex == 0. Closing connection. [UChannel] ChIndex: 0, Closing: 0 [UNetConnection] RemoteAddr: 86.20.33.198:51087, Name: IpConnection_2147482510, Driver: GameNetDriver IpNetDriver_2147482550, IsServer: YES, PC: NULL, Owner: NULL, UniqueId: INVALID
[2022.06.20-16.30.18:950][151]LogNet: UNetConnection::Close: [UNetConnection] RemoteAddr: 86.20.33.198:51087, Name: IpConnection_2147482510, Driver: GameNetDriver IpNetDriver_2147482550, IsServer: YES, PC: NULL, Owner: NULL, UniqueId: INVALID, Channels: 2, Time: 2022.06.20-16.30.18
[2022.06.20-16.30.18:951][151]LogNet: UChannel::Close: Sending CloseBunch. ChIndex == 0. Name: [UChannel] ChIndex: 0, Closing: 0 [UNetConnection] RemoteAddr: 86.20.33.198:51087, Name: IpConnection_2147482510, Driver: GameNetDriver IpNetDriver_2147482550, IsServer: YES, PC: NULL, Owner: NULL, UniqueId: INVALID
[2022.06.20-16.30.18:979][152]LogNet: UNetConnection::PendingConnectionLost. [UNetConnection] RemoteAddr: 86.20.33.198:51087, Name: IpConnection_2147482510, Driver: GameNetDriver IpNetDriver_2147482550, IsServer: YES, PC: NULL, Owner: NULL, UniqueId: INVALID bPendingDestroy=0
trying to connect to a beacon on a dedicated server (works on local)
any idea why it automatically closes?
No no the RPC is always called by the character
Holler when we can see some code, gotta see this to really be able to reason about it.
