#multiplayer
1 messages ยท Page 374 of 1
(its more bandwidth friendly option, and it will also make clients calculate their own linetraces, instead of server doing it for them)
thank you Zlo. I'll give it a try
when i enable seamless travel in the lobby game mode, nobody loads the next map including the host
but when its disabled everyone loads in
what might cause this?
Is there a way to add input delay to a InputAction?
So that if I am calling an RPC on a input action the player cant just spam
you could ignore that input until the result of the RPC comes back
you want to... just ignore the input completely
or make the input delayed?
because if your objective is to prevent spamming
you can make something like
Yeah
I did a test with an auto clicker on my server spamming E at a rate of 10 every milisecond
and the server
just took a shit
lol
I have a ton of those
let me send you an example
if(LastTimeAttack + 0.5f <= GetWorld()->GetTimeSeconds()){
Attack();
LastTimeAttack = GetWorld()->GetTimeSeconds();
}
that .5f is my "anti retarded input" barrier
xD
Lol
So you are just cachine the last time, you hit that input
and seeing its been more than .5 seconds
lel
ye xD
seems simple enough
.5 could be a variable
would be useful though
you could also count and send them as one rpc, if they is any need
if this could be done globally
to ALL inputs
Instead of having to constantly check
yea
I... made mine
In this article weโll have a look about how to solve the input responsive problem on UE4
then you treat that array as you want
but for your problem xD I would only do that check in those inputs that are abused
oh
/ functions or so
InputKey() is called
before the input
goes through
and im assuming if it returns false, it doesnt go through
lol
welp check the parent in the viewport client class
there is not a real way to extend the raw input functionality without editing the engine directly
๐
don't look at the docs
you can...
certainly override the behaviour of what happens every-time
the input stack gets refreshed on the controller
and maybe, just maybe, you will be able to add manual latency there by erasing the stack content every x seconds or so
ive got an idea
@pallid mesa also though
you know your solution would be client sided
im assuming righht?
so someone could just reeset
LastAttack
lol
or change that value
well this solution comes from a SP game, and I use it for a cooldown system
but yes, you are right, it is totally client side
though what i can say is that its better than what i currently have
on the function that is getting rpc'ed you can do this same check but server side
which is noithing lel
i would rather have a client sided solution for now
than have nothing
lel
xD
though...
couldnt u just
replicate "TimeSinceLastInput"
and also
the idea is to
"not" use the server for this i feel
as much as possible
we want a client sided check first
then server sided check
before proceeding with the rest of the server rpc's
in my opinion this would be the best solution
What do you think? lol
aye you can combine both solutions, for sure.
Basically... Do the check on the client first, if it passes, try it on the server, if it passes on the server, proceed with the rest of the code we need to do.
also don't be afraid of input stashing as long as the function is not very taxing ๐
user input can never be fast enough to saturate a network on a lightweight function
it depends also the situation
and the game and so on...
i mean
it can
if ur like
using an auto clicker lol
Spam 10 inputs per 1 milisecond
But that requires the user to use an external script
lol
its "unnatural" input
sure, yeah seeing it that way xD
void yoquese::StartFire()
{
if (GetOwnerRole() < ROLE_Authority)
{
ServerStartFire();
}
const float GameTime = GetWorld()->GetTimeSeconds();
// If its full auto we don't need to worry about buffered shooting ~ if we hold we want to fire - vorixo
if (!bWantsToFire && ((GameTime >= LastFireTime + WeaponConfig.TimeBetweenShots) || WeaponConfig.FireMode == EWeaponFireMode::FullAuto))
{
....
}
}
``` In my shootergame extension as you can see I do this aswell
ServerStartFire() would call StartFire()
so this polling gets done on the server aswell..
as the common SG networking architecture
ikr
yeah you can check my comment about buffered shooting xD
shootergame is just what it says it is
a shooter game with multiplayer support
the networking architecture isn't bad
actually they use networking culling
something I've never seen implemented in any Epic Games game
but in this template, you can notice it by looking through translucent objects
they stop the relevancy of the player based on the view frustum of said one
check the template, you'll see what I'm talking about
yeah
thats what i was talking about
i tried implementing it
but i dont think it is necessary lol
100% of the time
like i just commented it out in my code lol
well it creates situations that under certain geometry you would be compromising the gameplay
because your clients will stop seeing the other players
so your level design needs to be done accordingly and so on
so just brings more problems than anything
but pretty good though
also
i think all it does
is disable the mesh
GetMesh()->SetHiddenInGame(bShouldPause);
is what it calls i think
in their example
I cannot comment on that, didn't check that very closely
idk, tomorrow I'll check to be sure ๐
but yeah, afaik Epic doesn't use it that much
not sure fortnite though but if they use it, it has to be very well done
because I never noticed similar issues to the ones I had with SG
yea
i mean fortnite is their most successful game as of yet isnt it?
Am i wrong? lol
yes, well GoW was pretty bumped up back in the days
but speaking about recent ones FNT is the top notch
i want to store character data 'on log out', so im using EndPlay, but by then the pawn is gone and i cant get the transform
anyways o/
whats the right place to do this?
@zenith wyvern do it in unpossess
in the Player controller
you can override Possess() and UnPossess()
and do not call Super::UnPossess()
until after
u do whaty u need to do
Question: updating location of physics actors already spawned in world. What's the proper way of handling so they update properly for everyone. Right now, my physics actors in properly updated when they spawn in, but if a player bumps them, out of sync
dont use physics
3rd person ive heard now who has had trouble replicating physics lel
I've seen it done but there was no proper explanation how
Accessing the engine directly maybe?
It was through blueprints
Repliate movement set to true?
@twin juniper you mentioned before that a hacker could just override the clientside input cooldown and spam the input command, but how can they do this? Can they reverse engineer the machine code and set the timeout variable to 0 constantly? Also if they can do this, what is stopping them duplicating the same packet that is sent with an RPC and sending 5000 fake RPCs a second?
you can force anti cheat tool and you can ignore IPs before they reach the actual server
What does that even mean ? People can just connect to your game and then start sending fake packets with the game suspended with a debugger
The really simple version of things is : nothing that happens on a PC client is safe
On a console, some things are safe, some aren't
That's why you have the Server far away and double check
If the cooldown is really already over on server side
CheatEngine allows you to easily search for values in your memory
If they search for the cooldown multiple times right after hitting it, they will probably find a location in the memory that shows that often
If they change that value then they can easily bypass local limitation
@bitter oriole so in that case it isnโt even worth having a replicated variable on the clientside check before allowing an RPC to be sent as they can just send as many as they want anyway?
Yeah, it's useless on the client side
Safety checks on the client are generally useless
Itโs crazy that even this kind of stuff can be cheated, literally anything on the client is unsafe. If game streaming latencies go down to acceptable values in the future, I wouldnโt be surprised if many competitive games wonโt be allowed on the client machine and instead you rent a streamed instance
Well, PCs allow for entire control of everything
That's kind of the selling point
Though even consoles can see cheating - mostly by having stuff on the wire between the console and the network
And you don't really need streaming, you need more stuff on the server rather than the client. That's how many games have acceptable levels of cheating
MP games would be a hell of a lot easier to dev if the client could be trusted
Also sucks to see so many players blame cheaters when they die even though it could have been just a good player
But yeah you are right that is the reason pcs are so popular
That's why most MP games do server authority + tight verifications + anti-cheat on client + account bans
No single effective measure, but a combination
Would love to see some examples of verifications like on Server_Validate functions
Almost all of the ShooterGame ones are just return true
they only blame cheaters for everything because than they dont have to live with the fact that they suck :D
Validation logic depends on your game, basically put in assertions that can't possibly be wrong in legitimate cases
What's harder is defining what's legitimate
Yeah like if you check the frequency of keys being pressed, it could be an aimbot doing 10 things at once or a caffeinated player getting pumped up
Hard to tell which
False bans would suck
Or it could be lag, and all packets incoming at once
Yeah!!
_Validate doesn't ban though, it kicks
Banning is up to your licensing, matchmaking system
Yes
For a typical multiplayer shooter game, would you recommend using GameMode/GameState or GameModeBase / GameStateBase? I'd like to use the leaner option but not sure if I'm missing out on essential features (saw posts a while back saying some things weren't working when using GameModeBase)
I use GameModeBase myself, since I don't have any concept of "match" or stuff like that
GameMode is probably best for something like a MP shooter
Perfect thank you
I mean it would be always possible to extend GMbase and copy across any functions, but probably better to just stick with GM because my game is very match based
Would you say GameModeBase was more made to reduce the bloat for non multiplayer / unusual multiplayer games and GameMode suits the more typical setup many games use?
Looks like that, yeah
how to replicate random integer
i know that i have to do that on server and then replicate to clients
but how
ok nvm
It's best to pass it as a parameter in that situation (if you need it in an event)โyou have no guarantee the variable replication will happen before the multicast is called
If you don't need it in an event immediately, just replicate it like any other variable.
i have a trigger with print string of what room type the room is and it shows on both screens, from both players the same value (the one that server sees)
is that good?
Right now it's like that, but there's no guarantee it'll stay like that.
Especially over the Internet, you need to make sure your systems are robust enough to handle ping, packet loss, etc.
Variable replication isn't instant, and you can't treat it like it is, or things will start to go south.
I'm super rookie when it comes to multiplayer / Replication so I would appreciate if someone could help me out with a problem.
I'm trying to make a C++ OnRep variable functionality.
This is my Header
private:
UFUNCTION()
virtual void OnRep_WorldMesh();
UPROPERTY(ReplicatedUsing = OnRep_WorldMesh)
class UStaticMesh* WorldMesh;```
And this is my cpp
```void ASubClassWorldPlaced::OnRep_WorldMesh()
{
StaticMesh->SetStaticMesh(WorldMesh);
}
void ASubClassWorldPlaced::GetLifetimeReplicatedProps(TArray<FLifetimeProperty>& OutLifetimeProps) const
{
Super::GetLifetimeReplicatedProps(OutLifetimeProps);
// Tell the engine to call OnRep Functions each time a variable changes
DOREPLIFETIME(ASubClassWorldPlaced, WorldMesh);
}```
Am I doing something wrong? The OnRep_WorldMesh() function never triggers
if I set a variable on both client and server, the client will have its variable until the server one replicates, at which point it will replace it with that one, yes?
@brittle sinew Like this // Check if item has a world mesh if (InventoryItem.WorldMesh) { // Set Specified World Mesh WorldMesh = InventoryItem.WorldMesh; } else { WorldMesh = (UStaticMesh*)StaticMesh; // Set to Null Mesh } I have checked and it goes into the correct statement ๐ช
Can I set Owning Client as authority of rotation somehow ? So the server will not override my rotation ?
Thanks @brittle sinew
And what context is this in @lilac lotus? It needs to be at runtime (I don't think things like PostInitProperties or things like that work), and it needs to be on the server
I'm spawning it at runtime with auto PlacedActor = Cast<ASubClassWorldPlaced>(UGameplayStatics::BeginDeferredActorSpawnFromClass(GetOwner(), WorldPlacedReference, RandomizeDropLocation(), ESpawnActorCollisionHandlingMethod::AlwaysSpawn)); , It's for a Drop Item Function. (It has the finishspawningActor as well). It reads everything loud and clear, it just doesn't set the mesh at this moment. I'm making the On_rep function to Server, Reliable, WithValidation atm and hoping that makes it work : )
Making the OnRep function a server RPC...?
That doesn't really make sense; OnReps are intended to be called on clients.
Hehe, yeah total Multiplayer scrub. I appreciate you point that out, would have learned through trial and error otherwise
Question again. I'll try to clear it up a bit.
My goal is to have items on the ground be synced in location across server/client. As of right now, when they initially spawn in the world or dynamically spawn from players dropped, everything appears to be nice and synced. However, if they are in any other way interacted with once in the world(i.e player running into them), they can get horribly desynced. I have seen both blueprints and c++ solutions but not real information. Does anyone have an idea of counter advice?
or counter advice*
@frank tinsel sounds like replication problems.
the players can pick up the items, but the item location is not replicating if the player runs into the item
it will move on both sides
but it won't be synced
Anybody knows where CharacterMovementComponent replicates (correcting) owning client rotation which was set only on Owning Client ?
๐ค I don't think it corrects rotation at all
Well. If I will remove replication of movement component then the owning client is not overrided at all and it works
but once I will use movement replication then it's usually overidded
I honestly don't really know, I've always used custom actor rotation logic
without issues
Look at UCharacterMovementComponent::ServerMove
That's just what I saw quickly looking through the source
no no, movementcomponent has it's own thing
I have character class yes
If I will just call on Role==ROLE_AutonomusProxy SetActorRotation it's usually overrided back to server pos
server rot
orient to movement uses velocity as direction, so it might differ from client and server
since client gets velocity overrides
But I m just standing not walking press a button which set the direction
There should be no velocity
I mean rotation not direction
well, I can say there's always velocity for sure, just very tiny bits of it
I just don't know what is the sleep value for it
I recommend doing custom logic, even if it's a simple one
Ok so for the test I will set bOrientRotationToMovement to false just for the test
one sec
Hmm it's still same
Sometimes it works sometimes not
So am I right that CharacterMovementComponent overrides it ?
@brittle sinew I check it several times I did not find any client side call
But this is called on server
No?
I mean from Client To Server
But I have opposite problem
my Owning client is corrected by server
in terms of rotation
So basically I need to set new rotation on player side straight. Don't wait for any server delays. But server corrects me mostly before he will get know that this rotation is What I want
It;s maybe similar to teleport. You want to teleport player somewhere straight on client side (owner) but server will fix the location straight
for your client (cheat protection and so)
Then it should be implemented same like DoJump what Epic already made on ACharacter
and movementcomponent where you have to use some free slot
But In case of rotation I just need to find the place where the character rotation is overwritten by server
And I have no success so far
and if the place where it's happening is virtual method then I can change the behavior that Owning client is Authority of rotation
because nothing in my game could change my character rotation. Just me (the player)
In ShooterGame, when a pawn gets killed, he calls a function on the gamemode that does nothing but call functions on the killer and victim player states. I had thought this kind of thing was meant to be done on the GameState rather than the GameMode. Does it not really matter?
(or casting directly to the killer playerstate from the pawn that was killed as he has the info from the damage event)
Just bear in mind that GameMode lives only on Server side. The GameStat on Server and Clients
For sure, it's just that I thought the GM was more of a static class handling the rules and major match events like starting or finishing, and the GameState was responsible for the second to second things like monitoring and setting global score, keeping time, etc
Basically the GM is ruler and GS is basically the state of the game
But your issue. is it implemented by Epic ? If yes then it's correct :0
That's what I thought, but they have timer logic and playerstate score logic being set in the GM
I guess it's correct then ๐
Epic is correct ๐
But time is rule
score is basically rule as well
I mean that reach some score means end of the game
sou this should be definitely handled by GM
That is true I just always thought the GS tracked that, and only notified the GM when it needed to
GameState should be like a bridge for sharing the info
It seems it's all done in the GM leaving the GS barely anything to do
something like progress of the game
Like I had a simple game where the first to 50 kills won, so I had the GS check after each kill if it hit the limit, but only when it did, then I told the GM to do something
Gotta just remove the static nature of the GM in my mind now and see it more like the Gamestate
But the actual doing force and less the tracking force
Also I just noticed that all of the properties in ShooterGame's header file are formatted with UPROPERTY(config)
This means the GM doesn't have its own blueprint in editor, and is tweaked via an .ini file
Is there any benefit to doing this vs creating a blueprint for the GM?
Well. You know you can extend you custom GM by a lot of things which can be then modified in BP by designers
this is somthing what you can't do via ini
I'm not worried about that as I'll be keeping all logic in the cpp, but I like BP for tweaking defaults
As long as there is no overhead for having a BP, I'll go with it
You should not folow this patern
How come?
You can have logic in CPP that's fine. But you should open the variables to be modified outside your CPP via BP settings
even for you it's very easy to change somthing without compiling the code
If you mean config vs BP, that's not really a good question IMO
Also a config file doesn't require a recompile
Without closing the editor
You can even have the config load on command
Yeah but you have to reopen the editor every time
That makes sense! I'll probably stick to just BP
Just because I'll be tweaking the children GM properties in editor until right, but maybe a text version would be nice to have too)
As long as there is no extra overhead. ShooterGame just has no BP GM at all, so you can't tweak without changing the .ini
Yeah so mark it config
this is not the best way
then you can change it later on without having to repackage
what about if you want to change the game time
you don't have to do one or the other @gleaming bobcat
or win score cap
Oh that is pretty cool (the package thing)
you can literally have both
I can easily change that in BP @gleaming bobcat
They are just EditDefaultsOnly properties
That's the point of the child BP
I agree there is not only one way
But I will prefer BP way but it's up to you
Thanks for clearing it up! Just was wondering why ShooterGame took that approach, and it's probably because Epic were most comfortable changing ini values
I do prefer the BP way ๐
maybe the text file is much more easy to Diff ๐ form the version system point of view ๐
Potentially but there aren't really that many defaults, only about 6! It's definitley a good idea to make text versions of BP defaults now that I think of it
Considering it's possible for BP children to get reset
I think this is completely up to you I don't see atm any adv/disadv over each other
But from the consistence point of view imho the BP is the way in my project ๐
How many ppl are working on your game ? ๐
Just me ๐
wow ๐
So I don't need designers or anyone else to know what is going on
๐๐ฟ
Agree
In my project. the core and logic is in cpp and the high level things are made on BP level. Which means designers can change the behavior but not a logic
That makes good sense
So would they use any nodes at all or just stick with being able to edit defaults?
Or do you let them play with cpp logic nodes you have made?
You should make High level functions (methods) visible in BP
then they can for example create struction of questlines
and easily can change which quest is needed before this quest and so on
I mean the parameters should be always visible in BP harcoded values are always bad
Nice that makes sense
And yeah I never use hardcoded values
great to be able to change things at a higher level
๐๐ฟ
Also UMG is another thing
What I understood it;s faster to use BP for handle the clicks
rollovers etc
faster then have some dynamic_binds
in this case you can have logic in CPP but you will just make visible function called "Resume Game"
but the clicks itself will be handled in BP
something like this
All the fucntions are cpp visible in BP
So power in UE I see in combination of C++ + BP
@gleaming bobcat extremely interesting! I was actually recently wondering about UI as usually the widget is created in the editor first, instead of the usual cpp being exposed to BP after
So you donโt actually bind anything here and instead just write the logic in cpp and call the logic you write from BP?
exatcly
it's also completely transparent to designers (or not programmers in general)
Very cool! How exactly do you create the base cpp class for this?
Do you create a BP widget that derives from a Cpp class and not the standard widget?
UUserWidget is my base class
And then you will crate BP based on your own class
with all the function visible in BP
Perfect that has gotten rid of any doubts I had about cpp / BP widgets thanks so much!
np. Just bear in mind : Completely avoid BP implementation is not the ideal even if you are pure programmer which loves C++ (like me)
same from the opposite way. Doing everything in BP is horrible
I can especially see that with the UMG editor because itโs all completely visual and heavily using the BP interface to position things
I mean yeah itโs possible to do the full UI in cpp like ShooterGame but that seems like a massive hassle compared to UmG
Gotta play to the strengths of the tools!
I was doing that manually in HUD it's jut pointless ๐ to much work with no sense
doing graphics in code I mean it;s pointless
i like UMG ๐ Have a nice day . I m going to bed
For sure I agree! Goodnight and thank you again!
Hey guys we're having an issue where we want to create a unique name for each player and display it as text over their head. We made our name creation system in a unique playerstate and we were trying to cast to that playerstate then set text as the playernametag variable. But for some reason we cannot cast to the playerstate because we aren't sure what object to use.
How much RAM would you allocate for a linux dedicated server VM using a sample project?
3
the frickin binary is like 800MB lol
is it bloated because its compiled from Windows for linux? Windows dedicated server is like 300MB
Have anyone come across integer overflow error in html5
Clarification question
What kind of replication is best for handling this kind of scenario
If a player wants to pick up an item, I mean
or Alternate question: why does this break my client players ability to pick up items when Run On Server is selected
how can i debug network connection issue? 4.18.3 - dedicated server running on linux - client joining from windows - disconnects immediately
[2018.02.20-06.23.45:556][306]LogNet: Login request: /Game/Maps/entryMap userId: Invalid [2018.02.20-06.23.45:589][307]LogNet: Client netspeed is 10000 [2018.02.20-06.23.45:656][309]LogNet: UChannel::ReceivedSequencedBunch: Bunch.bClose == true. ChIndex == 0. Calling ConditionalCleanUp. [2018.02.20-06.23.45:656][309]LogNet: UChannel::CleanUp: ChIndex == 0. Closing connection. [UChannel] ChIndex: 0, Closing: 0 [UNetConnection] RemoteAddr: <MY IP>:60720, Name: IpConnection_36, Driver: GameNetDriver IpNetDriver_0, IsServer: YES, PC: NULL, Owner: NULL [2018.02.20-06.23.45:656][309]LogNet: UNetConnection::Close: [UNetConnection] RemoteAddr: <MY IP>:60720, Name: IpConnection_36, Driver: GameNetDriver I
Hey guys, anyone here had a problem with demorec on 4.18? ๐ค
@frank tinsel when you are on server execution, you can get only one game instance - servers, as they are not shared
in that blueprint you replicate an event to server, then grab server game instance, and i imagine no matter which player picks up the item the host gets it in the inventory
using an inventory component, with variable-based replication would be my approach
having just the ServerRPC called to handle the pickup on Server, then replicating variables rather then functions to get the client in sync
I am using NetMulticast function in gamestate, which executes on the server but not the clients, shouldn't the same code be executed on the clients?
@twin juniper You can reference widgets in you cpp class
I don't know if someone told you that yet
It's pinned to the #umg channel
E.g.
UPROPERTY(BlueprintReadWrite, meta=(BindWidget))
UTextBlock* MyTextBlock;
If your child widget has a TextBlock with name MyTextBlock, it'll be accessible in cpp
In case you want to easily access the designer of your umg widget in cpp
@zenith yarrow depends on when you execute it
@thin stratus I execute the rpc in HandleMatchHasStarted()
And that is called when?
Cause if that already calls with only the server connected, the clients won't ever get the multicast
@thin stratus ok tested the RPC in the DefaultTimer() function , which is called every few seconds, and it worked there... I had assumed the HandleMatchHasStarted() was called when everyone was connected to the map... I'll create a custom event that marks the start of a match and fire the RPC then...
Thanks for helping me out.
@thin stratus is this as well as creating the base UUserWidget class in cpp?
That is the same
In your UUserWidget c++ class, you define what I wrote
And in the UMG BP child class, you create a widget with the same type and name in the designer
And it will get referenced via the C++ variable
So if you have a TextBlock (Title) in your UMG Widget and the C++ parent has the BindWidget variable UTextBlock* Title, you can modify it in c++
@twin juniper
Got it thank you @thin stratus !
Yesterday someone mentioned that itโs actually faster to use the on clicked / hovered events from BP, so would you recommend just exposing cpp functions to use in BP for those events and do any binding directly in C++ as outlined above?
Tbh, you don't have to use c++ at all if you don't need any non-BP stuff
It really depends on what you are doing
I just mean in terms of speed, someone said itโs actually faster performance wise to use the BP hooks for on pressed / hovered etc
There shouldn't be a difference
It at all BPs are slowed
He probably meant that setting it up i nBP is faster
As it's just a button press
Compared to defining a function and binding it
Ok cool! Thanks! Iโll probably make all the functions in c++ and then use the BP hooks for clarity as its very visual
For most menu stuff performance doesnโt matter anyway because itโs not gameplay
Actually not. The Epic said somewhere that is faster or better to handle it via BP
Will do!
Workflow wise It's probably nicer via BP
I don't see how it should be faster Performance wise though
who knows , how to replicate a local savegame to all
i save my costumization inside a savegame , one material instance and one skeleton mesh and want that other Players can see my Layout , right now server can see what the players have chosen but the clients can see only own layout applyed on all players
thats my setting
Does someone know how to reset the LastSavedActor for Spawnpoints?
Setting it to nullptr would help?
Yeah but I doubt that's possible in BPs
Mnh, for spawnpoints I usually override their behav on BP's and do my own, found ir quiet limiting =\
Managing those vars myself
Most of it works totally well, just for respawning it's annoying
Cause I want to spawn them randomly
Not to the same spawn point again
So I guess I use my own respawn function /shrug
Yeah, it's not that bad! But imho there is lack of variables exposed to BP's to operate better :(
im still having the issue where clients get weird replication related bugs if my framerate is too high as the host
capping my framerate lower fixes the issue
[OnlineSubsystem]
NetServerMaxTickRate=50
is in my engine ini but it didnt seem to help
there are no RPCs being called on any tick
I believe 30 is the default value ```
[/Script/OnlineSubsystemUtils.IpNetDriver]
NetServerMaxTickRate=30
@thin stratus I can send you soon a sceen with random spawn system if you like
Na I have that already, don't worry
๐ ok
Is "ChoosePlayerStart" called before or after SwapPlayerControllers?
Cause it's def called before PostLogin
Pawns aren't spawned on my end before ready to start is true
And that happens post postlogin
In PostLogin I assigned a value to the Controller
In ChosePlayerStart I use that value
And it's not changed
So I believe it calls quite early then
But doesn'T matter much as I only use that for Editor testing
Actual game using seamlesstravel
if you override ChoosePlayerStart
you will break the "PlayFromHere" in editor btw
unless you make a separate check and return w/e the Parent function would return if its in PIE
So, starting to get the whole multiplayer stuff I think, though I've come across some replication issues. I want to spawn a camera actor for each player that joins and then set the view target of each player to their own spawned camera. I use the Post Login event to spawn the camera on the server and then I set a reference to that camera as a variable in the PlayerController (though I've also tried PlayerState). The variable is set to replicate and so are the actors, however whenever I test this the variable is successfully set on the server, but on the clients it's just "none", so that when I try to set view target it doesn't work as it doesn't have an input. Anyone know why the variable is not replicating to the clients?
not sure, but alternate approach: on BeginPlay of the PlayerController, if the PC is the LocalController, spawn the camera actor
no extra cameras on the server that way
Is ULocalPlayer relevant only for splitscreen or is it used in dedicated server settings too?
There's some logic in Shotoergame for setting up nicknames, controller IDs and loading persistent user data in a ULocalPlayer class
Not sure if that is splitscreen only or not
@winged badger Tried running it on begin play, same result. ๐ค
replication is not involved the way i described
you only spawn a camera actor locally for each player
Right, but I thought a server has to spawn actors and clients can't?
they can, but those actors can't leave their local scope in any way
which for a player camera, just might not matter
Oh yeah just read up about it again. Hmmm...
Well in my case it may not matter, but let's say I wanted a spectator that can see what the player is seeing, in that case I'd need access to the camera on the server side, so it's not ideal even if it would work.
true, but the approach holding a reference in the PC wouldn't work either there
Surely there must be a way to fix this replication? I just don't understand how it can be on the server but not on the clients when it's set to replicate.
Yeah maybe, though I originally had the reference variable in a player state
just moved it over to PC for testing
been going at this for about 5 hours lol
replicate it with RepNotify
print some text in OnRep
see if the replication actually happens
@twin juniper LocalPlayers are just that, local ๐
And you do indeed have one for each local player, so in split-screen ,you'd have two.
Is it still fine to be used even if there'll never be split screen?
Thanks! @chrome bay
When is there gonna be split screen in the same VR headset?! 
Just regarding something like this in ShooterGame ``` GEngine->GetAllLocalPlayerControllers(PlayerList);
for (auto It = PlayerList.CreateIterator(); It; ++It)
{
APlayerController* PC = *It;
if (!PC || !PC->Player || !PC->PlayerInput)
{
continue;
}
// Update key bindings for the current user only
UShooterLocalPlayer* LocalPlayer = Cast<UShooterLocalPlayer>(PC->Player);
if(!LocalPlayer || LocalPlayer->GetPersistentUser() != this)
{
continue;
} ```
I'm not sure if this is to set up keybindings for each local user and is unnecessary or if it is for the sole local player playing online and is necessary
Yeah you can use them, they always exist for the local player!
Not on the server though of course, unless it's a listen server
Ok cool thanks!
Client doesnt see a newly added component if using Add Static Mesh Component
oh now works
is there a way to get the max amount of players a server can have?
I used this: SessionSettings->NumPublicConnections
But everytime a player joins 1 is deducted from that variable
1 shouldn't be decremented from NumPublicConnections. NumOpenPublicConnections keeps track of how many are open.
Yes my bad, I didn't know there were two of them, I was using OpenPublic... I didn't even realize
Thank you
no problem
when making an array that holds a list of all the players connected is there a reason to use APlayerController rather than A<ProjectName>Character ??
Characters normally don't persist death
There is already an array of all PlayerStates in the game. Why not use that?
In ShooterGame when loading and saving data, it seems to treat the game as though there are multiple local players ``` TArray<APlayerController*> PlayerList;
GEngine->GetAllLocalPlayerControllers(PlayerList);
for (auto It = PlayerList.CreateIterator(); It; ++It) ``` which I believe is to do with the fact that they support splitscreen. If I am certain that I won't have more than one local player per machine (i.e. a typical setup for modern online multiplayer games) do you think I can instead write this as ``` APlayerController* LocalController;
GEngine->GetFirstLocalPlayerController(); ``` ?
And even better if not using GEngine as you seem to have to include the huge Engine.h for that to be recognised...
Oh getting it from the game instance could be way nicer, thank you very much!
@jolly siren Oh I didn't know there was one
Just trying to get my head around what kind of local they are referring to here, since this isn't called on the server, would it also possibly be safe to call GetWorld()->GetFirstPlayerController(), or would that still potentially return the first player connected to a sever, and not the local machine player?
@hidden thorn yeah GameState->PlayerArray
john, yeah they are talking about splitscreen
Ok cool thanks, so I can basically replace any for loops and iterators for local players with a single first local player reference!
yep
Is there a benefit over using GameState->PlayerArray? I was following a doc by by Cedric_eXi and he uses PostLogin(APlayerController* NewPlayer) and then PlayersConnected.Add(NewPlayer) etc
I did similar thing but in my case PlayersConnected is in GameState rather than GameMode
PlayerArray is of PlayerState
@hidden thorn
PostLogin is a default event by gamemode that calls when a player is fully accepted
It gives you a ref to its playercontroller
That's different to the PlayerArray that gets filled with PlayerState references
And the one in GameMode is server only
While PlayerArray is somewhat replicated
Well at least gets filled on each client
Is there a reason to have a server only player list??
And yeah I get the difference between PostLogin and PlayerArray
Well there is no reason to have that list on clients
The playercontrollers in there are only replicated for local clients
A client doesn't have a ref to other playercontrollers
Is there a special way of handling OnRep in C++ if the variable is of type USkeletalMesh ? Feels like I've looked everywhere I can for the answer.
The event that changes the variable fires & the setup looks good but no changes visually.. ๐ช
You're wanting the OnRep event to fire on the client, correct?
I believe BP and C++ have a discrepancy when it comes to OnRepsโIIRC, in BP OnReps are automatically executed on the server, while in C++ they're not
Yeah I read that, not sure it fires on either server or client though
I'm currently checking references & pointers even though I don't see that being the problem
hey guys, i am trying to connect to my dedicated server and my client disconnects immediately. This seems to be the error
[2018.02.20-22.37.38:683][138]LogNet: Warning: Travel Failure: [PackageMissing]: [2018.02.20-22.37.38:683][138]LogNet: TravelFailure: PackageMissing, Reason for Failure: ''
Full stack of messages
prob should have pastebin that, sry
that is client
this is server, but it seems to only generate client side error, all i see is connection close immediately on server side - https://pastebin.com/6Xzmek2h
if I have the players list as APlayerController is there a way to get the A<Project>Character so I can access variables from that file?
Yes, that's the function of casting.
You can't cast a whole array at once, however; you need to cast each element individually, either when you use it or sometime before that.
I know that what I am asking is how would I go about getting the Character since the list stores the Controller and they are 2 different objects.
AController::GetPawn()
Sorry, I had originally glanced over it and thought you were simply trying to cast the controller to your custom type.
can you set higher verbosity of logging for the packaged builds?
apparently you can in the defaultengine.ini config
[Core.Log] LogNet=verbose LogOnline=verbose
and then repackage your project
hopefully will find out what this bullshit fucking error means LogNet: TravelFailure: PackageMissing, Reason for Failure: ''
Reason For Failure: '' thats some windows shit right there
Windows is more like Unknown Error: 'Error Unknown'
@brittle sinew Thank You
It seems that Steam marks sessions as InProgress straight away when you create the session?
Nevermind, my bad
Hi everyone.
We are having problems replicating AimOffsets. It works on the Server (you can even see the aimoffset of the clients into the server) but the clients can't see any AimOffsets that are not their own's. Anyone had a simmilar experience? Or know how to fix it?
Thanks awesome people.
Do Steam presence sessions actually have to be in progress for them to advertise?
I am getting 0 search results even though there is one presence session that's in the "Pending" state
Actually, I can see the session only if "bAllowJoinInProgress" is true, even though the session is Pending, not InProgress
Every so often when i update a replicated variable on my server, my client receives it twice. I am using ForceNetUpdate() directly after I update the variable. Is that normal?
@analog hatch I had a similar problem a while back. I ended up setting the variables that control the offsets locally and then setting them again in a loop that repeated 30 times a second as replicated, skip owner and it cleared it up. I'm no expert, not sure if that's a good way to do it but maybe this gets you looking in the right place.
Out of nowhere I can't find servers anymore.
I am not sure why this is happening, is there anything I should be looking out for?
The way I tested is I right click the project Launch Game and start 2 instances.
https://i.imgur.com/rrjh8p9.png
In Multiplayer I want fairly large map sizes, if I use level streaming in multiplayer and only load the tile any players are on, and the nearest tiles to them, would that but a good solution?
The only thing I could think of is it might be hard on the network streaming in and out levels a lot
You can load levels on clients when enabling Client-Streaming
And then let clients load the surrounding tiles
Depends on the view distance I guess
And how big a tile is
I think there its about 2ish km?
Client-Streaming? Loading them only on client side?
Yeah by default, it's Server-Streaming
So Server loads one and everyone loads it
Client would allow you to only load an specific client + server
Oh okay, so Client 1 enters that zone and loads it, the server loads it, but client 2 on the other side of the map doesnt load it
Yeah
can i set a widget in the world only see for one guy who is standing right next to it ?
Well you can check the distance between you and the widget and depending on that show it or hide it.
Or you can spawn the widget locally
jeah but if i stand next to it and set visibility everybody will see it too
Is the widget set to replicate? also are you telling the server to set it to visible?
the widget is not replicated and its owning client
and triggerd by collision overlap
So any client that overlaps it makes the widget visible?
When you overlap do you tell the server to make the widget visible?
Cause if not I don't see why it would be visible to everyone if the client makes it visible locally
i think the overlap is a multicast...
In the Widget Actor
Get the Overlapping Actor
Check if it's locally controlled
Or, if you only have Clients (no listen Server)
Just so "SwitchHasAuthority"
And on Remote exec
Get the Owner of the overlapping actor
That should be the PlayerController, if the overlapping actor is the Character
Check if that is valid
If yes, you have the local client
nice thanks
@thin stratus have you got any ideas why I have that issues (a few posts above)
I've been looking around for an hour or so but can't seem to get why that is happening
Is that Subsystem NULL?
This
// Get OnlineSubsystem we want to work with
IOnlineSubsystem* const OnlineSub = IOnlineSubsystem::Get();
If yes, well it does pass the if statement.
And it worked last night and nothing has been changed since then
I am not familiar with what Subsystem means in this context
Not sure if it helps or not but I followed your "How_To_Use_Sessions_In_C++" wiki
Looking online I think I am using the UEs SubSytem which is set to null in DefaultEngine.ini
Overview of the various systems related to the online platform.
anyone mind looking at my network profile
and telling me what i should be looking at
to optimize for performance
not sure what to look at D:
Hello, anyone knows how to restart level using Steam hosted sessions without kicking players?
@twin juniper What is ClientUpdateAllSlots?
@candid fox dedicated or listen server?
You can use RestartGame or do a ServerTravel to the same map
@jolly siren literally just updates the inventory slots
passing an array of structs from the server to the client
to update the icons
and such
sometimes... it doesnt always get updated correctly
so i call that whenever u open the inventory
Where are the icons stored? Why would you need to pass them over the network?
sec
Actually, my mistake
it sends the "Inventory" which is an array of S_Item structs
with 4 things:
item id, item count, item index, and the inventory component
@jolly siren However, we use the item ID to lookup the stuff for the "item slot/icon"
and it looks it up from a DataTable
Yeah passing ID and locally looking it up is the correct way to go. The avg size of that rpc seems quite large tho
It loops through all the inventory structs
and passes it to "Update Inventory Slot"
which just sets the widget stuff lol
@jolly siren if u dont mind, how were u looking at that though
i thought these two parts were the problem
any clue what that is caused by
O_o
Or how I could find out?
because at that spike, there is literally NO RPCs being called
however, there is a large number of rerplicated actors...
so im not sure haha
@jolly siren About the Online Subsystem I looked through that and mine is set to NULL -> DefaultPlatformService = NULL
Ahh, could the firewall block anything?
The NullSubsystem is literally just there
to give u basics lol
its actually really nice
Or have you had this before and I should maybe look out for something blocking it such as anti-virus or idk
@jolly siren Thanks for tip. When i do ServerTravel Players stay connected but game state will be None. How do i start new match from there? Tried Start Play.
Also Listen.
if i get playerstate owner, it should return the controller right?
yes, it does, just tested ๐
@vital steeple Yes, but only on Server and LocalClient
(Can't say that often enough :D)
@Ardivaba#1465 That shouldn't happen. If your GameState is NONE, then you have some other issues :/
When are you trying to access it?
@hazy sableowman#9463 SubsystemNULL is basically LAN Sessions and IP Connection.
Even the LAN Sessions are IP Connections as searching for matches is a simply broadcast through your LAN
So technically, if you local PC doesn't block any internal IPs, it should find the sessions
That must be the issue because I went to uni and tested the exact same project and it works.
Does anyone know if it is safe to update session settings such as gamemode, map, etc. after players are connected? At the end of the match players vote on the next map/gamemode and I would like to update the session settings so new joiners can see what map/gamemode it is actually on.
How could I check if my local ip is being blocked
But I dont have "VirtualBox NetWork Adapter" installed or listed anywhere
that would only be listed if you are using a vm with virtualbox
Anything else that could be blocking my local ip?
I turned off my antivirus, firewall and nothing
how to replicate add static mesh component?
@thin stratus sweet! im running it from server anyway (a spawn queue that cycles through an array of playerstates, gets controllers, and spawns a character for that controller to possess)
works great ๐
@twin juniper you add the component normally, then you do SetReplicates to true (bReplicates = true from c++) for that component
But if I don't want it at start?
that is fine
Because there's a bunch of same blueprint actors
works either way
StaticMesh pointer is replicated, so you should just need to set a new one
Is there anyway to optimize replication of large numbers of actors
Like, I have about 30+ NPC actors, and even though I've done what I think is more than enough to optimize, it still lags my server.
It literally enables and disables all tick, set rreplication on and off, enables/disables all collision, all ticks on components, as well as registes/unregisters navigation invokers on ALL npc's
yet the optimization is still not enough
am i missing something else?
_<
brain is turned off too?
It literally disables tick on all components
from what i can tell
I'll DM you a snippet
of the code i made
what about the bot controllers?
So I call SetHibernate(true) when we our collider enters the area, and call SetHibernate(false) when we exit..etc
the other way around i hope
right, but the performance problem is constant? not just when enter/leaving the area?
is the performance worse when youre in the area?
yeah
well
if no player is in the area
it just despawns the npc's
and performance improves lol
you sure its the network and not AI controller with PTSD?
hibernate seems to destroy the ai controllers
in fact, it doesnt even recreate ai controllers when turning off hibernation
if its the network, and i don't think 30 actors can overload it, even with under 1Mbps connection
state based replication is usually the cheapest
replicating a single enum (1 byte) that holds the current state with RepNotify, then doing what you need on clients with OnRep functions
im a bit confused too, what exactly is the hibernation function for if you just destroy the actors when leaving the area?
is it just a test to see if turning hibernation on while player is there improves performance?
anyone have any experience with lag compensated projectiles(not hitscan)? bigger ones, e.g. rockets rather than bullets
i want the shooter to actually hit what/where he's aiming at, so i figure fake projectile on shooter, then server does a movecomp.tick of shooterping/2 to sync up to shooter's fake projectile
however, i also want other people able to both shoot down(with hitscan) and dodge those projectiles, so when non-shooters receive the projectile they should tick another nonshooterping/2 for their replicated version, so they can see the actual server version...
but, the dodging of or shooting at those projectiles is gonna take another nonshooterping/2 to actually reach the server, which means they'd need to do yet another tick so their view of the projectile is actually ahead of the server, so in total it adds up to shooterping/2 + nonshooterping ms worth of prediction, which at 100 ping for both clients totals at 150ms... a projectile velocity of 3,000 means the spawn location as seen by the nonshooter would be offset by 3000*0.15= 4.5meters, which would have a nasty gameplay impact up close
@manic pine thats commented out
the destruction i mean
@manic pine you destroy the actors when youn leave the "biome"
not when u leave the NPC location
ah right, so hibernate when in biome but not immediate area of npcs
yeah
so if u leave biome, ALL npcs in that biome despawn lel
but it keeps a "FVector" of the location
so if a player comes within1 5000 sq units of the locationo
it spawns a random npc
@manic pine
right, have you confirmed that your hibernation function actually runs? if its really setting updatefrequency to 0.01(once every 100 seconds), then replication shouldnt be causing an issue
also make sure its not running continuously ^___^
@manic pine it is being called
HibernationModeChanged: 0
HibernationModeChanged: 0
HibernationModeChanged: 0
HibernationModeChanged: 0
HibernationModeChanged: 0
HibernationModeChanged: 0
HibernationModeChanged: 0
HibernationModeChanged: 1
HibernationModeChanged: 1
HibernationModeChanged: 1
HibernationModeChanged: 1```
0 = no hibernation, 1 = hibernation
and its changing when i enter/leave
ah okay, well thats good.. but then whats causing the performance problems
whats the profiler saying?
if the profiler doesnt give you anything useful, might be worth it to put some prints inside tick/tickcomponent functions just to see if anything's running, since something obviously is
Any reason why I am getting this error?
This works fine on the server but when a new player joins this is what happens.
Access violation - code c0000005 (first/second chance not available)
Urpgprojectgamestate.cpp:39]
//Line 39
if(Cast<ARPGProjectCharacter>(connectedPlayers[i]->GetPawn()->) != nullptr)
In GameMode I have this
void ARPGProjectGameMode::PostLogin(APlayerController* NewPlayer)
{
Super::PostLogin(NewPlayer);
ARPGProjectGameState* GameState = GetWorld()->GetGameState<ARPGProjectGameState>();
if (GameState != nullptr)
GameState->AddConnectedPlayer(NewPlayer);
}
Looks like you have an errant arrow operator on the end, I'll just assume that's a copy mistake ;)
Yes that is
That said, you should check if the array element is valid before trying to call a function on it
You're looking at a classic nullptr access violation there
But technically what you see there should work
or it could be a null member
also the array is not empty as I have the i displayed at the beginning and it returns 0 and 1
could be null pointers inside the array
I will look into it now
connectedPlayers[i] dereferences the array, the next -> dereferences the array element
first will fail if index is out of bounds, second will fail if null(or invalid) pointer
@twin juniper any luck?
Ok so what I am getting is this
for (int i = 0; i < connectedPlayers.Num(); i++)
{
if(connectedPlayers[i] != nullptr)
GEngine->AddOnScreenDebugMessage(i, 0.01f, FColor::Green, FString::FromInt(i) + " - " + connectedPlayers[i]->GetName());
}
Top Left - Server other two clients. So the controller on the previous clients/server becomes null but it does recognize that there are more players
@manic pine no lel
the -messaging parameter on my server
isnt working
so i cant run profiler on server anymore
ouch, well you could still try printing in the ticks to confirm that nothing's actually running
@hidden thorn are you trying to access other player's playercontrollers from a client?
Yea
I assume if they are in a list it would be a problem as they can't edit but read them
playercontrollers replicate only to the player who owns it
other players playercontrollers dont spawn on a client at all, they dont exist period
ahh
youre looking for other players' representation on your client
thats usually done with the APlayerState class(and sublcasses)
listenserver and dedicated server has access to all playercontrollers, clients have access only to their own(as well as any split-screen controllers), but everyone has access to all the playerstates
can you get the player state from the controller?
I am just trying to wrap my head around it
yes, the PlayerController is actually what creates the PlayerState
it does so on the server, then the playerstate is replicated to everyone
you can also find the playerstates in AGameState
which is another object all players have access to
What sort of info you would store in the PlayerState?
anything that other players might need to know about that player that's not stored on his actual character/pawn
by default, you can find e.g. the player's name and score there
So like on the actual character you would store health, armor, kills, deaths, team etc. and on the state name, id, etc
health and armor sure, but what happens to kills/deaths(and team?) when character dies?
they're gone
much more fitting they stay on the playerstate, assuming you dont want to reset them on death
when the character dies do you have to reset them or do variables reset by themselves ? or is that more like a logical thing to do on the character
well, UE doesnt really have a concept of 'death' per se
there's Destroy, which removes the actor from the game entirely
if u spawn a replicated actor in a multicast function
we will get multiples right?
lel
multicast, when used on a server, is called by the server itself as well as on all the clients that have a replciated version of the object the multicast is called on
but
that would mean
u would get 1, replicated to the clients, and then another on the client
so two on the client
1 on the server
right
heh
and only 1 of the two spawned on the client would have a net connection and thus be replicated
other would be dummy actor that the client has Authority over
mhm
lel
my npcs are setup to "run away" when a player gets them below a certain hp
but instead, if no player is lofgged in
it cant complete the eqs query
@manic pine actually the grid isnt the long part
if un look
its the "Trace"
thats taking 5.71 ms
the grid itself is the first one,
its also taking a bit though
2.27 ms
hmm, are you sure that entire environment query thing is meant for huge open worlds like yours?
i think its for tiny indoors areas
@sly basin Hey thanks we'll have a look at your method. cheers!
you could make them run away only if the player is close enough for it to matter @twin juniper
that would solve the no player around issue as well, they could just wait then
checking VectorLengthSquared is relatively cheap, much cheaper then traces
@winged badger yeah
Hey, I have one question that I really need help with Unreal engine 4.
I want to make a deathmatch (not team deathmatch) where everyone kill each other, and they all use the same character, I tried doing that but everytime I shoot or someone shoot we damage ourself, like the bullet is colliding our own character, and is there a way to do that it can collide only on other person than ourself? So like we could kill each other.
Please thanks.
you need to set the damage instigator at time off firing and also if you are using traces add the controller to a list of ignored objects array
I don't really get it, all I'm doing is cast to my own character and do health damage inside my bullet, but when I shoot I get damaged myself
inflicting damage logic does not belong inside a bullet
Also line trace doesn't work for me, when I do a line trace and try to add damage to enemy or AI's it doesn't work.
Anyone know why?
Oh wait, I think I find a way to do it, thanks for the help ๐
Hi. Can anybody help me? I'm trying to make a main menu with chat and friends list in a multiplayer game (session based), but I'm not sure about what I should use. I think I have to make a new network layer, but I don't know if I should use TCP/IP or if there is a better way to do a bidirectional connection in real time (without TCP sockets). It's there a better way to do it without TCP sockets? (Sorry for the bad english)
I have a variable like health that is replicated over the network and it works sort of. The server is not getting the clients health updated but the client can see the servers value being update. While the clients health is not updated between each other.
Do I need to add that in a function with UFUNCTION(Server, Reliable) or a NetMultiCast?
Server is Updating Clients not in opposite way
Health is something what should be replicated without messages
I know but this is just for testing
Its up you you how you want to replicate
to all clients
but you can be also more specific
when you will use DOREPLIFETIME_CONDITION
Is this the right way of calling it?
UPROPERTY(Replicated)
float Health;
//.h
UFUNCTION(Server, Reliable, WithValidation)
void UpdateHealth();
void UpdateHealth_Implementation();
bool UpdateHealth_Validate();
//.cpp
void ARPGProjectCharacter::UpdateHealth_Implementation()
{
Health += 0.01f;
}
bool ARPGProjectCharacter::UpdateHealth_Validate()
{
return true;
}
I just tested it and I am getting the right values displayed for each player
Looks correct!
So when would you use NetMultiCast what sort of sittuation?
Multicas should be called from server
basically something like Client ---> Hey I m doing something ---> Server will do it and ----> tell other clients about what are you doing
multicast is nice for e.g. telling all clients to play a particular visual effect
or maybe turning the visibility of an object on/off
the multicast effect can usually be simulated with a replicated property with repnotify too, though without arguments obviously
Basically you need distinguish between what you want to replicate really often via replicated value or one shot messages like Multicasts
careful with unreliable multicasts though, unlike reliable ones they can end up waiting a long time before being sent
I am not sure how it works with unreliable in UE but low priority things like VFX should not be never reliable
unreliable for everything else is sent instantly
its just unreliable multicast that's slow
its a design decision, though i cant remember the exact reason
that's fine. It's not important how fast the other player will see my PFX
i believe it waits until the next netupdate
if there is tons of PFX overlapping each other
yeah, but depending on how youre using it, you could end up with surprising results... e.g. an explosion effect following 1 second after it should
so unreliable means it will be delivered but it has low priority ? or it's a chance that it will be not deliverd ?
unreliable in and of itself just means it wont resend it, ever
reliable will wait for response from client that it received it
otherwise resend after x amount of time
Well it's easy to set all to reliable but it's definitelly not good idea
the fact that unreliable multicast is slow is because they intentionally put it in queue until next netupdate, which is potentially minnetupdaterate
So It should be based on your priorities
yah definitely
yeah, though it would arguably need to be reliable
then again, you'd do that with replicated var anyway, whcih is always reliable
but what I have in my hands don't need to be replicated all the time
its not, server only reps vars when they change on server
it's something not much changed frequently
ah I see really ?
he is replicating only changes ?
hmmmmm
actually dont quote me on that, ive never actually tested it
i kinda assumed
there are several systems in the works though, like dynamic net frequency
If it's replication only changes that's is fucking poverfull
But still I don't think so :0
yeah, i kinda assume the engine makes a VarOldValue, then on netupdate it checks if Var != VarOldValue, replicate
Do you have any experience with root motion via network ?
There is some support for that in CharacterComponent does it works nicely ?
I mean CharacterMovementComponent
never tested it to be honest, but its all over the place, including servermove/replicatemovetoserver
so i'd assume it works given how much work is put into it
its even in clientsmoothing
well root motion looks always better then not root motion
the question is how it's replicated according to this
It's very sad
This a brief example of using root motion for a networked game. It accompanies the short blog post at http://www.casualdistractiongames.com/single-post/2017/...
On client side it looks horrible
I mean on other client sides. I think the main problem is that there can't be any movement prediction
hmm so it interpolates between t and t-1, instead of extrapolating from t to t+1 as usual
I will test it tomorrow but there are some animation which does not have linear movement speed
and in this case it's not easy to use non root animations
you know something like asia style animation you will jump then the movement is slowed down in the air and then you will land very fast and then the movement is almost stoped before the hit and then it's very fast again etc
ah yeah
and in this case doing some manual movement to match the animation it's quiet shitty :0
must be hard working it into the gameplay either way no?
๐
its a very cool effect though