#Client player movement

1 messages ยท Page 1 of 1 (latest)

fierce wind
#

Post your movement code here and we can take a look at it

orchid basin
#

The host works as programed

jovial stirrup
#

i think you probably want to send the actual movement distances not the inputs, as-is this will apply different amounts of movement if the deltatime isn't exactly the same on the server and client at all time

#

also watch out for sending RPCs in update without any rate limit, remember some people have 320hz monitors ๐Ÿ˜„

fierce wind
#

If you want things to be server authoritative, then when you send inputs, you also need to send the tick or timestamp the input happened. Then you can calculate the proper speed

orchid basin
jovial stirrup
#

well you probably don't need to send movement updates 144 times a second either, just keep that in mind when you come to optimizing your bandwidth usage!

orchid basin
#

should I use a limited update?

#

like once every few secs

jovial stirrup
#

it depends on how your game plays and how much bandwidth you want to dedicate to movement updates i guess, but yeah i would generally start by limiting it to x updates per second

orchid basin
orchid basin
#

The code has been modified and the code runs smoother than anticipated

fierce wind
#

Normally you would use fixed update to send inputs

jovial stirrup
orchid basin
jovial stirrup
#

what did you change?

orchid basin
#

I am not infront of the computer running it at the moment but Blackbox.ai detected that my code would cut off the final frame from the movement script causing the buffering/speed issue

#

This apperatly would only apply to anyone running the client and not the host

jovial stirrup
#

so you didn't read my original suggestion and pasted it into an AI instead...? i don't think i'm going to keep replying here haha

orchid basin
#

Tweaked my code

#

Than implement what you explained the issue was + the modified code to get an understanding of the issue

orchid basin
orchid basin