Page 1 of 1

Responsive custom movement for networked play

Posted: Mon Oct 30, 2017 9:18 pm
by >@tack!<
I'm currently making a walldodge mod and I stumbled upon the issue that, when using it online, there is a delay when performing the walldodge (right now the client calls a function on the server which does some calculations and changes the velocity of the playerpawn). The higher the ping the bigger the delay of course. This also happens with most other things like the jumpboots. But preferably it should be responsive like dodging and jumping.

How do I do this?

I understand that there needs to be some kind of clientside simulation/prediction while the server has to correct the client to its actual location.
I have looked into the playerpawn class and saw the several functions that seem to be responsible for this like PlayerMove, ProcessMove, ReplicateMove and ServerMove. I kind of understand what these functions do but I don't know if I can use these to my advantage. I also would want to avoid making custom playerpawns since I do not want to break other mods that might do so.

So to summarize, I want to make a custom movement, in the form of an instant velocity change, responsive on the client like jumping and dodging already are.

Thanks in advance

Re: Responsive custom movement for networked play

Posted: Mon Oct 30, 2017 10:35 pm
by JackGriffin
Look at the guided redeemer for what to expect in terms of response time. Doing it externally like you want will be messy and laggy if you are making alterations to the existing prediction code for player location.

Re: Responsive custom movement for networked play

Posted: Mon Nov 06, 2017 5:15 pm
by >@tack!<
Hmm yeah I figured I have to do it in playerpawn anyway. Thanks

Re: Responsive custom movement for networked play

Posted: Mon Nov 27, 2017 12:36 pm
by ~{kRiD}~
>@tack!< wrote:I'm currently making a walldodge mod and I stumbled upon the issue that, when using it online, there is a delay when performing the walldodge (right now the client calls a function on the server which does some calculations and changes the velocity of the playerpawn). The higher the ping the bigger the delay of course. This also happens with most other things like the jumpboots. But preferably it should be responsive like dodging and jumping.

How do I do this?

I understand that there needs to be some kind of clientside simulation/prediction while the server has to correct the client to its actual location.
I have looked into the playerpawn class and saw the several functions that seem to be responsible for this like PlayerMove, ProcessMove, ReplicateMove and ServerMove. I kind of understand what these functions do but I don't know if I can use these to my advantage. I also would want to avoid making custom playerpawns since I do not want to break other mods that might do so.

So to summarize, I want to make a custom movement, in the form of an instant velocity change, responsive on the client like jumping and dodging already are.

Thanks in advance
hey buddy i was looking into this a while back ago also. any way to do this in mutator for is buggy. the best way would be to create a new TournamentPlayer class, txtend off of parent class and proceed to add in your new states and functions.