#multiplayer
1 messages ยท Page 187 of 1
from a repnotifier
Which one?
Guys, how are you, does anyone have any idea of โโany third-party services that I can use in Unreal to deal with report player, bans and such?
@twin juniper Did you read the Network Compendium like I recommended?
Why do you need a third party solution for that?
Bans and Kicks are very simple
Reporting is a bit different I guess.
Not really sure of an appropriate 3rd party solution that does all of those things though.
I'm referring to complete game bans, not just match bans... And about reporting players who are using cheats
Easy Anti Cheat?
EOS itself has stuff for all of this as well I think.
EOS has a Sanction system
Which is basically a Ban
I don't know how to implement it, I get lost a lot on the Epic Games developer portal and I'm using Steam Sessions
Yeah, I have a better understanding now but I still dont master all of it
Read it more than once
It takes time to understand it all.
I wish only by reading I could understand things a 100%
But I require hands on experience to master things
@fossil spoke
?
Would it be possible to implement Easy Anti Cheat with the Steam Subsystem?
Sorry, I'm new to this part and I can't find anything about it on the internet...
Not sure if I should ask here or in #cpp but I'll start here. I have added an InstancedStructContainer to one of my UObject derived classes that is a property on an Actor. I have, I think, correctly set it up for replication. The class provides IsSupportedForNetworking() and GetLifetimeReplicatedProps(), and the property that is the container is marked as Replicated. But the container does not actually seem to be replicating.
I am at a loss for how to debug this
What are good things to do when debugging replication issues?
Is the UObject itself properly set up to replicate? Like it's been added to the actor's subobject list?
I don't know, actually. The UObject is added as a variable on the Actor blueprint, actually
Ah! It was not marked as replicated!
Time to go test again
Ah well. That didn't change anything
UObjects can't replicate just by marking them as replicated. They require additional set up in C++ to get them to replicate.
Well yes, I know. As I said, I have provided IsSupportedForNetworking() and GetLifetimeReplicatedProps() for the class
If there's something else I need to do then I'm not aware of it
If you've done the SupportedForNetworking/GetLifeTimeReplicatedProps part, I think you just need to have a way to add and remove the object from the subobject list of the actor that contains the UObject reference.
That is something I want to be able to do in Blueprints. I'm developing this for other people to use and I don't want to force them into C++
Then you can't use UObjects to replicate the data.
https://www.unrealengine.com/marketplace/ja/product/uobject-replication-plugin?sessionInvalidated=true
I didn't try it, but it seems solid
The base class for replicating has to be made in C++, but it can be subclassed in blueprints that can still replicate the UObject, but they too need to have some means to have the object be added to its subobject list.
There's no way to add my uobject based class to the subobject list of a BP defined Actor?
You probably could make a static function that could do it that you expose to blueprints.
Why not just try the plugin and see if it works as you want?
Because I'm developing a plugin of my own for sale to people. Can't make my plugin require someone elses plugin. ๐
And yeah, it looks like that plugin does exactly that - it looks like it creates a class that is then used to manage the replication of the objects which you can add and remove from the subobject list of that object.
Well, that plugin is free, so I'm installing it now. I'll look at the code and see if it can teach me anything. I really need to learn this stuff for myself
Thanks for the information!
hey guys im trynna replicate sound , it seem to fire on client and print string but the sound refuses to play, on server it rrefuses to fire but plays the sound lol
The actor needs to be replicated.
If the actor is replicated, you can't send RPCs to the server on actors that aren't owned by the client, but this is ok, because you don't need to send an RPC to the server as the server itself can detect the overlaps/end overlaps - just put a "HasAuthority" node on the overlap events and use the "Authority" path to ensure the server is the one executing.
Say, does a replicated UObject have to be a property of an Actor directly?
In may case I have a replicated UObject that is a property in a different replicated UObject which itself is a property of a Actor
Hmm. From what I'm seeing nested replicated uobjects require even more work and might not be worth it. Maybe I can turn my outer Uobject into an ActorComponent. That might work
Anyway, I need to sleep and give my brain a rest
Has anyone seen this warning? I googled it, and I couldn't find much other than it might be an issue with having logins enabled without credentials, but I've never turned that on & this is a new project. (I'm in 5.4)
I have gotten it randomly sometimes not sure what it means or why
Not just in 5.4
Oh. I was thinking it might've been a bug, but I've only ever gotten it in 5.4. It seems like I can ignore it for now, but it could be something I've enabled/disabled without meaning to lol
Ty for the info!
what actor, is a sound a actor?, this fixed the trigger happening on sound but not sound on client
The actor you're calling the RPC in.
BP_Item is it?
its a sound
oo
so its the
ahh so
i ticked it now =]
let me see if it works ๐
used to doing in the main char hence i dint do it here forgot ๐
woot ty ๐
Yeah I've gotten it too, it is just a warning and can be ignored.
An actual fix would be to create some mock credentials in the editor preferences. Not sure what it is used for though <_<;;
Is there an equivalent of PostNetInit for Actor Components?
If you have a repnotify variable exposed on spawn, and set it, will clients who join after recognize that it is different than default and then run it?
Yes if a value differs then when the client joins they get the updated value an OnRep functionality runs
What about for example in peer to peer/listen server multiplayer. Would the host who spawns and set that, immediately run the repnotify as they're also a 'client' and it would basically run at the same time as begin play for them?
Authorities do not run their OnRep functions naturally (BP Does however), so just guard with
if(HasAuthority())
OnRep_Foo();
This is a BP function. So it should run.. okay thanks.
actually a quick test, in BP it doesn't seem to
at least not as part of a spawn action.
Hello. Does anyone know how to get Advanced Sessions for 5.1? I'm currently using 5.0 and migrated to 5.1. But on the Advanced Sessions repository there's only 5.0 and 5.3 ๐ค https://github.com/mordentral/AdvancedSessionsPlugin
I am using AdvancedSessions in 5.4.2 version of plugin is 5.1
@void nest
so just install older version
I tried that but then the project no longer compiles
It only compiles with the correct version :/
wdym no longer compiles
When I migrate my project from 5.0 to 5.1 it doesn't compile and tells me Advanced Sessions is the culprit. I've had this too with other Unreal version like 5.3 and when I put in the correct Advanced Sessions plugin version (5.3 in this case) it suddenly compiles just fine.
Problem is there is no correct 5.1 version of Advanced Sessions
no
Meaning I'm stuck as I can't compile the project without it
did you compile whole project by IDE?
Yeah with VS
what compile errors you get
Currently in the process of migrating again. Will post the error when I get to compiling again
But it always something with AdvancedSessions
Is a implementing things for example decreasing stamina as timers is a good practice/idea when it must be networked?
If it's not related to Movement, I guess it's fine.
no, I will only do player sprinting depended if he has stamina or not
in every tutorial I see timers
no, cpp
But you reduce the Stamina while sprinting?
And this?
yes I am wondering about it how to do it properly
that's the reason I am asking about timers ๐
Using Stamina in Movement requires to use the CMC directly
There is a Repo pinned that has a small example
You will need to reduce the Stamina in the CMC directly.
In CMC? Why
Because you are affecting Movement with it
And it has to be kept in sync with the Movement Prediction
Same way as predicting if player wants to sprint?
I have CanSprint function which finally decides if player should sprint or not, I wanted to check there if player has stamina
We reduce stamina when player is moving in the cmc. There's a few convenient places to do it.
example?
CMC extended for predicted abilities. Contribute to Vaei/PredictedMovement development by creating an account on GitHub.
from the pins
that eXi referred to
UpdateCharacterStateAfterMovement() and OnMovementUpdated() are nice post movement update hook places
thank you
I am setting up my game server with gamelift aws and when it comes to uploading the fleet I get this error. I am using init sdk 5 from gamelift
Have you done what it suggested you to do?
hello all, my clients are spawning with the DefaultPawn (is like they have another Game Mode instead of mine: BP_MultiplayerGM). I have tried to set my game mode to every default setting in Map & Modes but it didn't fix the issue. Any ideas?
Of course ThirdPersonMap has overrided the game to BP_MultiplayerGM and the map works perfect if I test it without sessions
The Host is spawning with the correct pawn, at least...xD
@thin stratus yes I have the init sdk of the gamelift plugin placed in the gamemodeserver by default in its begin play
I also put the dlls that I downloaded from openSSl
And the suggestion to check the logs?
Not sure but I got it working
Omg THE Mathew Wadstein?!!?? ๐ซฃ I'm star struck ๐ Thanks for the link Mathew. ๐ The 5.1 version is there! Awesome ๐
emulated ping over 200ms and no corrections and it runs smooth on client
@summer rivet I just want to say that your tutorials are legendary good sir. The countless times they've saved me from going nuts are beyond count. I can not thank you enough for all the hard work you have undoubtably put into all that and for all of your future work. HUGE fan! ๐ซถ
@void nestGlad to hear they helped, thats why I created them since I know how it feels to need more info and have it missing then banging your head on the keyboard till stuff works lol
Haha yes exactly! They are a beacon of light in dark times ๐
Hi, I need help
I'm making attachment system for FPS (normal fps, not true fps)
Then, I use "add static mesh component" for add it, and I turn on "owner no see"
And also I "set owner" to character correctly, but third person attachment meshes still visible....
(As you can see, stock, magazine and sights are floating even though owner is correctly "PlayerCharacter")
Why???? is that bug????
no ideas? omg no one is working with Unreal Engine 5.4?
Please show me world setting
So, you mean, when you start PIE, you get "DefaultPawn" instead of "BP_ThirdPersonCharacter"?
mmmmmmm Okey now I know what's happening.... playing as a listen server, if the listen server host the session, the other clients spawn as a DefaultPawn. But if I play the game with 3 clients, everything works fine. Or if a client host the game playing with a listen server.
For example recording this video, its works becuase a client host the session. My bug is happening if the listen server (the editor's viewport) hosts.
do you have any server specific code running? since thats about the only difference you are describing (if the server hosts)
Hi everyone hope you are well. Very new to networking, am curious what is preventing me from setting the active camera on the client side. I have one camera actor placed in the level. When a client joins the server (listen server) a character BP is spawned it, and then I have attached a pic of its BeginPlay which should grab the one camera actor from the level and set it as active. I am replicating this function to run on server as well. However when a client does join the game, it snaps to the right camera for a second then snaps back to what seems to be a default camera that UE spawns in, as this Character does not have a camera attached. I am curious if it is the server in this case thinking that the camera assigning is the client trying to cheat? Or if anyone has any insight on this would be very appreciated thank you!
Here is a video demonstrating the behavior, Obviously the client (smaller window) is able to access the camera and is getting the right player controller to assign it on, I am just confused as to why it is being set back to an unkown camera. The correct camera view is the one that the bigger window sees. At 0:03 the client shares this view for a second.
Hello everyone!
`UCLASS( )
class MYGAME_API UOuterComponent : public UActorComponent
{
GENERATED_BODY()
// OnRep func is omitted
void DoSmthOnServer()
{
CustomActor = SpawnActor<ACustomActor>(/* params here */);
}
UPROPERTY(ReplicatedUsing = OnRep_CustomActor)
TObjectPtr<ACustomActor> CustomActor;
};
UCLASS( )
class MYGAME_API ACustomActor: public AActor
{
GENERATED_BODY()
// OnRep funcs are omitted
UPROPERTY(ReplicatedUsing = OnRep_someProp1)
int32 someProp1;
UPROPERTY(ReplicatedUsing = OnRep_someProp2)
int32 someProp2;
};`
UOuterComponent is placed inside other actor, both are replicated.
Is it true that when I set CustomActor on the server (by spawning) and as well set replicated properties of that Actor on the same tick (literally after spawn), OnRep_CustomActor will be called on the client before OnRep_someProp1 and OnRep_someProp2? I want to know if it is like 100% true and I would get the same behavior regardless of packet losses and any bad connection.
they will be called when server change their's value
Any help with this? i'm doing in multiplayer. https://blueprintue.com/blueprint/qkbkm5dy/ (InventoryWidget) . https://blueprintue.com/blueprint/_c0avfrl/ (Pickup Item - InventoryComp). https://blueprintue.com/blueprint/g1cjl_3j/ (PlayerController)
If i wanna make an array to keep track of player controllers should I put it in gamestate or gamemode?
@bright summit sry, I forgot to mention that I set them on the same tick when I spawn the actor
so it should be in the order of top
you can just make printscreens and see what happens
yeah, I guess I'll try. Might as well enable packet loss and lag. Just not sure if the order will be always the same, would it mean that it is a 100% stable behavior. Networking is such a thing, that anything can happen anytime. I know that in Unreal it is better not to expect thr order of OnRep's to be consistent, but in my case, it just looks very intuitive. My brain can't believe that property OnReps of the object could be triggered before the OnRep of the object itself ๐
In case of packet loss, won't it sometimes be the case that the variable that will take more memory will be replicated last?
so this is replicated multicast. if I call it from a client shouldnt it also call it on the server and then the server calls it on the rest of the clients as well? so I am confused what the (if server) means?
I guess it might be the case if the variable doesn't fit in the packet, then it could be replicated in the next one, therefore the bigger the data, the higher chance that it won't fit in. Ofc, I don't know the limitations, or how Unreal handles it,(Not in the mood to debug engine code right now) but just from the point of common sense, it should be like that
that means if you will not execute it on the server it wouldn't be executed on clients. Rpc will be dropped
multicast should be called from the server, it;s useless to call on the client
so if i call this from a client, it will be dropped?
okay thank you both
yes
take a look
there's a lot of important informations
@tired current take into account also this one
I had a question about Multicast and RepNotify for my open world 2d mmorpg. It seems like they both call events on clients once they become net relevant again, as in once the client gets close enough to the actor who called the event. Is there anyway to possibly stop Multicast or RepNotify from calling events/functions on clients that become net relevant again?? I dont want players to get bombarded with events like sound effects and stuff each time they find a new player in the open world.
so I am trying to call a function to change material on pawns that are owned by player controllers. player controllers are owned by the client (or listen server), so how could I call a function from the client on the server? Would that not be a Run on Server RPC?
In that situation mostly clients own their possessed pawns so simply make server RPC called from client
ah hold on. So I am calling a function from an actor called PlayerManager that was spawned into the level through the GameState. So the Player Manager should be owned by the listen server. I then call a function on a pawn that is owned by a client, from the PlayerManager which is owned by the listen server. Even though the function is a member of the Pawn Actor, it is still initially called from the server. So in this case would I be invoking on a server owned actor or client owned?
Ok, I didn't know this is so complicated xD
What do you want to do exactly?
You said you want to change pawn colors
Do you want to do it from player manager?
Yes lol
Haha sorry๐
The rpc call will get dropped if client is the one calling it in your game manager
Or any actor it doesn't own for that matter.
Change pawn color thru server. Color can be replicated value
On rep meshcolor-> set color
This is the same problem I'm having... So for pretend, I have a weapon spawned on the level, it replicates to every client, but the first client to touch it gets to have it and it disappears. Now that weapon is visible on the owner, owned by the owner, but when I go to shoot it, the spawned "Rays/Projectiles" are created by the client... How do you put those "rays/projectiles" onto the server to replicate them to other clients? Do I just "on hit" the other client's collision mesh and then tell the server that I hit the other client's mesh, or does the server determine if I hit them? I can get it to work in a haphazard way, but what is the right way???
Spawn them by the server? Xd
See that's where I'm stuck, wouldn't that be too much for the server to sit there and spawn everyone's projectiles?
Optimize your code and it will be good
Putting things in the right place is optimizing code...
When u say โgets to have itโ and it disappears what do u mean by that?
Oh i see
The level owns the weapon, it's up for grabs basically. The first one to touch it gets to "Equip" it.
I see. And the problem is then when that weapon calls the spawn projectile method you need it to spawn the projectile on the server so that the server can replicate it to the rest of the clients. I am having the same problem
How do u have it setup rn? Do u have like an actor owned by the server that handles all projectile spawning? Or would u try to have the weapon be owned by the server?
Exactly, but in your case you are trying to change the color of the weapon so to speak
Pickup ->setowner for picking up player +> shoot server RPC on weapon object which spawns projectiles
Or am I missing something?
That's a way, but the other clients don't need to "see" the other clients projectiles/rays... But the Owning Client does. So "should" the server be spawning every client's projectiles, or "should" the clients be spawning the projectiles and reporting to the server when meaningful hits occur.
My way is a mess right now... I had the server AND the client both generating projectiles so 2 would spawn and collide with eachother ๐
You can turnoff rendering for others
"only owner see"
Uh oh lol, in ur case tho r u trying to have it so atleast the cosmetics of bullets are seen by all clients? And then just hit detection happens client side and reports to server?
That was my idea, but having a more simplified mesh displayed to other clients, and a more complex mesh displayed to the owner, with the server only caring/generating MAYBE the collision mesh.
But I can't seem to find a basic description of where to put all the logic and how to organize it. About to watch this:
https://youtu.be/Hsr6mbNKBLU?si=IvTjjI5fOJawuETy
๐จโ๐ซ My Patreon link:
https://www.patreon.com/kekdot
Download Project Files | Premium Tutorials | Courses
๐ฆ Get our Game on Steam | Kekdot Center:
https://store.steampowered.com/app/1487180/Kekdot_Center/
๐ง๐ปโ๐Support us on our ๐ฒPatreon for awesome benefits: https://www.patreon.com/kekdot
In this video we talk about the Unreal Engine Multi...
But I don't like watching tutorials... I like reading them.
@shrewd spindle depend on how much work you want to do
The amount of work on me isn't a bother, as long as if I can do it hard one time I can replicate/reuse it. My mindset is putting as much work as possible on the owning client, and as little as possible on the server.
But also minimizing the load on other Clients who simply don't need to see HD Flames shooting out of the hands of a sorcerer 100 ft away.
Take a look onto net relevancy
Anyone here experienced in unreal netcode please DM, I have an offer for you
any help for this fellas
what is netcode
We need to replace the Unreal NetDriver with our own custom version. We already did some of the work to convert the messages into the right format for the relay, but the NetDriver is what receives and sends these messages
It's for enabling multiplayer functionally
keep FX as one time events
Like how GameplayCues works in gas
yes i am trying to make it a one time event.
any ideas
all players need to hear the sound effects of attacks and enemies dieing though
if they are net relevant
those should all be one time events
explain
i call them once on multicast or repnotify, and if players are not relevant they dont hear it
but if they get near the player they hear all of them at once, the ones that they missed
if you miss a multicast, you'll forever miss it
they wont catchup when someone gets near
yes they do
no they dont
if they were not net relevant
No
well you're wrong
I did some extensive testing and it seems that Multicast RPC events are called on all clients regardless of the Net Cull Distance. It pretty much seems to just ignore Net Cull Distance if it is a multicast event. I have only tested this in Blueprints and not C++. Iโm not sure if this is intentional for Multicast RPCs or a bug in blueprints. In ...
then they're set to always relevant or very high distance where they're relevant
repnotify is literally made to solve this particular issue
If you open a box, and multicast the open box animation, it won't be opened for a new client
you were right ๐ ty
The general advice is to look at how unreal tournament does it
Afaik client spawn its version right away, then interpolate to server's one or something like that
So you're saying the Client Spawns the 'HD' projectile, and updates the server with the projectiles name/location/transform, tells the server it hits, and the server says "Yeah, you hit" and does the server thing telling the other Client that they were hit and what hit them. The server at the same time interpolates the data coming from the originating client to draw the 'Non HD' version of the projectile, replicated to all the other clients, so they aren't hit by ghosts they don't even see, but isn't making them draw complex meshes.
Similar to when I shoot, my projectile tracers are green to ME, and all my allies projectile tracers are green, but enemy tracers are red. To my enemy, I am their enemy, so my tracers are green to me, but red to them, and their own tracers are green to them, but red to me.
My biggest weakness right now(Which I'm learning) is knowing which blueprints to place this logic...
-Team association (Player State or Player Pawn? Can switch teams?)
-Weapon Generating Projectiles (Weapon Actor(owned by Character Pawn?))
-Updating Server/Other Clients (Character Pawn or Player Controller? Doesn't matter since PC owns Pawn?)
-Attack Input (Character Pawn?)
I'm rubber ducking at this point... I'll keep plugging things in and see how they work.
"Switch Has Authority" is the big boy Node here, though, right?
@shrewd spindle it's probably best that I say nothing and for you to look at the source code instead.
Haha, I gotcha... It's tough getting one question answered and that answer just generating 100 more.
Soooo I'm passing in a rotation to SafeMoveUpdatedComponent in my custom movement mode, but for some reason simulated proxies are not seeing that rotation correctly. I've set bUseControllerDesiredRotation to false and bOrientRotationToMovement to true (and everything in between) but no matter what I do, the simulated proxies are always seeing them facing the same direction.
Am I missing something silly here?
I had rotation issues, and had to call "Set Control Rotation" Node
Based upon how Fortnite does it; the client โfiresโ the weapon and does the local spawn effects of smoke and sound. But the actual projectile is spawned by the server and replicated to all clients, including the original shooter. So it โfeelsโ instant, but actually server driven.
If itโs good enough for Fortnite and no one ever notices, then itโs good enough for whatever game youโre making.
How dare you! My game will be better than Fortnite!!!! ... But yeah, okay... That makes better sense since ticking the info to the server is heavy on bandwidth when multiple Clients are sending multiple projectile updates to a single server...
To expand on this. Overwatch does not predict any Throwables either.
You see the throw animation instantly
But the projectile itself is not instant.
The rational is that, most players do not notice or care.
We dont predict any of our projectiles either.
haha - sorry, I didnt mean it in a negative way either (i know your reply is joking as well). I more meant it in terms of proof of large scale deployment
This is quite surprising actually
interesting
We made an artistic choice to have our Throw animations authored such that they generally obscure the center of the screen towards the end with the Hand.
This means that the time where the Projectile hasnt replicated is covered by the Hand
Generally speaking
High ping scenarios is obviously going to be problematic whatever you do
The thing about those kind of predictions is that I generally expected that at this point they are no extra effort anyway because usually you'd want to do some kind of complex time syncronization here, but I guess you can just not predict and forward the projectile on the client by half the round trip time
but still usually at that point it's almost easier to predict it because then you can do the local throw and make a timestamp, then server spawns, skips by the delta in the timestamps and ur good
unless u just deadass don't care about any of that ahah
Well you probably should ask yourself why you should care about the prediction of the Projectile.
If the Projectile comes into the world in a way that you can get away without doing it, does it really matter that you dont?
You might want to predict the Projectile for accuracy.
Well yea - it depends on the type of projectile I guess, but it usually matters more when you have something like a frag cook mechanic
Slow moving Projectiles like Grenades, probably not.
As long as they end up where the Player thinks they should have.
Does it matter if the Projectile itself was instantly onscreen?
Which is basically what we concluded.
Im guessing OW did as well.
It doesnt really matter.
Hm yeah it's definitely an interesting point
Because its the Action of throwing that needs to be instant
Not the result of that Action (the throwable projectile)
It helps that you have a situation where its unlikely that Player will have wildly different Pings as well.
Match Making ensures that doesnt happen
Especially region locked ones.
Yeah makes sense
So replication is going to generally be quick anyway
the other thing is - people sometimes talk about client predicting, server doing actual, and then "smoothing" the results together. That works if the target is far away, but if someone is standing right next to you, you can have weird scenarios of the client firing and hitting or missing, while the server is the opposite
There are nasty edge cases to solve for when predicting
yeah - exactly
I feel you only predict what you need to.
Otherwise avoid it.
Dont go around trying to predict everything
yep - what I've learnt recently is the feeling of instant is what players want. Not actually instant - they dont know/care
Yep
I'm doing it with my inventory system at the moment. There are sounds/pops and the feeling of it moving - but its not
and it feels great
Unless you are making so hyper competitive shooter that is garunteed to be a comercial success. Then dont bother making everything smooth and snappy. Only the things you absolutely need to avoid Players feeling like your game is clunky.
This applies to so many things it's not even funny
yep - doing it on my inventory system now - its when it dawned on me. There's a few earlier posts in discord searches from people like eXi, Kaos etc about prediction, issues, inventory etc that I realised
haha - and you as well it seems. I started using clumsy after reading this
and yeah - got it integrated into my CI/CD now so my multiplayer tests are using real lag. Its amazing
Yeah clumsy is dope, I've used it for maybe 6+ years at this point and it's never done wrong by me
big brain
Have you seen the "Sea of thieves" thing about multiplayer testing? Since they didnt release any code, I made my own, but improved for multible players and servers etc. So adding clumsy in means I can actually auto simulate.
Oh shit I haven't but that looks really nice
now I'm adding in "late join" tests for a 4th client - to auto check each step there are no late join issues as well - i.e. not replicating or domancy issues
Hey guys new UE learner here.
Im trying to add a day and night cycle that is replicated/multicast. I can get it to work by just having this logic in the level blueprint (Without the multicast) but i am not able reflect the same day/night changes simultaneously on 2 clients.
thanks - In Sea of Theieves they did "server/client".
But I made it so you write one scenario. So if you take common inventory example, Player One drops items, Player two picks up item.
Then you 'rotate' the listen server through 3 permunations. Player One is server, Player Two client. Then Player One is client, player 2 is server. Then a 3rd where player 1 and 2 are clients, and player 3 is the server watching from sideline.
and means you can also test having the server as both listen and dedicated on each test too (if your game supports both) etc
anyway - going ok so far - only way to pretend I have a team of 10 testers for one my lonely development stuff ๐
your sun/day/night whatever should be an actor, and just replicate it. So the server updates the actor, and the actor replicates. No need for multicast
i did lots of stuff w gauntlet in the past but many many times maintaining the tests became more annoying than just fixing the bugs as they came up
and often didn't catch specific stuff
yeah - so little secret - i'm not using gauntlet. Just editor and just runuat.bat stuff
i.e. super simple
it just worksโข
but network stuff sounds like a good candidate
I always found the most value out of performance testing
and some small amount of integration tests that are very targeted and specific
Using Automated Tests for Gameplay stuff is almost a waste of time.
Better for much more low level things
yeah
often never catches anything
Because you have to maintain not just the gameplay feature, but the tests that apply to it as well?
or is more work to maintain than the time it saves
Gameplay features can be iterated on like crazy
Ty!
yeap this is often the problem
that being said I do think it can work well if you KNOW you have an expected output, and that output is never going to change
If you have a decent QA pipeline you will pickup all the major stuff anyway
and then you can emulate the inputs
maybe - but for some common things it doesnt matter?
i.e. an inventory system. Drop item, pick up etc. There are just common "things" that are generic?
as soon as you start plugging your tests into calling functions rather than emulating inputs imo it borders on becoming a waste of time
Sure, but once you get those done and they arent going to change, is the test even worth having?
ya
so with ehnanced input - all tests run simulated keystrokes - so all input is "real" input as far as the controller is concerned
yeah, that's the way to go, those inject input functions are nice
yes, because then you can make fixes/issues later with confidence you didnt break half your other stuff.
i.e. you make inventory system early in game development, a year later you deploy, players report bug, you fix a key part of inventory code, and add a test for that specific isssue. You prevent regression on a known bug, and you know all the other base functions didnt break.
Tests slow you down at the start, but at the end you can move at lightening speed with safety
in early prototying it makes no sense - I agree
but once it gets locked down, the tests are just amazing
Personally, I am skeptical of the effectiveness of Automated Tests for most gameplay features. Im not going to try and convince you otherwise.
Its also a bit offtopic now.
yep - all good - each to their own.
hello, i want to ask, can unreal give ability to the player to host heir own server? like how minecraft does it?
what i mean is minecraft provide with player with the ability to host their own minecraft server and they can join it by put in the ip address and give them to other player to join that server..
like how minecraft have the server.jar thing?
thinking of going the valheim route of multiplayer with coop and the ability for player to host their own server
Unreal supports networking and you can have game run as a listen server (the host of the game is also playing) and you can also create a "Dedicated Server" package which runs headless (read: No visuals/no one is playing on that instance of the game but allows players to connect to it to play).
can I force a value to replicate again? Lets say an int value that a client changed locally but the server doesnt see that change so it wont re send the value, is there any way to force a value to resend without some kind of Client RPC from the server we need to make
I might be misunderstanding what you are asking but if the client changed something locally the server will never see it unless you call a server RPC. variables dont replicate from the client to the server, only server -> client
no I was asking if we can force the server to re-replicate a specific value even if it thinks the clients already have that value on the servers end
There's no way for the server to know what values the client has. The next time the value is set on the server, the value would be sent to the client.
If it's something not necessarily gameplay oriented, then you shouldn't worry too much about it as clients can freely change values on their end and it will only impact their end.
If it is something gameplay oriented, then the servers values are the ones that should be used rather than anything that the client has - if the client sends a value that is outside of what the server thinks it should be then maybe you have a point at which you could try re-setting the value so the clients receives the correct value.
This look nice, which framework are you using?
hi guys i have a problem with the equipping weapons and armor. When i equip the weapon the animations for equipping works but the mesh isn't visible for the client why?
Hey guys im still new to multiplayer, but im desperate to learn it.
So i have a simple logic for entering a heli, with a collisionbox to interact. Then my player is hidden, while im controlling the heli, i can then tp my hidden body over to wherever i drop out of the heli.
Blueprint Runtime Error: "Accessed None trying to read property CallFunc_GetController_ReturnValue_1". Node: Possess Graph: EventGraph Function: Execute Ubergraph BP First Person Character Blueprint: BP_FirstPersonCharacter
Not sure my replication is setup correct, but what i noticed is something is definetly wrong in either of these 2 blueprints. When i enter a heli with my server user its all fine and i can tp out just fine(With get player controller, but since thats an index i cant really use it, so i tried get controller, however when i go into the heli with my client and i go out, then my server user tp's to that spot, and my client is somehow stuck in the heli possess. I am asumeing there has to be a simple fix or easy reference to my client to get out, and not have my server user tp there?. I am still very new to Unreal Engine, let me know if there is any other info that will be usefull.
is it possible to connect windows client to a linux dedicated server?
yes
Thanks
would be pretty annoying if that didn't work since 99.9% of game servers are Linux
hmm, i was trying to pay for windows hosting, just found linux hostings are 50x cheaper ๐
Anyone seen this before? We have our game's objectives replicated in the GameState, it uses the "Text" data type. If a client joins mid game then whatever localization the host has, the client gets that translation instead of their own localization.
It's weird because the first 2 objectives are still in English for this client? Has anyone encountered similar or have a alterative solution?
Hi
Does anyone know how to deal with the following?
When I am testing my game with 300 emulated ping (with the PktLag command), the AI โโhit trace does not run well, the animation does, but the hit trace does not, and my character never takes damage
I know this probably needs to be fixed with lag compensation, but I never addressed the topic and was wondering if anyone had advice or any guide/documentation to follow.
Thanks in advance
hey guys!
Does anyone know how can i update those two bools i underlined from the update session node?
I'm trying to make a private lobby that can turn into a public one
Thanks to anybody who might answer!
username
Is the line trace being performed on the server?
Is playerstate spawn when map loading time or spawn by server?
Yes, also the cleaning, everything is executed with skeleton notifies, I just removed the notify that cleaned the strokes and now it works fine, I want to see if there is any way to optimize this
I will probably do a refactoring to the way to clean the array of hit enemies, I will wait for the server to find out about this, and when it finds out and applies the damage, clean the array
FTexts will be received localised as long as you don't do anything "lossy" with them on the server before sending, like .ToString
All of the logic from the GameState to the UserWidget uses FText, yet somehow the client renders the language of the host?
https://blueprintue.com/blueprint/_c0avfrl/ (Pickup Item - InvComp)
https://blueprintue.com/blueprint/qkbkm5dy/ (InventoryWidget)
well which would mean you are doing something lossy on the way but I obviously can't see your logic. not sure if this is likely to be different for BP, but texts serialise over the network as a history so the client will just know to look it up in the string table
Bump - could really use the help
can somebody help me with replicating a node named set skeletal mesh asset that when you change it will show it for every body in the game
?
Can someone help me pls?
Not sure if that's your issue, but you should not rely on VariableA in VariableBs OnRep.
If you need them to replicate together, put them into a Struct and replicate that.
You need to have a SkeletalMesh Variable that is marked as RepNotify.
Marking it as such will automatically create an OnRep_YourVariableName function.
You then need to ensure that you set the Variable on the Server.
In the OnRep_YourVariableName you can then use the Variablet o call SetSkeletalMesh on the Component.
thanks ut works
Help with this pls
if i follow this, i still need steam or not?
i want to port forward and use my IP to host for testing
how am I supposed to interpret this diagram
if you're behind a NAT, you can forward a port yeah
which you will be
and you can connect by IP with the null online subsystem
hmm, so in the client i have to put my ip in the executecommand node right?
when they click connect, they should connect to my IP, right?
well if you're fine with that then sure, I would probably just use a cheap VPS personally though
i don't want to upload the server.exe any where
if my game become popular, they will hand over it to hackers to make cheats for it
i don't trust any hosting company
lol misconceptions about cheating again
and VPS providers
giving out the IP of your home network is probably a bigger security risk
about cheats, i am sure they can do it easily and with 100% success rate if they have the server version of the game
about VPS, i chat with many companies, they are giving me full cpanel root access, so i should upload the game and execute it on their server
and i can use OpenVPN at home to fake my real IP address
cpanel? with a VPS like DigitalOcean or Vultr or whatever you just get SSH access and that's it
cpanel is pretty antiquated and pretty much used for web servers exclusively
yes because i wanna make a webiste also with wordpress
site will be used for stats etc
updates, news and much more
i also managed to host a website on my home ip address, using home server, so i decided to use everything locally
the issue is now to get a static ip address from my inet provider
because that dynamic changes oftenly , and the clients will not be able to connect to the new ip address
you bought a web server?
not a web server, its a server PC
can be used for web hosting, game hosting and more
I am about to do the same but not sure what server to buy (max money is 1100$)
but you still need a domain name that you buy
nope, you can use your home IP if you have that server
but you shouldn't
since the IP of your server is known for everyone on your website, and that IP is the same as yours..
not necessarily
you can use openvpn to protect it
That'll work
Any help with this?
even with a vpn running on your server constantly, it's not 100% Anti-proof
that might work idk
Great
its 100% guaranteed
no lol
else your site will down if the ip is not working
You can use Cloudflare tunnel and reverse proxy it. Best of both worlds. But probably also getting off topic now.
Itโs free
Where's your bind for your widgets to know when the inventory is updated?
but if you do that missty, will you be able to do other thing with your server?
Event dispatcher bind? On playercontroller
https://blueprintue.com/blueprint/g1cjl_3j/ (PlayerController)
I forget to send it
yes, that server is just a computer, you can many tasks, host multiplayer game, host site for it, you can even make currency system and host it for your game
Why bind it in the player controller at all if you have a reference in the widget itself and you can just have the widget bind to it?
But anyway...
Get rid of the OnInventoryChanged call here - you're calling to update on the completed after the loop again which could be causing it to jam up.
if there's a lot of https request, then it might not?
but then your webstuff would work but not other stuff (games)
in which case?
if your server do other stuff than web
It's better to bind it on widget?
It's best to be direct with what you're doing rather than jumping through hoops to do it.
use multiple ports, and this is where openvpn comes helpfull
Supposedly simple question I cant figure out, how do I communicate between players? as in, I just need to send an action to another player, this action is probably just a string. I tried using replicated events but I dont think it works.
wut
you can afford Cloudline CL3150 server in your budget
who the hell are Cloudline
what server do you have?
Computers can multitask and can run multiple server executables at once. If you're intending on hosting hundreds or thousands of people, you probably want to look at some dedicated hosting rather than using your own computer at home. For testing or your own small-scale use, a standard home PC can most often suffice.
so some old discontinued rack server
yeah they are cheap and functional
but a domain name for 3 $ do the same, right?
All a domain name does is gives you the ability of pointing a domain name to an IP address, not that it actually even does that for you.... If you're intending to do it all yourself, you'd need two DNS servers as well.
buying a rack server for some low traffic stuff seems overkill
it's for my own website lol
not low traffic stuff (could be)
how much bandwidth do you think a web server uses
So wh i have to called it?
and how many visitors are you anticipating to your site
You can host your own website on a raspberry pi...
1k / day
yeah. if it's all static content you can just host it for precisely $0 on github pages
that's low traffic
static content that I want to store data on my server
I want to store info on my server, would it work?
what kind of info
a lot of info about all clients and what they publish
Host a mp server on github pages 
Or host with something like heroku
So here's the thing.... Rather than destroying and recreating the widgets for all your slots each time you want to update them, you could actually tell your slot widgets which index of your inventory array they care about. So if you were to bind within them, when they receive the signal you could have them read their index of your inventory array and refresh themselves.
You also have Playfab which might be a better fit
It's really dependent on what data exactly you want to store, who you want to be able to mutate/read/delete it, how much control you have
this turned into a webhosting discussion somehow
Don't use Unreal's networking system. Instead keep the gamestate updated on GitHub. Have clients constantly ping the github for the state.
a bit vague, but that's getting into backends. a BaaS like Playfab (like previously mentioned) might be more appropriate, especially if you don't know what you're doing
but if you really want to get into it, Unreal has a HTTP client
you might see people who definitely don't know what they're doing trying to integrate an SQL client library into Unreal
so what would I do? buy a server and put the web stuff and the data getting there?
I personally use MongoDB as a simple backend for room codes, with a heroku hosted nodejs API with UE's VaRest plugin to communicate
Not even buy a server, could just rent it as needed
a cheap VPS will do it, or heroku, or the AWS/Azure free tier
but I want to store multiple TB (20 ++)
you need a server application written in .NET/Node/PHP/whatever that implements some API that your game client can call
how did you calculate that
I was going to say, multiple TB for 1K visits/day seems excessive
you should start with a smaller server that can scale
I searched on google and found information about it
delightfully vague again
pictures are going to be stored, meanjing that it's pretty big
If you want to go through the headache of Imgur API, you could use that. This way, rather than store the images directly, you store the URL to the image on Imgur
I'm already doing that for videos, doing that for pictures would make my website fail
20TB is like 2.5 million 32-bit 1080p images.
I don't think you'll be curating that.
but also some text for the player's info, the name, and a lot of these
yee
Perspective... If you stored a lot of information about a single player, 10KB is quite a bit of data... 20TB would allow you to have player data for 1/3 of the world's population.
ye, that's not what I'm worrying about, it's more about pictures
Again.... 2.5 MILLION images.
Assuming you had even 1k people uploading a single photo every day, that would take you 2500 days to fill. 2500 days = 6.8 years.
So... What're you trying to do?
okkk
Why that much amount of images?
hehe
Theory: what if you compress them but also gotta decompress reallyyy fast
It's just that Cat isn't doing the math needed to properly estimate usage needs. They researched a bit on google and found suggestions to have 20TB of storage - I'm just trying to give them some perspective of how many images that actually is.
And yea I'm talking like uncompressed 32bit 1080p images.
Could jam even more in if really needed, but that's not the point - it's more that it's a rediculous amount of space to begin with.
how would it impact storage when compressed
Yeah he gotta think about how much he really needs
I wouldn't roll my own image hosting site/API if I didn't know what I was doing
Well compressed is less space right
you would suggest me then to use imgur? it's for learning and making money purposes
well at least learn the basics of web hosting, REST, serverside technologies like ASP.NET/Node, and the HTTP client API that exists inside Unreal
you don't have to be handling images to figure that out
.NET is a complete other language tho
C# is yes, Node is Javascript
you're very seldom going to be writing a backend in C++
more than a week but no
but you have to know the concepts of what makes up a REST API
it's simple, it's the opposite of unreal's API, it's alone and you work with it
what
like a singletone
so I need to learn about .NET and JavaScript, what about HTML and Java?
It works! Thx
because apparenty, C++ is not a good backend
HTML yeah if you're actually making a website
but yeah since you have no idea on even the basics then I would suggest starting extremely simple
that's my goal ye
It may come to your surprise that C++ can not be used for everything.
it's sad for me
I know that an html file can be created from anywhere (I already tried the other day)
new plan, it will be imgur
Fun fact, image hosting is so damn expensive that Discord stopped doing that.
At least on a permanent basis
this is basic stuff, learning about HTML and how web servers work
depends for who ig
you will need to know it if you want to implement any kind of game backend
what servers would you recommand me to start with? (under 800$ & 1TB min)
wdym with servers then?
You don't make money by spending money, especially frivolously. You can always start small, and if doing well, scale up as needed (hard drives are usually one of the easiest things to upgrade in a computer). If you get to the point of needing tons of storage space and you require better hosting, then it's time to move away from using a home server, and by that point you should already be making enough money to support said hosting. If not, then there's likely something wrong with your business model.
There's even more to consider if you're actually trying to make a business-class server run on your home network:
- Power Outages (A UPS can cover this, which is more $$$)
- Internet Outages (No hosting while your internet is down at home)
- Power costs (A computer running 24/7 even a lower energy one can still run up like $0.20 per day or $6/month easily).
- Network security (you're hosting on your home network, someone with enough know-how can get in, and could potentially really mess with you and your "business").
- Computer Maintenance / Updates (Sometimes hardware can fail)
- RAIDing your drives for redundancy (you're gunna lose everything without backups! RAID is the way to offset this problem, but that effectively cuts down your total amount of available space)
Like websites you can host at?
will spam again since sages are present, sending message (string) to another player, cant make replicated events to work, any ideas.
Share code, otherwise can't help
no, to store the player's info
so when he comes back, he doesn't lose his things
Space bar only triggers locally, and running on owning client on the player controller would only run on the client that pressed the spacebar.
I don't think anyone here can really recommend something. You can use pre-made things like Playfab, which was said already, or code your own.
I see, so how should I set it up so when any player presses a key both players get notified?.
If you don't use PlayFab (which costs money of course) you still need to rent a (possibly multiple) server to actually run the backend and database on.
Which still costs money
How much? No clue. Compute cost and storage are wildly different in cost
what the hell is all thgat
I'm talking about a physical server
You'd have to RPC to the server, and the server has to replicate it out to the other clients via a multicast, however, it can't be done on the playercontroller as the playercontroller only exists on the owning client and on the server, so you'd have to do send the multicast on a different replicated actor.
The Physical Server alone doesn't do much for you
Also no one really gets physical servers anymore now-a-days. You rent a cloud one.
The upkeep cost and problems of having your own physical server are just not worth it
but cloud one are expensive, long term
(Which is what I was pointing out)
any actor? or is there a preferred actor, like gamestate.
Buddy, you do understand that all of this is going to be expensive, right?
There is no path here that won't cost you money
If you don't have the money, choose a different project
an on-prem server costs money
For small scale and testing, a home computer is fine. Scaling it up for business use means you get it hosted by someone else.
and you still have running costs from internet and electricity
Even your own physical server costs money. The storage costs money to buy, the hardware in general does too. The power cost is also expensive.
I dont have to worry about that here
And then the bandwidth that your network needs to have to even handle the data
well if you have a consumer ISP then they'll probably get mad at you for hosting a web server
Any replicated actor, it depends on what you need to do with the message and how it relates to the message you're trying to send.
Consumer ISPs are traditionally not allowing business hosted servers
That is absolutely correct
so then you'll have to upgrade to a business ISP
20$/month, for 1TB
For people that can't afford much at the start, it's best to either simply not do it, or to use a service that scales for you
so I'd have 1 year free for google cloud
It will be pricier in the end, but cheaper at the start
ok thx for everyone's help, I'll learn new languages!
btw, I want a physical server just to learn things on my own and be able to actually see why it works or not and fix it by myslef, that's how I learn...
Yeah but that server will cost you in hardware
And the ISP limitation may still apply
a cloud/VPS server doesn't stop you from finding out why things go wrong
unless there are physical issues with the server, but that's not really relevant for software development side of things
if all I care about is networking (matchmaking, keep units in sync, etc) would the free tier of Amazon be useful for a very small project?. ballpark.
If all you care about is that, host the Server locally or use listen servers I guess
is using listen servers like the old P2P models from the past
so less hackable
The host can still hack
no? it's more hackable since the host is the server
you might still see "p2p" though because Steam and EOS allow you to use their p2p service essentially as a NAT punchthrough
If you don't want cheaters, then DediServer, but you can host it locally for now.
Matchmaking, however, if you mean the traditional Fortnite, OW, CS matchmaking, requires a backend and more to handle though and then the S erver would ultimately need to sit on something that spins up and down servers on demand
And at that point I'm not sure abut the free tier anymore, especially if you would need to code said matchmaking system and backend yourself first
think of chess, but with more stuff (units, etc), and a simple match making.
Does fornite use Dedicated server? (I'm curious)
The simplest matchmaking is a ServerList provided by something like EGS or Steam.
With pre-hosted Servers
Yes.
If you want Servers to be spun up for matches that are requested, you are back at what I just explained.
@lost inlet sorry for the ping but you told me to learn about JavaScript, does that include JSON files?
JSON files are unrelated to JavaScript. You should possibly learn about them either way.
though Javascript is not my first choice, JSON is used by almost every REST API out there as a data format
I thought it was replaced by YAML
The truth is that once you learned JavaScript, you will be bombarded with people telling you to learn TypeScript
And then the next best blog post tells you that Go is way better
Choose your poison I guess
what's your first choice?
C#
which is front end? (C# + .NET + HTML)
C# can be used to create Backend stuff, but also Frontends
Hello I want to know that how can i make lobby host on dedicated servers. Like I have seen many video's on YouTube which make lobby system but they use play as listen server. In which they first create the session and then the lobby works but in dedicated server there is no need to create session so i wanted to know that in that scenario how will the client become a host and be able to invite players to his lobby and also able to start the match
You dont? That would be a listen server. Unless you mean a waiting screen or game start screen
if your talking something like fortnite
you have a party, invite players to party then all join the same server on a team
Yeah like in pubg Or cod
yeah that would be a party system
So the client is on server?
So every player who starts the game has created a personal dedicated server for him to invite players to his party?
Is it like that?
no
steam has a party system
perhaps look there if you are wanting steam
but it will depend on your subsystem
No I'm not wanting steam that's the main problem
what are you using?
Also I wanna first test my party/lobby system of how it works in unreal engine play as a client
As far as I know pubg doesn't use steam so maybe they there own party system
You want to use some kind of online subsystem that has a lobby/party system built into it. You get the clients together that want to play first using those online subsystems, and then when they're ready you'd launch a dedicated server for them to connect to.
There's no connection of the clients to a game server before the game server is launched.
My project is for mobile so I'm not sure if steam gonna work on mobile or not
it will not
Hmm that is it
I see
The online subsystem sends out messages to anyone "subscribed" to the particular lobby, and those clients can then display the data of the lobby locally.
Does aws has its own party system?
Oh then I have to get a subsystem first to make anything work
I'm pretty sure it's hard ๐ข
That's the idea. Basically you'd be getting the clients a means to communicate to each other before connecting to an actual game server and then having a means to communicate to those clients the details of the game server that was launched for them so they can connect to it.
What system or how does they are able to. Make a party system on Android
Oh
harder than using a system that does it for you yes
Not going to lie - I have really been enjoying using Blazor.
There are so many different ways to create Apps, especially for Web, it's not even fun anymore.
And I mean that, it's not fun. xD
It isn't and that's primarily why I haven't put much time into doing my company's site ๐
But this is the world we live in.
Nothin' stopping you from just using HTML/CSS/JS raw though
I learned so many frameworks in the past 5 or so years. All of them were just not fun to use or had serious draw-backs
Latest one was Avalonia for the frontend
I'd only use that for desktop personally
Yeah speaking generally platform frameworks, not just webdev
I think for WebDev I mostly used plain old React
May it be good or not, there are so many hard fronts on what stuff is good and bad on the net, it's not even worth engaging such discussions
All I can say is that I've been fairly satisfied with Blazor thus far. Has been more enjoyable than other frameworks I've used.
It's best to just use what works for one-self. The only really bad thing about all of this is that if you wanna find some tutorials or guidelines, you'll find 100 different opinions and none of them is really good or bad.
Anyone with knowledge of UE replication internals? I want to know how UE detects value changes for replicated variables.
Does it poll all replicated variables for value changes every frame or is there some other change detection mechanism?
Ohh okay, I guessed as much. Thanks
It tries every frame, but based on the NetUpdateFrequency and some other "variables", it may not process a given Actor that frame.
In C++ (not sure about BPs), you can opt into PushBased replication, where you mark the property dirty when setting it, so the Engine doesn#t need to figure this out itself.
That's only relevant for the "figure out" part though. The frequency stuff remains.
By figure out you mean if anything changed in the struct/variable?
Yeah
Alright. I've got it now. Thanks
A detailed description of low-level Actor replication in Unreal Engine.
Does manually setting dirty can save performance ?
I am having some difficulties debugging a RepNotify delay I experience on the client. I am using blueprints.
Here is the sequence of events and description of the issue:
- Local
PlayerControllercalls a Server Event that setsPlayerState.IsReady = true. PlayerState.OnRep_IsReady()triggers (via event dispatcher)GameModeto setGameState.AllPlayersReady = true.PlayerState.OnRep_IsReady()triggers (via event dispatcher)PlayerStateWidgetto update the player state ready icon.GameState.OnRep_AllPlayersReady()triggers (via event dispatcher)GameStateWidgetto update the all players ready icon.
The problem is that the GameStateWidget updates almost a second earlier than the PlayerStateWidget.
This means that GameState.OnRep_AllPlayersReady() gets called before PlayerState.OnRep_IsReady(), which doesn't make sense to me.
Lower UpdateFrequency on the PlayerState than GameState?
Also, not really necessary to have the GameState replicate AllPlayersReady anyway. You can loop through the playerarray from the gamestate and check locally when you receive the PlayerState OnRep.
Indeed it was significantly lower!
This solved the problem, thank you
I simplified my example. In reality, I am replicating a timer's seconds remaining.
Keep mind that it's theoretically way easier to replicate the EndTimestamp of a Timer once, and letting everyone calculate the remaining time themselves.
That more or less requires a somewhat more accurate NetSynced Clock, but the default Time works for most applications that are just visual
These change how often per second it's checking.
The downside is that PlayerState is always relevant, so increasing the frequency can be detrimental to network performance if used on a PlayerState that will be used in the game. Though it does look like you can change this at runtime too.
I'm really confused, it seems like none of the options in the networking section of the Character Movement Component are smoothening out corrections. I just want to prevent a larger correction from being so jarring.
So I tried doing it manually but not much luck so far. What I did manually:
void ULPlayerCharacterMovementComponent::TickComponent(float DeltaTime, enum ELevelTick TickType, FActorComponentTickFunction *ThisTickFunction)
{
Super::TickComponent(DeltaTime, TickType, ThisTickFunction);
if (CharacterOwner && CharacterOwner->IsLocallyControlled())
{
SmoothAdjustOwnerMesh(DeltaTime);
}
}
void ULPlayerCharacterMovementComponent::ClientAdjustPosition_Implementation(float TimeStamp, FVector NewLoc, FVector NewVel, UPrimitiveComponent* NewBase, FName NewBaseBoneName, bool bHasBase, bool bBaseRelativePosition, uint8 ServerMovementMode, TOptional<FRotator> OptionalRotation)
{
if (CharacterOwner)
{
if (USkeletalMeshComponent* Mesh = CharacterOwner->GetMesh())
{
const FVector MeshLocationBefore = Mesh->GetComponentLocation();
Super::ClientAdjustPosition_Implementation(TimeStamp, NewLoc, NewVel, NewBase, NewBaseBoneName, bHasBase, bBaseRelativePosition, ServerMovementMode, OptionalRotation);
// move the mesh back to where it was before the adjustment
Mesh->SetWorldLocation(MeshLocationBefore);
}
}
}
void ULPlayerCharacterMovementComponent::SmoothAdjustOwnerMesh(float DeltaTime)
{
if (CharacterOwner)
{
if (USkeletalMeshComponent* Mesh = CharacterOwner->GetMesh())
{
const FVector RelativePos = Mesh->GetRelativeLocation();
if (RelativePos.IsNearlyZero() == false)
{
Mesh->SetRelativeLocation(FMath::VInterpTo(RelativePos, FVector::ZeroVector, DeltaTime, 5.0f));
}
}
}
}```
Any pointers?
And by large correction we're talking about half a meter
I'm a little surprised my "solution" isn't working, I've done this plenty of times when building my own character movement in other engines. So I'm not sure if I'm tired or missing some specific Unreal thing.
It's my understanding ClientAdjustPosition() is where reconciliation happens.
So I figure, cache the mesh position before moving. Then, I expect it to have moved (world) when calling Super. So I want to move it back. I assume when I do that, it's relative position is no longer at zero, and then over time lerp it's relative position back to zero.
But it causes crazy jitter, so I must be fighting with some other mechanic
Seems like the relative smoothness is working as expected, I think the problematic area is. This is jerking in the direction the character is moving.
const FVector MeshLocationBefore = Mesh->GetComponentLocation();
Super::ClientAdjustPosition_Implementation(TimeStamp, NewLoc, NewVel, NewBase, NewBaseBoneName, bHasBase, bBaseRelativePosition, ServerMovementMode, OptionalRotation);
// move the mesh back to where it was before the adjustment
Mesh->SetWorldLocation(MeshLocationBefore);
I have another quick question. Does the replication system store a list of the last replicated values for each rep_var? So it can perform the value change detection?
What is the deal with Iris? I have been really hyped about sending data to clients on another thread, but there hasn't been any commit to IrisCore for more than 2 months.
Does anybody know when/if Iris is coming in more friendly way to people who don't have access to the UDN documentation?
Err, what does that have to do with sending data on another thread
Iris threading isn't about exposing RPCs or other operations to other threads, it's about paralellizing the process of figuring out what needs to be sent and serialization after that data has already been set.
I guess if you constructed your own custom fragments and didn't rely on UObjects it might be possible but I don't think that's their target, nor is there any documentation anywhere about it.
Damn, my apologies. From reading the source I thought it works by taking a snapshot of the game state at the end of the tick, which then gets distributed to clients on separate thread.
In theory it does something like that (though not how you described), yes.
But that is different from sending data yourself on different threads
the point is iris' own processing of data (and part of custom serialization) can be threaded, not that your data is.
I need help, appareciate it if someone could give me guidance what am i doing wrong here
Absolutely, atm in my experimental project about 90% of the server CPU time is spent just sending the game state to clients at the end of the tick. Thank you for clarifying.
and iris is already way faster than the old netdriver
without even threading anything
Any tips on getting started with Iris, not gonna lie, I am reading the code but there is quite a lot of it.
most user-facing code needs no changes to use iris
aside from relevancy and prioritization, which are almost strictly incompatible with the old system (with a few shims for the basic only relevant to owner and cull distance options).
Also custom serialization which requires writing serializers in a very different way, but most uses for custom serialization are unnecessary in iris.
I have read that several times, sadly it doesn't go too much in depth.
Do you know by any chance if "FastPath" from RepGraph is also present in Iris?
repgraph doesn't exist in iris whatsoever
I meant just the concept of it. I see a lot of stuff like the spatial prioritisation, limiters. etc taken from RepGraph. (Probably "taken from" is not right term, but they share the same concepts)
Hello, if I have a replicated UObject, are its BP properties going to replicate as well? Its C++ properties are replicating correctly, but the BP ones are not replicating at all
there's no such thing as "fast path" for iris, it's unnecessary.
nvm I should do this
virtual void GetLifetimeReplicatedProps(TArray<FLifetimeProperty>& OutLifetimeProps) const override
{
// Add any Blueprint properties
// This is not required if you do not want the class to be "Blueprintable"
if (const UBlueprintGeneratedClass* BPClass = Cast<UBlueprintGeneratedClass>(GetClass()))
{
BPClass->GetLifetimeBlueprintReplicationList(OutLifetimeProps);
}
}
how much Ram is recommended to run a Dedicated Linux Server?
Im new to multiplayer, I dont know how to replicate properly
I thought this worked but clients dont see the crouch being replicated properly
server sees everything fine
Seems like I solved my problem!!!
So I was wrong, reconciliation happens over two main methods: ClientAdjustPosition_Implementation() and then ClientUpdatePositionAfterServerUpdate()
So I cache the mesh location in ClientAdjustPosition_Implementation() then I re-adjust it in ClientUpdatePositionAfterServerUpdate()
Entirely depends on the game! I have an arena shooter that I host on 1GB of RAM just fine
and thats likely more than it needs
Verify if clients are receiving the Multicast by doing a print
Also, for Server->Client communication for something like this, I recommend instead using a replicated property IsCrouched, then have an OnRep. I am not super familiar with Blueprints but should be possible.
Im not sure what an OnRep is
Its a notification for when a replicated variable is received on the client
Oh Thank you
Hey, im currently confused about gamemode/playercontroller/.... between lobby and game. Maybe someone already made his/her mind up about this problem and can help ^^
Option A)
Use the same classes for both and care about splitting the functionality inside each class
Option B)
Use different playercontroller, but keep things like playerstate/gamestate to keep track of settings from the lobby
Option C)
Make seperate versions for all such classes and manage passing data somewhere else
Mainly confused because I saw multiple gamemodes in one tutorial, while the multiplayer compendium says gamemode+all controllers are persistent by default (why not the states instead where the info is stored?)
A bit late, but reading though the Iris code I found where exactly this is happening. Or at least where is the buffer.
/**
* ReplicationState created at runtime using a descriptor built from existing reflection data
* StateBuffer contains storage for all properties described by the descriptor,
* When polling data from the source object properties we will compare the value with what we have stored in the statebuffer
* and mark the member as dirty.if the value differs
*
* Polling is quite expensive but we only do it once per update of the replication system
*/
The buffer itself is in FPropertyReplicationState-> uint8* StateBuffer
Hope this helps, even though it's Iris
This exists for every connection
Thanks, its quite helpful.
In general, how difficult is it to transition a dedicated server project built in the Games Store version of Editor to a compiled version to start building and testing? I don't want to go through the process of compiling from source yet, as I'm still learning, but I don't want to get neck deep in something I like and then have to spend weeks moving the project over to a compiled editor. I imagine it's as simple as just opening the project in the compiled editor, but I'd like to be sure...
Repnotify in blueprints
If you arent making a major jump in Engine Version, using a Source Build is almost identical to the Installed Build from the Launcher.
So to answer your question directly, you shouldnt have much if any trouble.
I'm curious of the same but converting a launcher version to source unreal build?
The project has barely anything in it but would moving the assets to the source version just be copying and pasting?
You just right click on the uproject file and change the engine from launcher to compiled source
Itโs instant if youโve compiled the engine.
Just open the Project in the new Engine
Ah okay thanks.
Hi, I am having a problem in MAC, when I run the build-cook-package command, the project builds successfully, but when I open the Server or the client, I get LogPluginErrors:
For server it is: Unable to load plugin 'variantmanagercontent'
For client it is: Unable to load plugin 'RigVM'
can someone help me understand where the problem could be?
Thank you
Have you checked those plugins to see if Mac is on their allowed list?
Open the uplugin files and have a look.
Iโm a bit new to this, can you tell me where can I find this ?
It'll be a .uplugin file in the engine directory somewhere.
Probably rigvm.uplugin and variantmanagercontent.uplugin
Iโll check now there, Iโve checked in the unreal editor and both these plugins are checked
Doesn't mean they will build/work on mac.
If you're using them on mac right now, then maybe you're fine! I don't know.
You can also try #packaging
Yeah, never mind, it's not a uplugin issue.
Thank you!
Hi! Is it fine to broadcast delegates on a client from the server via RPCs? Or there could be a better way of doing such things?
XY problem right there. What are you trying to do?
there's nothing wrong with having an RPC trigger a delegate other things can listen to, plenty of stuff that does effectively just that
although the question definitely looks like "why would you need to ask if it's okay to do that? what are you actually doing?"
So i have a main HUD widget, which contains a child "death panel" widget. I want to set up a system that will pop-up this panel and set its content (killer name, weapon name, etc.) when player dies, and fade out after respawn. I thought that delegates are a good way to do this
I know that RPCs are fine for this, just wanted for some more experienced people to tell if I'm moving in the right direction or there's some better approach
like a kill-feed kind of thing?
So, to be clear, when the server detects a player has died, you want the server to tell the dead player who killed them and with what?
Yup. Exactly this
You could use an RPC for that, yup.
If you want that kill feed to go out to everyone, a multicast one is fine.
It's one of those few cases were multicasts are probably a good approach.
No, only for the player that died
Then, sure, just use an rpc.
The alternative is to set a value on the player's pawn or player state. Then use an OnRep to trigger the hud element.
Ah, i guess rpcs will work fine. Thank you very much guys!
running: sudo apt install lib32gcc1 steamcmd givies me this error
any idea whats wrong?
or which service i should be restarting?
Sorry im late with this, I set it up and nothing pops up. Im not sure how its supposed to act
Explain more?
Put a print string in the generated OnRep function or look for the behavior that you programmed into it.
Bp debugger or print string. When you set a variable to repnotify it creates a function that runs on server and clients
But only called if the value changes from what it was before.
I found it, thank you very much
It looks like they are, I made a boolean variable for if theyre crouching and used that in the animation blueprint. The jitters only appear on client screens if they see someone crouch and move, so Im not sure if that has anything to do with whats going on
I made a video showing whats happening. The server sees everyone fine, but all the clients see crouch walking wierdly including on the server
The red text is an OnRep notify
Im not sure why it calls true 5 times (4 clients and 1 server)
When I have 2 players it calls 3 (2 clients and 1 server)
where is this occuring? just get the client to run the same line locally
You're setting a replicated variable on a multicast. Just set on server and do the crouch function in the on rep
I think I got it all figured out, no more errors
It runs on the server and the client, and instead of using Unreals crouch I just slowed down the player and gave them the crouch animation
But thank you very much for the help, I still dont fully understand how or why it works
Can anyone confirm if Replicated variables will be replicated once all replicated actors are spawned on client side?
Not sure what you mean.
They won't.
So Server replicates actors first
Then all the data?
no
Actor then its data?
also no
then?
Data and actor?
no
Ran out of combinations I think
there is no guarantee when replicated properties are received (outside of InitialOnly which can only come with the initial bunch)
there's no specific time when you've received all replicated properties
that's an impossibility - properties can be constantly changing, there's no way to guarantee when you've received all of them.
What about race conditions?
If inventory data is replicated before the actors?
you can't receive properties for an object you don't know about
that data would simply get dropped, and likely resent later. Though it's unlikely the server would even send you data for an actor you know nothing about.
I'm sending Actor pointers for each item in the handbar, they are all spawned
I've been trying to learn multiplayer code a little bit better so I'm doing some test mechanics, and my character jitters a lot on local clients while changing the direction of their velocity (Server doesn't jitter, and they don't look like they're jittering to eachother.)
I assumed it had something to do with the network smoothing mode, but when I tried setting it to linear/disabled I saw no difference so any info on why this might be happening would be appreciated!
Why setting bool on server and not be replicated?
Would be better if you had enhanced input too then wouldn't need tick
Oh it's just a test. I was trying to figure out sending input across network, but then I saw the jittering & didn't understand why that'd happen from enabling/disabling a bool.
it has to do with unreals networking setup for the cmc, it uses FSavedMove snapshots of clients information to replay it on other clients, you get issues when you have something that is modifying the movement input but isnt being saved and replayed so you end up with desync on clients and servers.
You need to look into either A how to change to the already existing flying mode or B look into custom movement modes in order to replicate state appropriately
And probably should be multicasting the force
This is bad advice tbh
Also probably true
I see! I thought I had fixed it by running the same logic on the local client's proxy since it got rid of the jitter, but when I tested it with latency it had jitter again lol
Ty both for the info. I'll read through the CMC docs in a bit, but have you had much experience with the new mover system? I haven't seen much on it, but I'm wondering if that might be a better option.
I havent but I do intend to use it for my project very soon. I think they both have their cons, mainly cmc is older but tested and mover is still experimental (even though I heard its fine from someone using it, just need to change a few ini values) with less info on it.
On Youtube there is a guy by the name of delgoodie, he has a nice intro series to extending the cmc an proving a new movement mode (its c++ if that doesn't bother you, you will need to learn it eventually)
I am reading the source for Iris and I don't understand what is the point of having more than one replication system object instanced?
There is a hardcoded limit of 16, what benefit would it bring to have more than 1?
enum ReplicationSystemConstants : uint32
{
MaxReplicationSystemCount = 16,
};
How can I get ragdoll poses and positions to sync?
If we want to use EOS, should we use Online Subsystem EOS? It is marked as beta.
I am developing a MOBA game (5v5 or more) in Unreal Engine and considering using the Unreal Iris and Replication Graph plugins. My game's replication requirements include abilities, attributes, and other similar objects. Are these plugins recommended for my project? How well do they handle the specific replication needs of a MOBA game?
Yes
There is basically no docs for Iris, so depends how much you are willing to read the source to use it.
RepGraph is definitely a good way do replication for Moba, you can easily create nodes for team-wide relevancy and other handy nodes...
Imo, Iris seems to be the successor to RepGraph, with a lot of concepts transfered over, but it's more complex and less mature than RepGraph.
I have a function in my GameMode that I want to call as soon as the player is joined. At the moment everything is working normally with the host, but not really with the clients. If I want to call a function then it only works with a delay of 3 seconds between OnPostLogin and the function itself, when the delay is connected everything works normally. But of course it could be in the future that the 3 seconds are not enough. I have also tried it in the Beginplay function of the controller, but that also only works after 3 seconds. How do you deal with such errors?
Use OnPossess
Iris seems pretty neat, but i saw a message in this channel the other day saying it doesn't do custom struct serialization.. is that true?
Give me 5 mins, I can try it
Do you mean custom serialization of a custom struct or default serialization of a custom struct?
Aka, just replicate your own USTRUCT or some advanced serialisation of them?
custom serialization with a struct that contains NetSerialize
who said it? if it was Snaps or one of the other regular experts in this channel who've been playing around with it - I'd trust what they say pretty high
I vageuly remember, I think it was Snaps, saying it was difficult to use or something, dont recall them saying it wasnt possible though
oh it seems i misremembered.. it was Siliex but he said it requires writing them in a very different way
not that they dont work
So I did this for testing
USTRUCT(BlueprintType)
struct FMySimpleStruct
{
GENERATED_BODY()
public:
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "SimpleStruct")
float MyFloat;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "SimpleStruct")
FString MyString;
// Custom network serialization method
bool NetSerialize(FArchive& Ar, UPackageMap* Map, bool& bOutSuccess)
{
FString TempString = FString("Custom_") + MyString;
float TempFloat = MyFloat + 1000.0f;
if (Ar.IsSaving())
{
Ar << TempFloat;
Ar << TempString;
}
else {
Ar << MyFloat;
Ar << MyString;
}
bOutSuccess = true;
return true;
}
};
And getting
LogIris: Warning: Generating descriptor for struct MySimpleStruct that has custom serialization.
and client receives it without the modifications in the NetSerialize.
Two options, I have messed up the NetSerialize or Iris actually ignores custom serialization.
so yea they are just different
Speaking of Iris, I have been in debugger last couple of days and I still can't figure out the official way to create and register custom stuff, such as Filters.
Does anybody know how to create and use custom components, such as filters?
I got to
+FilterConfigs=(ClassName=/Script/Engine.Actor, DynamicFilterName=None))
+FilterConfigs=(ClassName=/Script/Engine.Pawn, DynamicFilterName=Spatial))
But where do I map the "None" and "Spatial" to actual UNetObjectFilter is beyond me.
In the level editor I can set my net mode to Listen Server and have multiple clients playing the game simultaneously. If I were to package the game and run the client executable, how would I get those clients playing together?
In a standalone or listen server window I can F8, click on an object, and inspect its properties while the game is running. Is there any way to do that for an object in a second player's window though? I'm trying to debug replication problems and would like to inspect the object from the viewpoint of a remote player rather than from the server
Can you build a dedicated server game that has a standalone play option?
That doesn't really make sense since the definitions of the two things are mutually exclusive. What you would want to do instead is the package your game two different ways: one as a standalone game (that I assume you would also have support hosted sessions for multiplayer) and a second package as a dedicated server.
One of the executables needs to host a server and the second one needs to connect to it using for example command line open 127.0.0.1:port
I'm sure I could make a new build target for a dedi, but I'm more curious as to the underlying commands. Basically, what is the level editor doing that I am not?
Right, so the game is just 3player co-op, but can be solo'd, and would like the solo portion to be available "offline" if possible. But I'm seeing that that probably requires it's own build, so basically 2 separate games.
Maybe just including the server in the package to run on owning machine for solo play, so if they want offline they run their own local server
If you just want to have 3 player coop I don't see why you would even want to set up a dedicated server in the first place. Just use the built it ability to host a session that other players can join
In that mode the game runs both as server and a client for the local player at the same time
Yes but I lose access to stat tracking and global user repositories for cosmetics and whatnot.
Offline mode's main intention is just aim practice.
Do you know of a console command to determine the port of a particular client?
All clients connect to the same port. It's not that each clients gets a custom port. The default is 7777 but can be changed either in code, defaultengine.ini or launch variable
Well strictly speaking each client uses it's own choice of outgoing port, but I don't think that's whats Zeph means. Maybe?
Generalizing on my question above #multiplayer message what are good techniques for debugging replication issues in general?
I am not aware of the level editor having any sort of reverse proxy set up, so I'm assuming there's some way it keeps track of what client is doing what.
Replication Graph uses a decent amount command line prints to debug most of the features. Nothing pretty but functional. I see similar trend in Iris, but I am just learning that one.
Build in plugin. You have few choices how to handle your networking logic. You can go with the default replication or choose Replication Graph or even Iris.
I see. I've heard of Iris and seen references to it the source but haven't seen any docs on it so have been ignoring it for now
It is basically undocumented, but Replication Graph is relatively well documented with examples in Lyra and BasicReplicationGraph.h
You need [/Script/IrisCore.NetObjectPrioritizerDefinitions] and [/Script/IrisCore.NetObjectFilterDefinitions] sections in your config to define prioritizers/filters.
Thanks! I got that, but UNetObjectFilter is not exposed and neither is UNetObjectFilterConfig. Is the idea to just shove everything to IrisCore?
It has all of the functions exposed, but not the class itself, which is pretty weird to me as it is meant to be subclassed no?
Only if you want to make a custom filter
there's already a built-in spatial filter
and generally you don't want to make custom filters if you can help it - they are very complicated.
I want to create a team-based filter, the same one that would be team-node in RepGraph
netgroups often fill the gap for stuff not needing spatial filters
yeah you wouldn't use a filter for that
you'd use a group
Look at UReplicationSystem - search for "exclusionfilter" and "inclusionfilter"
you can create groups to include/exclude objects from connections on the fly
Thanks for the pointer, still trying to wrap my head Iris.
What is a correct way to interact with UReplicationSystem, for example if I wanted to add the groups. Is subclassing the Actor Bridge the way to do it and encapsulating the logic there? Or a Subsystem and do it OnInit?
you should not be subclassing any of that
you can create/update/whatever groups from wherever you want
And for a custom Filter I would rewrite the UNetObjectFilter source to expose it, but avoid it as much as possible. I will give the groups a try, hopefully I will have more luck than with filters
So by default (without rewriting code)
[/Script/IrisCore.NetObjectPrioritizerDefinitions] is useless right?
(apart the 2 defaut ones)
unless you want to write your own prioritizer. There are more than the default ones available too.
But you need to edit the source of IrisCore for that right? class UNetObjectPrioritizer : public UObject No expose on Prioritizers either
Thanks, much clearer now. Any idea why would they not expose it? Seems like Prioritizers and Filters are meant to be written custom for game itself.
because they didn't think about it
there are a ton of classes in the engine that are missing MinimalAPI that should have it.
but for most use-cases the existing prioritizers and filters are good enough
So I've got a strange problem. I'm changing the pawn I'm possessing, works perfectly fine on the server, but the client (who actually starts to use the new pawn) doesn't get OnRep_Controller called and the Pawn's controller in AcknowledgePosession is always null. It's odd.
The even stranger thing is that I have a log line in OnRep_Controller and it does get fired when the client connects. But never again. Any ideas?
Changing as in going from one Pawn to another runtime?
Correct. Right now it's just in PIE (With run under 1 process turned off)
The pawn sent to acknowledge possession is correct, but the pawn, during that call, has no controller assigned.
And the OnRep_Controller for that pawn is never fired. Ever.
It is fired once for the original pawn on connection. But re-possessing it again doesn't cause it to fire.
I'm thinking now it may be some kind of ownership issue because the pawn's controller is replicated before the ownership is changed or somehing.
Wasn't there some weird setup where Epic sets some Variables for Controller or Pawn from 2 different places, potentially causing the OnRep to not call cause it's already been set locally?
Maybe...
Right now I'm testing a tick on the PC to detect pawn changes like a first time UE coder.
Maybe they fixed that
They have a huge comment about that
if ( (Controller != nullptr) && (Controller->GetPawn() == nullptr) )
{
// This ensures that AController::OnRep_Pawn is called. Since we cant ensure replication order of APawn::Controller and AController::Pawn,
// if APawn::Controller is repped first, it will set AController::Pawn locally. When AController::Pawn is repped, the rep value will not
// be different from the just set local value, and OnRep_Pawn will not be called. This can cause problems if OnRep_Pawn does anything important.
//
// It would be better to never ever set replicated properties locally, but this is pretty core in the gameplay framework and I think there are
// lots of assumptions made in the code base that the Pawn and Controller will always be linked both ways.
Controller->SetPawnFromRep(this);
But that's the other way round, it was OnRep_Pawn not calling
I mean, one could have just NOT set the damn Pawn from the OnRep_Controller
But I guess this is a solution too
Does NotifyControllerChanged(); call?
Oh I didn't know about that one!
I'll add a log.
Yeah that seems to fire.
But not when the controller is reset to null ๐
Which I suppose isn't too important right now.
wtf is a ue coder
isn't that just normally coding
Somebody who is coding in UE for the first time...
Why unreal hasn't fixed this? :c
Cause "fixing" it is not ideal. Not supporting TMaps is by design.
It's not straight forward to replicate them efficiently
It's easier to replicate an array of a structs for example as an alternative
Do you know by any chance why Iris is allowing to have multiple Rep system instances? What could be a usecase for that?
Quick question. I'm a blueprint dev working on my first multiplayer game. Anyone know good solutions for rollback or prediction, specifically for locomotion/combat? I've been looking at GMC, but Mover 2.0 looks promising. I've also heard good things about using Lyra as a base, but I've also heard a lot of horror stories about trying to convert Lyra into something like an RPG or Action Combat game.
GAS is usually the recommended way and it comes with some prediction as well. It is definitely powerful and will save you a lot of work doing prediction yourself, but I am personally usually writing my own (but that is not a correct solution in 99% of the cases)
Interesting
Up to 16
Yeah, its 16 by default. Everything is coded so one can create multiple Rep systems dynamically.
I know there is a few replication systems like you have different channels
No idea why
Yeah, I've been wanting to use GAS and just set up a fork of the game I'm working on using it. My issue is that I'm adding a lot of custom movements like dodges, 2x forms of crouch, prone, etc and the current CMC doesn't handle that stuff or very time sensitive attacks well. I'm wondering if I should stick with GAS or build a custom ability system and use GMC for locomotion and movement.
@lethal peak the current cmc can handle that. But time sensitive stuff is a thing unreal is not really suitable for in base form. Mover 2.0 will have fixed timestep with physics simulation. Can't comment on paid plugins
Mover is super early in dev though
If you want to replicate custom movement, you need to do it in CMC in cpp. It can handle rollback, prediction etc.. It's super powerful but awful to read and wrap you head around.
I don't have experience with Mover though
What sort of game needs time sensitive stuff
Thats the thing. I know enough CPP to be dangerous and code myself into a corner. But writing custom network prediction and rollback for CMC would take me forever. It's not my strong suit and I don't feel comfortable doing it without first learning enough to be comfortable.
Mover helps a bit but the api ATM is still a bit wonky and constantly changing.
But is a lot simpler than cmc if you haven't done anything like that with cmc
I wrote a well commented movement replication example. It demonstrates how to do wallrunning with client-side prediction and rollback.
https://github.com/Pavel-Konarik/ReplicatedMovementWallrun
If you use mover you want to make sure your always pulling from main.
Problem with cmc is its rigidity
Mover solves this by allowing layered moves and stuff
Allowing a lot more flexibility
If you've a preference for BP, this video tutorial from a friend of mine showcases a BP only solution for network predicted movement.
https://www.youtube.com/watch?v=Kt0fwYADit4
Episode 3 is here!! In this tutorial, we take a look at a way to create network-predicted code entirely in Blueprints. Sounds impossible, you say? Well, thanks to a plugin from Reddy-dev, and a bit of backend knowledge, we can get something pretty great up and running in no time!
Project Source Files
https://github.com/PixelatedChaos/CMC_Tutor...
It uses a free plugin IIRC
EDIT: Here's the plugin link
https://github.com/Reddy-dev/SMN2
Do you think CMC is capable enough to handle things like Dark Souls style blocks and parry's over multiplayer as well as replicated prone, stealth, and climbing without a ton of CPP?
Awesome! Thanks for this.
Blocks and parry are part of the ability not specifically movement.
Pulling from main not the best advice imo, it usually has ton of bugs/crashes that are unrelated to what you are trying to do. (at least ue5-main branch)
No just the mover plugin
Guys, I'm trying to do the server travel when I already deploy my dedicated server with gamelift and in UE5 it doesn't work and if in UE4, why is it?
Not the entire engine.
We keep ours in sync with main
Ofc we run tests before we push to our working branch
Oh gotcha, misunderstood, mb
It's not for the feint hearted, lots of technical understanding is required, but the video covers a lot of what you'll need.
Darksouls uses havok engine does it not ?
I think so
Yes
Iirc that engine has nice physics stuff never used it just from what I heard
I think you can get havok physics for unreal also
I was looking at its navigation system
Yeah I was just looking at it. They have physics, cloth, and navigation for unreal.
We are using NPP + Mover heavily. Won't solve the GAS problem though.
Also for FixedTick you gotta pull SirKai's PR/changes, otherwise you lack the smoothing of the AutonomounsProxy and for corrections.
And in theory also for SimProxies on ListenServer I guess.
I thought NPP was kinda dead and not maintained, is it actually good these days?
Npp is what there using for mover
Damn, I need to give Mover a try after Iris stop making me cry
Let's just say it's all pretty experimental with slow progress
But they are working on it and SirKais PR is def helping
tbf it is still unmaintained
i am honestly super skeptical they will stay with NPP