Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Position correction seems to be wrong sometimes. #98

Closed
AmonGruenwald opened this issue Nov 4, 2021 · 1 comment
Closed

Position correction seems to be wrong sometimes. #98

AmonGruenwald opened this issue Nov 4, 2021 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@AmonGruenwald
Copy link
Contributor

Players sometimes get corrected to positions very far away or positions that do not seem plausible.

@AmonGruenwald AmonGruenwald added the bug Something isn't working label Nov 4, 2021
kb173 added a commit that referenced this issue Nov 6, 2021
@kb173
Copy link
Contributor

kb173 commented Nov 6, 2021

During these corrections, there is a large lagspike on the server:

image

This is accompanied by a constant framerate decrease on the client:

image

It seems like that is caused by the MinimapIcon's pixel read for whatever reason - must be an underlying issue with the Viewport image, maybe a thread stall? d4b3ea9 commented out the MinimapIcon and it seems like that at least caused a significant improvement.

Two other take-aways from this:

  1. The client can bombard the server with packets, stalling it and creating lagspikes for everyone (essentially a very easy DDoS attack). We need to find a way to prevent that.
  2. The lagspike is mostly caused by the Ringbuffer. It's implemented pretty inefficiently - we could try to turn it into a static array rather than constantly dynamically resizing it, or even write a simple C++ module for it since it's so central and commonly used.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants