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

Send to clients only changed node metadata instead of whole mapblock #3775

Closed
wants to merge 1 commit into from

Conversation

RealBadAngel
Copy link
Contributor

Rebased and improved #3166
fixed so far:

  • some compilation errors
  • sending meta packets to distant players (happened sometimes)
  • meta being null issue
  • removed duplicate packets
  • gather all changes done in one tick into single packet

TODO:
all goals achieved :)

@paramat paramat added this to the 0.4.14 milestone Feb 24, 2016
@RealBadAngel RealBadAngel changed the title Send to clients only changed node metadata instad of whole mapblock Send to clients only changed node metadata instead of whole mapblock Feb 24, 2016
@est31 est31 added the WIP The PR is still being worked on by its author and not ready yet. label Feb 24, 2016
@nerzhul
Copy link
Member

nerzhul commented Feb 25, 2016

i don't think protocol should be bumped. v27 was created during this devel cycle and less than 1 month ago.

writeU16(os, p.Y);
writeU16(os, p.Z);
} else {
u16 p16 = p.Z * MAP_BLOCKSIZE * MAP_BLOCKSIZE + p.Y * MAP_BLOCKSIZE + p.X;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i don't think this compression is useful; you only add calculs on server side & client side for 4 bytes of data

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nerzhul 1. the calculations are quite lightweight as MAP_BLOCKSIZE is power of two, probably writing the u16 to the array would require more computation (putting the stuff to the array, incrementing the counter every time times), I guess compilers optimize this to a shift, and 2. changing this would require a change of the map format.

@paramat
Copy link
Contributor

paramat commented Feb 26, 2016

RBA is apparently seriously ill in hospital and won't be able to work on this, perhaps someone can take over on this PR?

@est31
Copy link
Contributor

est31 commented Feb 27, 2016

@paramat I'll first get my two PRs into reviewable state and then take care of this one, it already is in a very good state.

@est31
Copy link
Contributor

est31 commented Mar 12, 2016

#3848

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@ Client / Audiovisuals High priority Performance @ Server / Client / Env. WIP The PR is still being worked on by its author and not ready yet.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants