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

Only send terminal state to interacting players #479

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

@SquidDev
Copy link
Contributor

@SquidDev SquidDev commented Oct 12, 2017

This splits the computer state (blinking, label, etc...) and terminal state into two separate packets. When a computer changes, the computer state is sent to all players and the terminal state is sent to players who are currently using the computer. This reduces network usage by a substantial amount.

CCTweaks has employed a similar optimisation for a while now, and not seen any adverse effects.

There are several further optimisations which could be implemented (such as only sending regions of the terminal which have changed) but that is not within the scope of this PR.

SquidDev added 2 commits Oct 12, 2017
This splits the computer state (blinking, label, etc...) and terminal
state into two separate packets. When a computer changes, the computer
state is sent to all players and the terminal state is sent to players
who are curerntly using the computer.

This reduces network usage by a substantial amount.
Previously they were not marked as such, meaning computer state was not
broadcast to the client until blinking state changed.
@thatcraniumguy
Copy link

@thatcraniumguy thatcraniumguy commented May 23, 2018

Can one of the admins verify this patch?

ccserver pushed a commit to ccserver/ComputerCraft that referenced this pull request Sep 16, 2019
…network-optimisations

Only send terminal state to interacting players
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants