Hi,
I’ve a simple multiplayer project with a dedicated server and 2 players. On start : the two players have a simple movement that is “go ahead”.
The replication is ON on both players so my two players are moving. But their movement depend on their own tick (so it depend of their own computer tick) instead of server tick.
So when i wait : i can see that a player is a littlebit faster than the other. Because only the position is replicated with multicast. So it’s easy to cheat if you have a better computer.
I would like every movement is generated on the server and multicasted to client : like the server stream the mouvement and clients only send the touch-key event.
I tried that : (see picture)
But, here i have a problem on console client it say :
LogNet: Warning: UNetDriver::ProcessRemoteFunction: No owning connection for actor ThirdPersonCharacter_C_1. Function Start will not be processed.
It’s hard to understand the replication concept, maybe i’m wrong but i want pure server game streaming to prevent cheating. Could you help me please ?
Yes, that’s the problem, the movement is replicated but it not synchronised because it depend of client’s delta second. Not server. And then, those are not the same for the two clients because it doesn’t depend of time but of computer speed.
So i would like to make the movement on the dedicated server to use his own delta seconds and then stream the new position to all client.
So my start event is “run on server”. And the movement created by server will be multicasted by replication to clients.
EDIT : I found a video (https://www…com/watch?v=XknYqK3qiMI) that is fixing a speed limit…hmmmmm i should try but it looks bad work… i don’t like it. But if you have no solutions i would try that.
you don’t need to add a tick to an actor that has tick built in.
take away the event tick. and from the on begin play connect to the add movemenet input node. get world delta secons IS the event tick, so you are basically ticking twice
Yes, that was i did on first time. But add movement need a scale value that is different on every clients. So they don’t go at same speed. I’ll retry but i ever did…
EDIT : Nope, after retrying : no move if it not in a tick. And if it on : it not synchronised.
“The server will automatically make sure the positions are correct based on server time.” Really ? Why they don’t move at the same speed and if i select window of player one he is faster, if i select window of player two : player two now is faster. Because movement is based on client timer… Or maybe i’ve another problem i don’t know…
Ok, after a lot of tries, i put a constant in add movement input but it doesn’t work with a begin event, it need a tick because it “add” a mouvement. Normaly it’s a touch key or pad that send “add” input like a tick.
So i think there is a client that is sending more “add” than the other : It’s why there are not sync.
The probleme is that speed depend of number of “add” input sends to the server… i need to find a solution. I think i’ll try the “max speed” technique of the guy in the video. He speak about cheat so i think we have the same problem.
I’ll try with a simple set position and debug the distance between the two player. Because maybe that i see is not that it is.
Thank you for your help MindfieldsTech. It not resolved, but it help !
as a workaround. instead of add movement, you can just set the minimum movement speed to a number in the movement component of the character/actor. instead of minimum walking speed 0. make it your desired speed.
no. in your characters component list on the left, there is a “movement component” click that and go through the list, you will see a “walk speed” section. In there set minimum walk speed from 0 - your desired speed.
Ok so the solution would be to limite the walk speed with a minimum too maybe : like 24-25 for a constant speed maybe. i will try it to.
But i’m on an idea to make it work with server authority because it’s better if it work like a stream. So it’s the server that need to stream the positions.