#multiplayer
1 messages · Page 606 of 1
sounds like you're joining the wrong session then
just grabs the first one. is there a way to filter?
Not a whole lot involved. Would I have to do a browser?
either that or take the results and filter them down yourself somehow
alright. new project for tomorrow thanks
Is this proper way of doing this? https://gyazo.com/8b212a855073a1c69719da6ca2f0e2c0
Or Do I have to replicate the Idle Sound variable as well.
- Did you try it? Why ask if something works when you have the ability to test it for yourself and already implemented it?
- You seem to be triggering this from an animnotify. I assume this animation is playing on all clients - if it is, there's no need to replicate the sound as the notify will execute on all clients when they hit that point in the animation. Don't check if you're on the server (you should be using an authority check in most cases anyway), just play the sound "locally" from the notify.
These are in my animBP os it has no switchwith auth node.
Hey Guys, I'd appreciate some multiplayer expert advice as I'm having some trouble with multiplayer implemntation and would really appreciate some help.
I'm using the steam multiplayer configuration for online multiplayer, both characters spawn just fine and work normally until they interact with each other via hit (or overlap, I'm not sure), basically, when they touch each other the client stops responding to input (any type of input, movement, and other keys) while the server continues to work just fine, any ideas? Also, the client always sees the server perfectly, but the server doesn't see the client moving at all, they are on the same network and the behavior persists when switching PCs. Would really really appreciate some help guys, even pointing me in the right direction of what to look for!
Has anyone used Gauntlet for multiplayer testing?
Is it supported in any way (e.g. spawn server, spawn 2x client, do test involving 2 players)
Is there any way in C++ to determine who is calling a server RPC?
It'll be the result of GetOwner()
Since only the owner of an actor can call a Server RPC
What about if it's on an ownerless object e.g. a chest? Or is it expected to structure code so that everything goes thru local player e.g. MyCharacter->InteractWith(AActor* Other)
If it's on an ownerless object then the server RPC won't ever be called, it'll be ignored
You can't call a Server RPC unless you own it, server will just ignore it even if the client sends it
To interact with objects like that, you would typically build some sort of interaction component or actor that the client owns yeah
Ok, thanks for that
How would you replicate patrol points for an AI across all clients to have all AI patrol points synced?
replicated TArray<FVector>?
Can't have those points in the controller itself of course
Would have to be in a PlayerState or something
Or the pawn (maybe, if your AI doesn't have player states)
The random location is chosen on the AI bot pawn itself using UKismetMathLibrary::RandomUnitVector() * MovingRange + GetActorLocation())
why would you replicate AI patrol points?
The problem is that each client's version of the AI moves to different places because they are chosing different points each one.
the only reason i can think of is to mark those points so client can see them
other then that, AI is server auth
and only thing that should be replicated is its movement
IK I have to rep movement, but each AI is choosing different points to move to.
if you managed to get AI to act independently on clients, you probably need to explore the concept of AIController
yeah, I mean the ideal setup is have the server running the AI logic itself. Doesn't make a huge amount of sense for clients to be doing the same
clients just rely on replicated movement then
ok,
so how would I ensure this? Like make sure hasauthority get new vector for that AI and then what?
If you're using the engines' AI system then everything already runs server-side only, since it's all done with AI controllers
(which don't replicate)
not using AIC rn.
all movement is on pawn.
itself
Bot flys to patrol point, gets near it, and then chooses another, and then flys to that new point, and repeats.
But each bot on each client is choosing different points to fly to, unsynced
So how do I ensure client AI follow the HasAuthority random vector?
Well if you're replicating movement, they already will
Because their transform information will be replicated from the server
ahhh ok, I need to move the random point selection to server side only, and then rep movement and it should work then?
controllers responsibility is to decide what the Pawn does
Pawns responsibility is to know how
logic to choose the patrol locations does not belong in the Pawn
and then you also don't need any Auth checks, since the AIControllers aren't replicated
ok so random point selection to server side only (AIC), replicate movement on the pawn, and I should be gtg?
yes
ok thanks
Someone has good resources about multiplayer? Are the pinned resources good enough? Wanna dig pretty deep before I start my next job on a multiplayer title which I only scratched before.
Blueprint or C++?
Cool in that case grab the ShooterGame template from the Launcher
It's a good learning resource
Afaik they use both but my position is for c++
Even if a bit long in the tooth at this point
C++ is essential for Multiplayer tbh. You can only get so far in BP alone
ok, thanks. I will dig into it. The ShooterGame Template has full Multiplayer support?
yeah
nice ok.
So you can pick it apart and get a general idea
if I wanna dig deeper?
There are a lot of "gotchas" in multiplayer but really you only find them by doing
ok, thanks a lot. I wanted to make a small multiplayer thing before for learning, so I guess I will fall into some pitfalls next weeks
Like ISM's don't replicate 
and neither does pawn movement out of the box, but the character movement component does replicate out of the box.
Almost nothing replicates out of the box
Anything that does usually has special support for it (i.e. characters)
does this mean that the main static mesh from which ISM is derived also doesn't replicate?
The ISM component doesn't replicate
I had to make an ISM manager on each client
There is a very good reason for that though
ISM being instanced static meshes?
It's very expensive to replicate a massive array of transforms
if i remember correctly if there are two copies of same mesh in world , then engine automatically converts other to ISM
so main static mesh should replicate, right?
if the mesh is inside the ISM no
the entire component does not replicate period
It's not really meant too
This was a big gotca! For me because my game's main feature depends ISM.
The other big gotcha was the Flying pawn does is not replicated like the character movement.
I had to implement movement rep myself.
i think for me everything multiplayer related was one gigantic gotcha :P
So what is the scope of the upcoming Network Prediction plugin? I've only seen it used for physics but the name.makea me think it's a bit more general. If you think about it, almost all network Prediction is the same, no matter if it's CMC or GAS or other.
AFAIK it's only meant for movement-related stuff
And will inter-op with GAS eventually
If you think about it though, it really makes sense that you would eventually end up with a One-Stop shop for Network prediction. After all, taking damage to your HP or getting launched are pretty much the same thing. Just a property, a context in which it exists, and an action.
Yeah but most stuff you wouldn't predict
Plus it gets messy and harder to reconcile as it starts piling up
Really you should just predict as little as you can get away with
And encourage people not to join servers with 400 ping or something stupid
I found that it's really helpful for sanity to distinguish between a predicted state and a non-predicted state
i lost my train of thought 
pretty much proves my point 😄 it gets complicated quickly
I find it best to predict player actions that need to be responsive, so long as it's all relatively self-contained
But general game state prediction just isn't worth it IMO
speaking of... ugh
multiplayer? i need to tick aggregate my physics objects
I want the server to snapshot object states at fixed time intervals, and those fixed time intervals can actually change dynamically based on the importance of the prop
so if a player is ineteracting with a prop, up the snapshot rate ETC, if its not very important lower it to 10/5/2 snapshots per second etc
And I can't really think of a nice way of doing this other than defining several tick aggregators each with its own rate:
does this seem logical? it feels far more on the practical side than on the elegant, or ideal side
so I'd have another UNetworkedPhysicsPropTickAggregator_30HZ, and then a UNetworkedPhysicsPropTickAggregator_10HZ, etc
just make one UObject
have the WorldSubsystem instantiate them
and manage them
instead of having a subsystem for every one
that also allows you to derive a BP for those TickAggregators as required
I like it! Thanks :)
is ot possible to do level streaming in multiplayer, or do you only do worldcomposition?
Setting onlyownersee sets vissibility only on server, all the clients won't change visibiliy, while calling a multicast results in a game crash; what should I do to change my Actors visibility?
@twin juniper Multicasting that should be fine(Not sure what the crash is about), but that sounds kind of like a state setting. A replicated boolean might serve you better in the end with that.
@floral crow I've found the issue in my code and why variables in BeginPlay() were not set correctly, basically I spawn that actor in the level using DeferredSpawnByClass and I didn't know that I have to call finish spawn after it too, as a result BeginPlay had this strange behavior and Owner some times was missing too(GetOwner() was returning nullptr)
Ohhh so deferred spawning it was haha Glad that you figured it out and thanks for sharing the results. I was curious
Hey ... wondering if someone could point me in the right direction. I'm working on a muliplayer game. My characters have replicated variables such as damage and score and thats all fine.
My problem is that I have some variables that I am trying to load from Saved Game and then replicate. What I find is that when spawning players from the server, they pull the SaveGame values from the server machine, and thereby replicate only the server players values.
I have no idea how to get around this 😕
I suggest using the player controller for this, on the client to first load the save file and then get the save game obj, get the values your wanna replicate then send it to the server and just have the server set it's values to what the client just sent.
Ok ... It's the one object I haven't tried... so I'll try it.
Not sure if I'm doing it all correct... but when my player host a game and join the game ... all their objects get destroyed and recreated... even player state, which seems wrong to me.
I know there's some "passing" methods for player state but I have never gotten those to work.
Nonono that's correct, when you join a game it's loading a new level in a NetDriver. So it's going through the path of loading a new level. Which first destroys the previous level and then loads in the new level(which destroys the previous actors and stuff and loads the new actors and stuff)
for some reason when I spawn a replicated actor that has a decal component on it. The decal does not appear on clients. It works perfectly for the server even if a client spawns it.
any idea why?
right so the only client side object that maintains is game instance ... is that right?
Yeah game instance is not replicated because it's technically and object not an actor
I am spawning it on the server.
Maybe try multicasting it?
Its not a variable I am setting. I am setting the decal in the component itself.
its weird
Oh wait misread it my bad, yeah so is the decal set before hand or at runtime?
Are you setting any values in the decal at runtime?
See if checking Reliable on the event causes it to be visible?
It might be network congestion
its reliable
It really seems like it should be spawning then... Might have to add some debug prints on begin play of the decal actor to make sure it's spawning on clients
If it's spawning then it might be something with render settings regarding the camera or the decal
its weird because it will appear on the server but the client does not see it
are decals just super weird or something?
So, I wonder, is there really a limitation where replicated actors are unable to do RPCs because they are not net owning objects?
So spawning an actor that does checks to see if its overlapping is not really able to do an RPCs directly
yeah its kinda mixed bag regarding that...
I find that I am able to store data on an actor pretty effectively.
then the actor can run an rpc on the server player controller
that seems to work fine
but it seems like any logic directly run on the actor gets pretty screwy really fast
So if I have a number of status effects and area of effects running at the same time. Is it better to iterate through a couple arrays located on the server player controller using an event tick to perform the logic?
And just use the actors for the status effects and area of effects as data storage essentially?
@velvet parcel I think I kinda understand what your talking about, it might be better to using the gameplay ability system for that since it handles the replication for that and it applies statuses and such automatically... but if you dont wanna go into the rabbit hole of that, you could just treat it like your first figuring out which actors to apply the status affect to, and then notify that actor from either the pawn/player controller to apply the effect visually on the clients prob via multicast. Then on the server handle the status effect management...
Its not so bad to loop on an event tick set to run once a second to manage all area of effects and status effects on the server player controller.
But this worries me about AI, will I have to do this for AI as well?
at that point I dont know enough about the game to be able to tell you
Like if AI has a threat table
to choose targets ect
It feels strange I am just now learning about this. You would think that if what I am thinking is true then what is the point of even bothering to have RPCs on an actor
I guess its really only for times when the actor is owned by a player controller
this cant be correct... hmm
Well you can have multiple actors owned by a player controller but its usually not good practice...
BUT it always depends on what your doing so
¯_(ツ)_/¯
This is for a retro multiplayer rpg that kind of behaves with MMO style logic
so if you know how those games work this is one of those
Honestly try it, see if you can performance stress test it and then continue from there..
dont stand in fires, status effects ect
Yeah
Honestly Gameplay ability system(GAS) might be perfect for that...
It even handles rollback
I mean its not super crazy I can pipe everything though the server player controller with an event tick
I guess monster AI can do this too... just have an array for all active mobs on the server and iterate them
I have two characters (multiplayer), both characters inherit from the same parent, I have a damage system and a health bar. How can I damage to player? This all happens in multiplayer (server).
Anybody can help please?
Simply run reliable server custom event RPC
then make sure the health value is replicated
all clients should see it
Correct me if I'm wrong, but weren't we able to encapsulate a map inside of a struct and we could replicate the struct which would replicate the map?
How do I sync the Patrolling of the AI Pawns so the AI Pawns patrol to the same areas across all connected clients and each client sees the same AI Pawn movement to those points?
The AI pawn simply needs to be a replicated actor. @ember osprey
I wish it were that easy. I'm using C++ btw.
I think its the same thing. Once an actor is replicated and movement is checked then it should automatically be synced up.
Each client's AIs are choosing thier own random points to patrol to.
instead of patrol to the same points across all clients.
let me check something real quick!
You might be over complicating it in your head. Telling an actor to move to a location on the nav mesh is pretty automated.
Its a Flying AI, no navmesh, give me a sec to check something in the BP
This is the BP:
That should do it where anything you tell the actor to do will be synced over the network
doesn't work though. I put 1 AI in the game and each client's AI goes in different directions.
are you using random variables?
I'm getting a random point at runtime
like get random int?
That can be super tricky because it will often do it more than once if you are not careful
I'm replicating a vector.
UPROPERTY(Replicated, Category = Plane, EditAnywhere, BlueprintReadWrite)
FVector TargetLocation;```
depending on how you do the get random float it can mean each client gets completly different results
can I force the clients to listen to the server only FVector?
if you make sure that the server is the only one doing the random variable and then making sure its properly replicated to the clients you should be good
but depending on how you do it that can result in each client rolling its own random value
You have to be extra careful when working with random variables.
Is there a source or reference that discusses dealing with random variables?
I am just going off of personal experience with them.
Also, how would I even do the server only random variable and then replicate on all the clients?
I usually am very careful to assign the random variable to a proper variable
in CPP not sure but in blueprints I just run a server reliable RPC
From there you can multicast
So put a Vector on the server, and then update that vector and then multicast the vector?
sounds good
How will the server know which vector belongs to who?
That gets into more about how you do it. maybe use an array. at this point my advice is probably not useful
how do you multcast to every client except the one who initiated the RPC?
I guess it wouldn't matter tho?
Wont each client want its own vector?
yes
So pawn movement is not replicated correct?
For example, my AI pawn movement will not replicate unless I manually do it right?
Hey I noticed you in the Valko Games Studio server.
I'm pretty cool with Founder Zak.
I'm actually in the game they just published early access to.
Markiplier roasted me in his lets play video
yeah he laughed at my Game Developer Comedy thing.
A poster of my YouTube channel is in the game, and its me on the Poster. lol
Yeah thats pretty neat, small world
it is.
Hopefully I am helpful on this. There are a dozen or so ways you could do patrolling AI. In my current project I just used behavior tree
Yeah, I 've done it in the past just not multiplayer, and its flying AI so there is no character movement component or navmesh stuff.
That definitely makes it harder
I'm honestly thinking about dropping bots for multiplayer and just make it a local thing for now.
its eating up too much of my time.
@velvet parcel Do you know Zak?
He is the founder of this:
Dooly is the one who got me inot the discord
Do you need to port forward to set up a dedicated server?
And if yes is there another way to test servers because there is a problem that's not letting me port forward because Xfinity is awful.
for someone to access the server outside your network, yes
port forwarding setup needs to be done on your router
But for setting up a server and testing, will it work?
if you're only testing with computers on your local network, yes
😮 I just noticed that in 4.26, they expanded the CMC to allow custom move packets: https://docs.unrealengine.com/en-US/API/Runtime/Engine/GameFramework/FCharacterNetworkMoveData/index.html
Client to Server movement data.
it's not in the release notes for some reason, as far as I can tell
anyone taken advantage of it yet? I'm thinking about updating to 4.26 right now just for that
Hi Everyone, trying again since i didn't get a response yesterday 🙂 I'm really new with multiplayer so i'd really appreciate the push in the right direction.
I'm using the steam multiplayer configuration for online multiplayer (blueprints), both characters spawn just fine and work normally until they interact with each other via hit (or overlap, I'm not sure), basically, when they touch each other the client stops responding to input (any type of input, movement, and other keys) while the server continues to work just fine, any ideas? Also, the client always sees the server perfectly, but the server doesn't see the client moving at all, they are on the same network and the behavior persists when switching PCs. Would really really appreciate some help guys, even pointing me in the right direction of what to look for.
@vestal ferry lookup ue4 network compendium by Cedric Neukirchen. It helped me get started with multiplayer
@vestal ferry do the logs have any useful information in?
General (and very open) question - I'm currently working on an online co-op 2 player game. I have set up most of the mechanics on the characters, including an objective (quest/task) system & inventory system (each on their own actor component). However, I've started to wonder whether or not i should just move both the objective component & inventory component over to the Player State instead - as that is natively replicated. Anyone have opinions on whether or not this sounds like reasonable thing to do?
Really appreciate the answer!! I don't have any but i can extract if you point me to what might help!
Thanks a lot, is it relevant to blueprints?
Have you even looked at them? There's often a very obvious problem listed. Do you know where the logs are kept?
<ProjectDir>/Saved/Logs/<ProjectName>.log
the fact it's Steam should be irrelevant - does the bug happen when you try Play In Editor with 2 clients?
In standalone, not through the editor, i have i host and 1 client from a different pc
I have not looked in the logs as i'm not quite sure where to look and what exactly to look for, quite new at the multiplayer stuff
I have ran into a problem and I am not sure what is the "proper" solution. I would like to replace ActorA with ActorB seamlessly (on the same tick).
On server, I can call
ActorA->Destroy() SpawnActor(ActorB)
But that does not guarantee that it would happen on the same tick on all clients.
Why does it need to happen in the same tick?
Something as heavy as creating an entire actor will definitely never happen on the same tick
It has the same mesh, but ActorA has ton of optimisations (when actor is far) and ActorB has more features (when actor is close).
If it does not happen on the same tick, the actor would disappear for a moment and then reappear
So when Player gets close to an actor, I would like to seamlessly replace it
Sounds like a strange setup. What if the player wobbled back and forth at the threshold?
Actors are shared for all players on the server so it will have to be the heavy variant
Optimize at the actor level instead
Disable componenents, etc
All of that stuff can happen locally only, per player, without networking
@exotic jay There is a cooldown and few other control mechanisms
Is it possible to bundle a pointer to old actor and access it on Begin Play when new actor is spawned?
It probably just doesn't make sense to do what you're doing
Why not try to keep one single actor if you are trying to optimize ? Spawning is very expensive
And slow, and network intensive
What's an example behavior that you're trying to hide by swapping actors
I have simplified the scenario for demonstration purposes. The actual mechanic is cutting down trees in multiplayer game. The optimised actor I talked about is InstancedFolleageActor. If player interacts with the tree, I remove it from the instanced meshes and spawn it as separate actor, that can be damaged, change mesh or whatever.
I need the removal of the instanced mesh to happen on the same tick when the new tree is spawned.
I hope this scenario makes more sense
This can't really work if either of these actors are replicated, though
Since replication takes a random amount of time to recreate or destroy actors on clients
Why not keep all actors available at all times, and disable one of them ?
That can happen locally
I have it working by having Tree actor, be replicated and instanced meshes be clientside with synch calls to server to prevent desynch.
This is quite a complex scenario for many subtle reasons. After many variants this is roughly what I do:
When foliage is hit, server spawns replicated Actor to replace the instance.
When this instance is replicated onto clients, it triggers the foliage component to hide this instance (scale=0)
this way only the one Actor needs replicating. I also use this actor to handle save/load of foliage state, respawning and health, etc
@silent valley Thank you for confirming it, that is almost exactly the setup I have atm, but it felt a bit dirty
When the actor is destroyed, show the foliage instance again
@silent valley How would you "bundle" the information what instance to scale to 0 upon replication?
Does anyone know how I can get playfab into my 4.26 project?
👍 it took me a long time to get this right, especially with streaming worlds involved and actor relevance issues.
Actually I store the original transform for each instance in the derived UFoliageInstancedStaticMeshComponent.
Loop through each instance and cache it in ::InitializeComponent()
Yeah that should work
// cache the original transforms
int32 n = GetInstanceCount();
Transforms.SetNum(n);
for (int32_t i = 0; i < n; ++i)
{
verify(GetInstanceTransform(i, Transforms[i], true));
}
if you are using streaming worlds there's some other fun stuff to worry about at some point 😉
Anyone know where I can learn PlayFab? I can't find any documentation or tutorials to implement in C++.
The PlayFab doc I guess
They have none specifically for UE4. Only for Unity.
Why are you using it in the first place ?
And they do have an UE4 doc ! https://docs.microsoft.com/en-us/gaming/playfab/sdks/unreal/quickstart
Yeah I saw the quick start. I was looking more for a deep dive into implementing the other features. It's for potential contract work. Connecting a game to PlayFab and having the game communicate with servers for things like player login and so on.
The quick start tells you the Unreal specific stuff
The general Playfab doc will tell you the non-UE specific stuff
Ok I'll look at it again. Thanks
hey just a quick question about steam sdk, everything working fine, invite friends via ingame invite and accept the invite works, but the buttons in "steamoverlay" for join game & invite friend dont appears.. only invite to watch
using my own steam app id... and if i send a invite via ingame code its works
any ideas?
Having some trouble with my game. If I run it as a listen server, with 2 players. One of the player cannot move once the other one has connected. If I start moving, his position and view gets reset, and I can now only interact with the connected player.
Pretty much the same thing happens when net mode is set to client. Except player 1's view is stuck at 0, 0, 0 right away
Also an additional problem but I'll get to that once I fix this
Hey all, does anyone here have experience with UE4 + Amazon Gamelift to host dedicated servers on AWS? I seems to have hit a snag with using multiple servers across different ports on the same instance. Has anyone worked with similar before?
my client can't see server montages
but server can see client montages
how to fix this issue
i'm running first event on server, and then multicast and then montage play
How can I show/hide weapons correctly based on player role(client/listenserver) if I use first person and third person mesh?
@steel fox you can use visible for owner, however in some unreal version its bugy, so you stick with generaly visiblity in some cases
Yeah, I've tried with SetOnlyOwnerSee and SetOwnerNoSee but they're not working as I'd expect in a server rpc
So, should I set them through a multicast?
yeah you can do that, or you could use a replicated boolean, for things what swaps a lot
like weapon swap
and make a rep notify with a function to handle that
@wheat magnet do you have a screenshot?, and can other client the client montages?
see*
So, my camera's pitch is not being replicated for some reason, even though I've set it to replicate
No clue what's happening here
Clients can see the host look up and down. but the host cannot see the clients look up and down
And also clients can't shoot up or down either
Hey guys, so i've been wondering how to make sprint multiplayer replicated with using the Kubold's Movement animset, i use root motion animations but with curves, so it should be replicated, but don't know how can i show the animations of the sprinting 😦
@woeful cove do you replicate the pitch variable in the actor, and read the same variable in the animation blueprint?
I don't have any animations in at the moment
I'm just expecting to see a weapon mesh rotating
you need a anim blendspace with atleast lookup, lookdown and look forward pose
and drive that with your replicated pitch value
or you can hock up a event tick in the actor for fast testing purpose if you dont have a animation blueprint yet
but you have to read the replicated variable and do something with it
If I may have one more question. Is it possible to ensure variable is replicated before Destroy is called?
In this code, clients check during destroy process if bRespawnInstance is true or false, but the variable never gets replicated because Destroy clears the "to send" buffer (as far as I understand it)
i think force net update should do the trick? @split siren, you should stop your running logic.. replicate stuff and think what you want.. and after 5 second or something you can destroy it saftly
multicast with visiblity and collision changes should do the trick
Thanks! I will give it a try @floral tulip
@floral tulip Delaying the destruction by 3 seconds works well, though it feels like a hacky solution.
Thanks for the help
hi guys are there any changes happend with Steam Advanced System Plugin ?
i've installed it in 4.24.3 and its wont work ?
The Plugins Enabled but its not Showing the Overlay or anything
The steam overlay does not require a plugin (or the game to support it in any way).
It only appears if you launch from steam.
@split siren Just curious. How come your client needs to know that it's being respawned?
on Editor you have to use the Advanced Steam Session
Again, the steam overlay only works when you launch from steam itself. And you don't need a plugin to do that.
I don't know that the overlay would work in-editor anyway, and I'm not sure why you'd want it to.
The Steam Overlay Works once you install the Plugin if you start the game in Stand-alone Version so you can test if the project integrated successfully with the Steam
When You Press Shift + Tab
@kindred widget Sure, if player interacts with Tree Foliage instance, I remove the instance and spawn a normal blueprint instead.
If, after x seconds of inactivity player leaves the tree without cutting it down, I want to destroy the actor and add mesh instance instead.
But before I call Destroy, client needs to know if it should respawn the mesh instance (aka tree was not cut down) or not.
I noticed that if my pawn is spawned via the game mode's default pawn that it is replicated to all clients even if replication is turned off. Is this something special about game mode's spawning process?
@stray thunder If you store your values and calculate whether someone wins in Game State, players have access to the game state, and could potentially modify things on their end that they should not have access to and cause their client to behave unexpectedly.
but those are run on server - and the has on authority would protect against cheating. I'm just trying to connect the dots atm.
i think because im using Bridged Connection ? its blocking the Port idk
having authority means nothing if you have control, which clients can have over their computers. Cheating can take place on any client that has access to values. For example, what if in your game state you called for the client to do something after winning. The "On Authority" call means nothing if the player manipulates the memory of their game so it makes them appear as the authority anyway on their end.
Game mode is effectively restricting access to players entirely - they have no knowledge of what is in the game mode. The game mode can make clients do things, but no matter what, the client cannot make the Game Mode do anything.
It doesn't exist on the clients at all.
Maybe an analogy would help.... When you are logging into a service somewhere, the service is not going to send you a list of all the passwords they have to verify that your login was successful on your end.
If the gamemode creates an instance of a sublevel and loads it will other clients see that same instance loaded or will it have to tell all clients to load that instance?
so the player dies and needs to respawn - should it go:
BP_Character - EventAnyDamage(run on server) -> Set w/ Notify isDead
BP_GameMode RespawnPlayer(Multicast)
?
Game mode, does not require you to multicast anything.
So no custom events in gamemode? i don't understand
You can have custom events in the gamemode. but only the server has the instance of the gamemode. no client has the gamemode running on their end
Game mode is on the server and does not exist on clients. If your actor is set to replicate, it will spawn on all clients.
So any events you have in game mode, will only ever run on the server.
Actor A: Does not Replicate
Acror B: Does Replicate
Gamemode spawns both actor A and B
All clients will see actor B but only the server will Actor A
because Actor B replicates and the gamemode only exists on the server
while on the topic of repplication.
if the gamemode picks a random element from a "Name" array and load an instance of the level. All clients will see the same instance right?
I'm not the most familiar with multiplayer level streaming
assuming the gamemode is only run on the server, then yes.
i still can't quite connect the dots on how when a character's hp reaches 0 on the char's BP and then how it can call the gamemode to respawn it.
When I respawn characters I usually use an interface to respawn
get gamemode and then send message called respawn with a reference to the player's controller
then the have the gamemode spawn a new character, use the controller reference provided by the interface event, unpossess the pawn, spawn a new pawn and possess that. destroy the previously controlled pawn and tadaa
respawn
Interfaces are nice for that stuff because if the client uses the interface to respawn themselves they cant because there is no gamemode on their end and you dont get any access nones from the interface
yea an interface was on my todo to make it better but i just thought I could make it work first. I think I put stuff in the wrong BPs. maybe I'll just do the interface since I'm gunna have to redo the whole thing anyway...
grrrrr
Gamemode will only run on the server. Clients cannot access anything thing from the gamemode or access the gamemode its self
so is that the way a client can tell the gamemode that it needs something?
The way I usually handle something like that is along the lines of having the client tell the server to run something more often than not.
Like the client telling the server "hey I wanna shoot!" and the server says "okay I'll do that for you" then the server tells all the rest of the clients "Hey this guy shot, here is what happens"
wait... shooting would be an interface as well?
but that doesn't go through the gamemode
If the client wants to shoot, they cannot tell the game to spawn the projectile because they dont have the right to tell other clients to shoot
only the server does
client tells the server they want to shoot and then the server does the functionality of shooting that just replicates to the clients
I don't think the client usually needs to communicate with the game mode directly. Even upon death, the death should be happening on the server's version of the player, not on the client.
needs? it can't
Misused the term directly... You could make an RPC to feed information into the game mode.
Is what I'm getting at.
But I don't think you'd want clients to do that.
nods
you don't, i do use GameMode to Client RPC all controllers in few different scenarios
for that, its excellent fit
like sending them the match stats along with match over message
@stray thunder Client does input for shooty stuff. Servery stuff happens that does damagy stuff. Server does damagy stuff, server does check if health > 0. Health isn't greater than zero, so server tells it's game mode to kill and respawn the character? TLDR, all of your health stuff should already be happening on server, so client is already not involved in any way with the respawn process unless you're looking for a way to do it via button click, that adds a few layers.
yea, the shooting checks are just run on server custom events.
I'm just trying to fully understand the communication with the gamemode.
In short. Don't. GameMode is abstract from clients for a reason.
If you want your client to send a message to the gamemode they Cannot
Like Datura said, you would have to have the server feed the info to the gamemode i.e player controller tell the server to tell the gamemode etc.
and that really shouldnt happen because its a potential threat of cheating
ok i see the issue - I'm using "client" as a player that is not the listen server.
I should be more clear when I'm talking about the "version of the player that is running on the server".
the 'character/pawn' that exists on the server representing the "client's" character should have access. but not the character on the client's, well client.
for instance. Event AnyDamage when executed will only execute on the character/pawn/actor that exists on the server. never on the clients. So you can then after that tell the gamemode to execute functionality i.e casts. or interfaces because that event only fires on the server's character (the one 'representing' the client's character)
yea i have that bit already.
random Q: PlayerState is owned by the player it corresponds to, right? Or is it owned exclusively by the server
Server
actually, its the PlayerController
thats the owner of its PlayerState
also the way to fetch the PC from PS - GetOwner
@edgy sedge @sinful tree
When you see the client not seeing all the SK meshes of the server's char. What does it mean? That happens after the players goes to the gameplay level from the lobby.
does server see client meshes ok?
yes
does client see its own meshes ok?
Since server gets their before the client so that means ...
and what about when client is looking at another client?
yes client sees its own fine
I only have two pc to test this. It happens in packaged game. So very difficult to debug
so doesn't happen in PIE?
No - right now i'm testing with 3 clients in pie
odds are your SK replication is fucked for simulated proxies
PIE works fine even with 3 clients
replication works just as well in packaged and PIE
but the order of things happening might not be the same
So here's what I did.
I have a player settings in my player controller with some SK meshes.
if the autonomous proxy sees itself fine
In my character's custom component, I get the settings from player ctrl and then assign it to a variable in the component using server event.
your simulated ones finish their setup before the autonomous has RPCed what it needs to to the server
IDK what that mean
im guessing there is a lobby
and game level
seamless travel?
and you are stuffing your setups in a GameInstance?
then RPCing them to server on a game level
From game instance to Player controller by letting server set the replicated variable
In my Player ctrl: https://gyazo.com/8bd74ad702cd6b7424d2451e37e1fd77
the rest of it, lobby, seamless travel? that correct?
Well I don't use seemless travel in PIE only in packaged game. Since it won't work in pie
i have a lobby
I get settings from controller and set in my player's custom component. https://gyazo.com/141cacbac03fbf5749935620b65b99c6
so
in packaged game
in lobby, your server should have everything it needs
before seamless travel even starts
written in each players playerstate
after that you no longer have race conditions you can't manage
I'm not using player state since I'm doing all these in BP
what does that matter?
you do multiplayer, you use playerstates
if you did, you wouldn't have this problem
I couldn't figure out how to transfer lobby PS data to gameplay PS. Any example or tutorial on that?
Using BP only
CopyProperties function
its an event in BP
it should get called on your lobby PS
and give you a pointer to the game PS
But I have diff char in lobby and in game
so you just cast the new PS, and set whatever data you need from lobby PS to game PS
doesn't matter
doesn't matter if its the same class either
So I create Player settings replicated variable in both of my PS
void ASolsticePlayerState::CopyProperties(APlayerState* NewPlayerState)
{
Super::CopyProperties(NewPlayerState);
if (ASolsticePlayerState* PS = Cast<ASolsticePlayerState>(NewPlayerState))
{
const bool bSteamIDSet = UUWorksLibrarySteamID::IsValid(PlayerSteamID);
if (bSteamIDSet)
{
PS->PlayerSteamID = PlayerSteamID;
}
PS->SetBotStatus(BotStatus);
}
}
this PS is a base for both lobby and game PS
it holds the variables that get transferred when seamless travel happens
and CopyProperties just copies it over
you don't have to pull a common base
but its a little bit more elegant
its the same thing in BP
So in lobby PS, I created a variable called player settings. That' where I set the settings from my lobby.
both your game and lobby need to have it
or you can make a base player state with PlayerSettings from which both lobby and game inherit
Ok So I have a parent PS and a lobby and gameplay PS. The player settings variable was created in the parent PS.
Now in my char selection I cast to lobby PS and set the settings.
and you need CopyProperties implemented on base PS
Now in gameplay PS I call that event
where it just casts the NewPlayerState to BasePlayerState and does SetPlayerSettings to its own PlayerSetting
yes
and now your game PS has the PlayerSettings available before the game Character is spawned
for all players, on server
Ok so do I cast to my character and set all sk meshes in game PS. Or do I cast the player state in my character BP then apply the settings with sk meshes
Did some testing and it looks like if you possess a pawn it will replicate it on all the clients even if the pawn has replication turned off. Unsure what the exact mechanism in the code is for doing this but I'm guessing it is related to replicating the player controller.
you now need to add the PlayerSettings to your game character as well
your GameCharacter and GamePS are 2 Actors that replicate separately
so even if you were using c++, and had the ability to override engine OnReps... you would have to cover case where Character replicates first, and where PS replicates first
to avoid juggling that
GameCharacter and GamePS are created in the same frame on server
So in my character construction script, i have this? Or should I use repnotify. https://gyazo.com/52f997c560df81e87c1c7ece6723591d
you should override HandleStartingNewPlayer in the GameMode
to inject PlayerSettings into the Character
(you have to call Parent function if you're depending on the engine to spawn default pawn)
then copy the settings into Character
and you have to use OnRep
construction script client side executes before replicated variables are set
i c
you can alternatively use BeginPlay
which will execute after replicated variables arrive
but that would force you to handle special case on the server, where BeginPlay would happen before it gets PlayerSettings injected
which makes OnRep the simplest solution = best solution
So I need to create another player setting variable with repnotify in my character bp.
Which gets set in the gamemode.
that path has no replication races at all
and a clear cut order of execution on both server and clients
which circles back to simple = good
nice let's see if I can get it to work. almost done
So I assume I can't assign the variable to my character from a controller. And i can't either spawn my character in game mode.
Currentl from game mode I use HandleStartingNewPlayer then call an event in my controller to find a player start in ym level then spawn character.
So I did this. https://gyazo.com/5f890cdd46f37ae92b63b9913ebb8478
I shouldn't spawn in game mode but should do it in controller isntead
@winged badger WOuld this work? https://gyazo.com/0da10f467947d8bdaf15ea79ba490340
nonono
after character is spawned and possessed, still inside HandleStartingNewPlayer
you access the PlayerState and Character via controller
then copy PlayerSettings from PS to Character
and why you put a server RPC inside the GameMode is beyond me
no Server RPCs required for this to work
that should do it
altho parent node will Spawn the Default Pawn and possess it
but thats fine
In ym gameplay level I have none set to pawn since i spawn manually.
fair enough
this is a very good place to do custom spawn logic manually
best hook for it in the engine imo
Are you done with your current conversation? Like I said before I don't want to interrupt
Zlo can we talk in private? After I set the settings. if I do print string in my character bp, i don't see the value from settings. Yes I have that.
Is there a way for the Listen Server to spawn actor classes that replicate but force them to not replicate until "X" event?
???
they have to be set on the PS in lobby on Server
I was thinking about Net Dormancy but it should only happen with a very specific type of spawning method / logic; all other spawning of said classes can start up just regularly
for it to work
what's your question fam
When I set them on the lobby PS in lobby I see the proper value. But WHen I spawn character and fetch the val from gameplay PS, it's empty.
that requires seamless travel for a test
I also have the child PS with copyproperties connected to parent node so that it inherits. I am testing in standalone using seamless travel. IDK if I have to testing using steam invite or anything.
you did verify that lobby PS has the correct information before seamless travel?
Yes it has valueswith correct data.
Thats in child
I dont' see this. https://gyazo.com/d101f8371d7826224a1969350dc45dcb
Wait that should be in parent or child, since I'm casting to base from base. Currenty that's in base
if both PSes inherit from base
then base
if not you did something wrong
you should also verify that seamless travel is working via logs
and that your travel map has the same game mode/pc/ps as lobby
I am using server command IDK if that matters. https://gyazo.com/f98b29aec346eb7fe9dbaf8553eb8324
I have diff GM/PC/PS for lobby and gameplay levels
My lobby has lobby gm, lobby PC, lobby PS. TOtally diff from the gameplay level.
The execute console comman is in my lobby GM.
travel map
the one in between
loaded during the transition
did you verify you are doing seamless travel with the logs?
Well seamless travel only works in standalone not in pie. that's how i tested. Where do you want me to put the logs. Is there event for it?
Only my lobby GM has seamles checked. I don't think the gameplay has to be checked as well.
What SDK is best for using Dedicated Server?
It's TestLvel 0 https://gyazo.com/daad7d3704a703b59560fe485e301006
Oh my bad I was working on something.
that wasn't an answer
and that isn't a travel map
now make an empty level
call it TravelMap
set its GameMode to be the same as lobby
and set it as TravelMap in your project settings
So I don't think the server default map has to be changed as well. https://gyazo.com/01d149ecaee801c153b595863fb0f889
thats for dedicated servers
anything else? What am I looking for in the log?
So now the level loads faster. I see the print string output which is good but the values are still empty even in PlayerState.
I didn't find any docs on CopyProperties BP. Does it only works in c++, IDK?
Or I made a mistake somewhere
AFter adding TravelMap I do get Print String but empty:
'''ogBlueprintUserMessages: [PS_Lobby_C_0] PS BASE: true == =='''
does lobby or game playerstate implement copy properties as well?
No they are children of base
that doesn't mean you didn't put a copyproperties node in them
No - So put an empty even tlike this? https://gyazo.com/119f8b63e4284389a2c95a0188b2cc81
Currentl I don't have it in children
So children don;t inherit>
no the error is in your CopyProperties in base
is it the cast to PS_Base, since it' sin the base
you need to set the NewPlayerState's PlayerSettings to the value of this object PlayerSettings
you didn't do that
you copied the NewPlayerState's PlayerSettings into themselves
no
the other way around
NewPlayerState is new
it doesn't have any info
object that is executing the logic (Self) has
so you need to copy from self to newplayerstate
(you don't actually need self node)
It works now for the server.
I just want to ask how to check if the player owns or doesn't own the pawn.
I did this to check it in my pawn class and the first one does work and call but checking if it doesn't own it, doesn't work.
now its a matter of replicating it
But I'm using repnotify in my character bp. Do I have to do switch with auth then server and multicast based on auth?
in what situation is this == GetNetOwner() ever going to return true? on a player controller?
but on a player controller, it'll be true no matter what the role is
yea I just found out that GetNetOwner() is always returning true after some testing and looking at it's code
GetNetOwner doesn't return a boolean value
I know but comparing it with my pawn always returns true
if you want to know which controller is possessing a pawn, use GetController
I mainly just want to check whether the player owns a certain pawn or not.
first define works on server
ohh
A - Server sees everyone correctly
so from the player controller, use GetPawn
I will try it
I see the SK mesh on server and the settings have values. But the client has no values in its settings.
I'm not sure if I'm being a moron but I crashed on this code.
???
where is this code, also this code makes no sense
controller can be nullptr when a pawn isn't being possessed, or if you're a client in a multiplayer game because you don't know other players' controllers
It's in my pawn class
it still makes no sense, it'll always evaluate true pretty much
I don't know what you're trying to do and why
I need to check whether the player owns a certain pawn.
I'm working on my simple client-side prediction and I want to check if the player owns the pawn so that I can set off another set of code.
That wasn't a good explanation nevermind
wouldn't it be suitable for prediction stuff to use IsLocallyControlled?
I'll try that
It worked thank you!
it'll probably have to be more !HasAuthority() && IsLocallyControlled()
Yea probably
The server has data but the clients don't have data in player settings.
what did you onrep?
The player settings struct in character bp
This is how I'm setting the settings via a widget. I wonder if the event has to be server. https://gyazo.com/8cea604328be1527fbb5b91c6b21b8d8
you just told me server has correct settings for all characters?
well yes
and clients see server ok?
Clients can see server ok
then you didn't RPC the settings to the server while in lobby
one Server RPC, in your lobby PS
That's the first screenshot above
So Create a server event in PS_Lobby and set the settings. Call that RPC from the widget?
yes, and RPC obviously has input of type PlayerSettings
Yes
When I'm calling the RPC in PS lobby from the widget. The widget event has to be on server as well
in the first screenshot
only the PS one
that looks fine
Yes it works now. Let me test this in packaged project since my preivously working setup didn't work there. I could set materials the same way I assume
Also if I have to update any of the SK mesh. I could just simply set the player settings struct right
on the character this time, yes
Thanks a lot.
Anyone know how Rust can pull off such high player counts on servers? Different engine and all, but thought there might still be something to learn from it.
Hi guys, a quick question, I have a throw stone feature in my game, and I'm using prediction, everything works perfectly, but I'm getting strange result when Server is
not looking, like there is a bit of offset, does anyone has experience such issue? also I set my character and my stone Always relevant, replicate Movement, New Load on Client and Replicates
Hii guys goodday how can i check if the project requesting a specific port ...
Because i dont know for somehow steam plugin not working and i tried to turn off fire walls port forwarding everything still not working
Im using 2nd router connected with the main one as a bridge WAN connection
Steam does not need open ports
Or port forwarding, or stuff like that
Just have your two machines connected to the Internet in some way and that's all you need
Yes but i was curious why suddenly i cant connect or using the plugin through any project
Im trying to get the overlay like just you are playing War space notification
Its not working
Also i tried to get the steam id or account name still null mean its failed to fetch
Is it a shipping build
Close the editor, right click uproject, hit launch
Nothing also
Be sure to have Steam online and connected
I tried many projects
Many versions
I tried a project i was using before was working
But also nothing
That's weird, all you need to get Steam working in UE4 is one config change in the project
I used my App id and 480 id
Thats why i asked maybe someone have same problem
I still think in the routers
My main router using simcard maybe because of that ??
Its not DSL or Fiber optics
Well yeah maybe your ISP simply blocks Steam to save bandwidth
But that wouldn't block the overlay from working, as long as you're signed into Steam
Yes its working on other games
Yesterday i ve tried to check the ports my PC using and i launched the game
Its not requesting the Steam port
The Steam overlay does not need anything more than the Steam client running, there are no ports involved
Make sure you haven't broken the engine somehow, like installing plugins in the engine folder instead of the project folder ; make sure the Steam setup in project is correct
I thought because im using Playfab also i tried fresh project same
Verify the engine, etc
I tried 4.23.1 and 4.24.3 and 4.25.0 and downloaded plugins again 😋
Just so we're clear no plugin is needed for Steam
Pristine vanilla engine, simple config file change in project
Yes the plugin is the Advanced Sessions
Not needed for the overlay
Weird really
I will reach the PC soon
And try again
Last question please
Is EOS have same services as Playfab and does it free
No idea what either service does, never used them
Playfab is way superior than EOS, EOS is too buggy.
And how is the cost of Playfab is it too High ?
@rich ridge its wrote For Development 100k User per title
free
EOS is completely free.
But i think the plugin is 100$ something like that
Playfab has lot of limitation in free tier, for example you can't have more than 50 leaderboards
which plugin
EOS Plugin
Yeah I would not pay for an EOS plugin I think.
dont buy it
So i will wait
you can use code from master branch
and that code is compatible with current 4.26 release.
at max you can expect plugin around UE5 release.
Ah, I would be careful with saying that
Epic was never good at keeping their release schedule for stuff like that
epic need something to show for the mega release of the decade.
They have enough to show :P Doubt that plugin will be part of that
but i m optimistic they will ship it
Does EOS replace the OnlineSubsystem?
What should I write in the game instance? Looking at the shooter game sample is a 2000+ lines of code file and It's a bit intimidatory
very little usually
ShooterGame is pretty old, so just use it as a resource rather than as a perfect example of how to do things
There are better ways of doing a lot of things now, it's just still the most comprehensive MP sample
They won't now, it was around even during the UE4 beta so it's old as
They make minor changes but with UE5 on the horizon they probably have new samples lined up
Certainly hope they do
Is EOS replacing OnlineSubsytem?
no
I can't wait, do we know how much will ue5 api change and when it will be released?
OnlineSubsystem will encapsulate EOS within engine.
hmmm, will or does?
does
ok
When l start my test my players dont spawn l dont know can anyone help me ?
@bitter oriole I verified The Engine and its worked Thanksss
The first player spawn normaly the others no
Have you added any PlayerStart objects to your level?
yes
3
as my players
@silent valley any idea?
@silent valley if l played it offline that works perfeclty
l mean player mesh
not really... if you're using C++ you can override GameMode and hook into a few functions, like FindPlayerStart_Implementation for example.
blueprints
but the default should work ok
is default
Play as Client or Play as Listen Server ?
are your PlayerStarts definitely above the world (e.g. player not falling through)
play as client even first player have problem but play as listen server works for player one
I don't know 🤷
Check the client log files for anything suspicious
and the Server I guess
l wil start over again
only aniamation and spawn
@silent valley l believe is something with posses
but when l use my print for see how my index goes it is ok
Anyone achieved something like "Set Physics Angulat Velocity" in multiplayer? That one requires simulate physics on and that causes a desync in multiplayer 😦
if GTA 5's map was running on a listen server, with only 8 players in the game, and the listen server being a ryzen2700x cpu with 16 gigs of ram, with all the players in the US, would the game run smooth?
Sure, if you set it up right. Gta 5 runs smooth enough already and I guarantee their servers aren't that beefy.
no
i have a map that large
so if i run it on listen servers
then would it be smooth?
listen server being a ryzen2700x cpu with 16 gigs of ram
players in the US
only 8 players
it could be made smooth
it won't be out of the box
listen servers don't like spending too much CPU time evaluating actors for replication
so what about a 5*5 landscape and a city half size of los santos
would that be smooth?
The thing with a Listen server and streaming world, is that worse case you have 8 player spread out over the map.
You have to run all the logic for all the missions, AI, collision etc for those 8 areas of the map.
In addition to all the rendering and local logic for one player.
If you design the game for this then sure it can be done - but it won't be easy.
Also, Listen server and streaming world is not supported out of the box (tiles are not loaded for remote clients).
Hey,
Can anyone tell me what exactly happens with the code in the following circumstance ?
In a multiplayer game - During the event post login event, a player leaves the game and the event on post exit gets fired. Does the post login event run until it's over or does it get interrupted ?
If 8 players spread out, the replication is lesser isn't it since less interactions among players, except walking around.
Or you can just rent cheap dedicated server maybe.
@lilac creek A server running a map that large is going to put a heavy strain on the system. Think about players dispersed in the level - the host will still need to simulate everything happening
The CPU load would be close to linearly N * the cost of GTA itself, for N players
So simply put, it's a tough one
CPU is the issue we have with listen server
8 players can easily add 4-5ms gametime on the CPU on the listen server :/
only leaves 10ish ms for your local player
if you want 60fps
What you mean by the cost of GTA itself? The gameplay system you mean?
But then again, the host takes most of CPU only. So basically most calculation is run by the host.
The CPU load.
Assuming GTA V runs gameplay in 2ms on the CPU, a listen server with 8 players is likely to need about 8x more
Usually host calculates the AI stuff for sure since host is the server. The players interactions are different thing. Only host need strong CPU
Assuming same optimization
I see
The point is that GTA V likely needs more than 2ms and your average UE4 game likely has a lot less CPU optimization out of the box, and so this endeavour appears difficult at a glance
If player were to spread out do walking only. Then replication ratio is 1, right? As long as the 8 players are not constantly interacting to each other, he should be fine
You are right
The host still needs to run all clients
Having players spread around is the worst case
You're more likely to have each player needing an entirely different set of objects to simulate
UE4 is not really well built for CPU loads - it doesn't do ECS, it uses inheritance extensively, the gameplay framework has all but no multithreading support
So I'm just saying it's a tall order here
I always thought as long as the players spread out means lower replication ratio. Like how we see in generic Battle Royale
Guess i am wrong
I have no idea what a "replication ratio" is, and I'm talking about CPU load here
Spread out is more thinking, less talking. Clustered is less thinking, more talking
My bad, my english sucks
Why isn't clustered both more thinking and more talking?
Because it doesn't have to have as much of the world live/ticking, but each client needs to know about more stuff (the other nearby clients.)
Uh i see. Thank you
quick q on fast array serializer. Marking Dirty on Client will still be meaningless for a replicated struct, correct?
it doesn't do anything
it might throw a warning, not sure about that
@lilac creek it doesn't matter how large the thing is, it matters how many replicated actor it has
and how good your optimizations are
you can make a 10 by 10 meters area that has so much stuff in it that it just doesn't work
you will run into trouble over 13km, as you'll lose float precision
collisions will start feeling wonky
I'm getting 60 fps in a blank map in ue4, with just a cube
And one plyer
What is my CPU compute time in ms
vsync on? 🙂
Yeah
yeah, to vsync on means your fps is being limited to your monitor refresh rate
Right, turned it off
so there is no general way to answer your question
I get 96 now
and editor is taking most of it
What would be my CPU compute time, like an estimayion
The level has nothing
96 fps while running standalone game
@winged badger
no, that is a standalone with editor binaries
which is very different from packaged
96 fps is just over 10ms
its not an estimate
it was a typo tho
1000 milliseconds in a second
1000 / FrameRate = frame time in ms
10 ms is not bad though (for a finished game).
yeah, but is meaningless with editor binaries
just started with ue, (coming from developing form the ground up) so alot of things make zero sense to me x)
you can play a game with 4 players, in standalone with -log argument
if you type log lognet veryverbose in the console
editor binaries = ?
@woven terrace google time!
right keep forgetting thats a thing xD
or AskJeeves if you're into that
build target that has "Editor" in it
includes running DevelopmentEditor or DebugGameEditor from your IDE, double clicking .uproject to start the editor, or running unpackaged standalone
by far the least efficient build, and one that should never be used to measure performance
@winged badger it's decent to measure relative performance though [for starters anyways]
only performance info you can get from it is relative to editor baseline performance
so you can see if you made something better of worse
💯
in absolute terms, its meaningless
how dare you say that PIE is not 100% representative of a shipping build performance 
especially given that you could be running the editor on a shitty i5 or a shiney new ryzen
In shipping build all the editor codes are trimmed... If you see packaging logs.. none of the editor modules are packaged
I was being sarcastic
My bad
Hi guys, quick question, If i have piece of equipment as Child Actor Component under my character class, do I have to always call it as server? or I should call it as Client and then the equipment handle the effect for server and client?
...also part of the equipment (bone to be specific) moves based on Control Rotation of the Player
i would avoid child actor components in MP like the plague
why is that?
Let's just say they're tricky
They're a hack really, components are meant to belong to one actor
Child actor components put that on its head
If you can avoid them, it's always a good idea
Things like character equipment would likely work better as a component
hmm... you mean construct object from class?
yeah, i would say it slightly easier, so later on i don't have to define Owner and Instigator on possessed
@vivid prawn even if you want to have them as actors (say a weapon per say), just don't add it to the actor via child actor component
In your Inventory manager component or whatever, spawn the actors and keep a ptr to them in your comp
i see... so I don't need to create them directly in character? I make a component to manage the creation and storing them right?
Features like that are usually nicer as components since you can encapsulate logic which is easier to handle and troubleshoot
Otherwise, you're tied to actor classes
and then... what happens if you want to have a chest with inventory stuff? Well you can't since you did it at the ACharacter Level. Now you have to copy + paste all that logic over to your AMyChest class
but let's say if that equipment need to access to Control rotation to follow whatever player looking at, I need to pass the character as owner to the class right?
@dull lance you still want your equipment to be actors, just that the actors would have some sort of component defining functionality. Like in my game, all weapons are actors, but they have projectile weapon components or whatever on them
I encounter an issue, cause if i want equipment to do something, i ask server to do it, but control rotation doesn't seems like pass correctly if player (the host/server) not lookign at it
@dark edge yeah; I meant the inventory manager
but the feature of a weapon itself would also be encapsulated (either struct, uobject, or uactorcomponent)
@vivid prawn controllation should be synced. How are you modifying it, add control yaw and add control pitch?
from the equipment owner (which is the character) getting the control rotation to get the Yaw and Pitch
however, the yaw and pitch works fine for client only.but the moment i ask server, it only works if the (host/server) looking at it
What do you mean by looking at it? That doesn't make any sense
ikr
Like when the host looks away from a client, the controller rotation quits being synced?
that's a major code smell
likely smth you're doing
did you play with the Net relevance settings at all?
i set it to always relevent
i found someone has same issue
but nothing works for me
back in 4.12 😛
yeah, 2017!
You are probably doing something f******. Start by printing control rotation in the character on tick
Make sure it's synced
Idle position isn't a control rotation, can you confirm that the control rotation stays synced?
no it's not syncing
okay, my equipment using Skeletal Mesh with AnimationBluePrint
and since i'm using actor in AnimationBlueprint i get the component owner and then owner and cast it to actor to get the Instigator (which is the character) to get the Pitch from control rotation
now I'm not sure what is AnimationBluePrint limitation
Well since you're control rotation isn't synced, I'd start with figuring out why that's screwed up. Don't even worry about your animation blueprint, that's the least of your problems