Closed starlite-developer closed 2 years ago
What is your maxBackpressure and how are you sending?
maxBackpressure is 0 (i don't know if that's an invalid value or not)
I am sending updates about 60 times a second if an update is necessary. Its a JSON response, fairly small.
I would begin by setting maxBackpressure to 1
No change.
There is definitely a change with maxBackpressure 1 instead of 0. Your sending had infinite backpressure before, now 1 byte.
If you want even less, you need to lower your system send buffer size to something like 4kb. See SO_SNDBUF
By no change I mean it's not sending the most up-to-date message from the server. It still plays a delayed "movie" at times. I have noticed overall smoothness is improved.
Oh sorry, when I was testing my websocket disconnected. I tried it again and it works.
So the slow computer is showing more like a stuttery slide show rather than a smooth movie now?
Doing this can reduce latency. Will subscribers prioritize pulling the latest audio and video streams?
I have a few questions.
I have created a multiplayer game and everything works fine. But when I try playing with a trash computer client, it can't really keep up with the data sent. I have used entity culling and other things to make it as smooth as possible and it has greatly improved, but there are a few more things I think I can do to make it run as optimally as possible.
1.) Is there a way to ONLY send the most recent message? Sometimes the trash computer lags so bad its like watching a movie of what happened the delay is so bad. 2.) Is there a build it way to measure ping. I have created my own, but it may not be as accurate. 3.) Any other tips or tricks to make uWebSockets.js work better for multiplayer games?