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

Issue with client-desync in relation to server-ticking: #196

Open
PedroMPagani opened this issue Feb 14, 2024 · 3 comments
Open

Issue with client-desync in relation to server-ticking: #196

PedroMPagani opened this issue Feb 14, 2024 · 3 comments
Labels
status: needs triage type: bug Something doesn't work as it was intended to. version: 1.20.4 Game version 1.20.4

Comments

@PedroMPagani
Copy link

Expected behavior

The expected behavior is so that when the client sends packets, they get processed "immediately", currently what Folia does for every single packet is schedule each packet as a new task, for 1L. If you notice a simple debug, (I have done this) - The time between the packets arrive and get processed should be "instantly" - this is not really a vanilla only thing, but this affects PVP overall and other actions that players would notice a 50ms latency on their action, SPECIALLY if they have a low ping too.

Observed/Actual behavior

Tt really depends on how the player client ticking is also aligned and their ping, while on a paper jar, this won't happen because when the packet arrives it gets processed, the packets are delayed by one tick from when they arrive, and they don't get processed "instantly", they only get processed on the .executeTick() method, this is causing extra delays on actions overall, specially combat in survival.

Steps/models to reproduce

log System Millis of every single packet on the .genericsFtw, and on the ensure same thread that will make the runnable process, observe the behavior of when the .handle method gets called, this will show the latency issue.
I also noticed that the latency of processing of the packets, depends on how fast/ or the timing of in which the regions are created (I am not fully sure if this is because of region creation). - I am able to notice a difference upon restarting it though, sometimes less latency, sometimes high latency.

Plugin and Datapack List

No plugins nor data packets

Folia version

[12:28:35 INFO]: This server is running Folia version git-Folia-"8939611" (MC: 1.20.4) (Implementing API version 1.20.4-R0.1-SNAPSHOT) (Git: 8939611 on dev/1.20.4)
You are running the latest version
Previous version: git-Folia-"30ee81a" (MC: 1.20.2)

Other

No response

@PedroMPagani PedroMPagani added status: needs triage type: bug Something doesn't work as it was intended to. labels Feb 14, 2024
@PedroMPagani
Copy link
Author

I don't see lots of actual solutions for this, since the new threading is pretty much tasks scheduled and shared threads across regions, I feel like possibly having sub-ticks to process incoming packets on the same region scheduled threads would possibly help. (I implemented this).

@DrBotz
Copy link

DrBotz commented Feb 15, 2024

Yes

@Netherwhal
Copy link

This is one of the few issues we still face with Folia in comparison to Paper.

@kashike kashike added the version: 1.20.4 Game version 1.20.4 label Apr 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: needs triage type: bug Something doesn't work as it was intended to. version: 1.20.4 Game version 1.20.4
Projects
None yet
Development

No branches or pull requests

4 participants