Skip to content

Conversation

@Argmaster
Copy link
Collaborator

@Argmaster Argmaster commented Apr 17, 2025

I completely removed neighbor updates on client side, now server has to send block updates for changed blocks and any neighbors that got affected. This is also a step towards fixing #1217, It would require adding updateNeighbors parameter to cmpxchgBlock or some other way to signalize that neighbors should remain unchanged. Depending on significance of network overhead maybe it would be good to allow updateBlock protocol to carry multiple blocks at once.

Resolves: #610
Related to: #1309
Related to: #1214

@Argmaster
Copy link
Collaborator Author

w/o this change filling area selected on image below with stone takes >1min (didn't wait for it to finish, it may even crash)

Screenshot 2025-04-17 161616

with change, it takes few seconds.

Cubyz.2025-04-17.16-19-07.mp4

@Argmaster Argmaster marked this pull request as ready for review April 22, 2025 23:15
@Argmaster
Copy link
Collaborator Author

Alright, depending on your opinion on reversing mesh ownership logic for regenerateMeshList it should be ready for re-review.

@Argmaster Argmaster self-assigned this Apr 26, 2025
@Argmaster Argmaster added enhancement a new feature or improvement engine labels Apr 26, 2025
@Argmaster Argmaster added this to the Short-Term Goals milestone Apr 26, 2025
@Argmaster
Copy link
Collaborator Author

Argmaster commented Apr 27, 2025

Resolved conflicts with latest master.

@Argmaster
Copy link
Collaborator Author

Alright, changed mostly as requested, ofc I had to talk back 😝

@Argmaster Argmaster mentioned this pull request Apr 28, 2025
@Argmaster
Copy link
Collaborator Author

Alr getting rid of that formatting change was harder than I though xD
But its gone now.

@IntegratedQuantum IntegratedQuantum merged commit 64ce0ed into PixelGuys:master May 1, 2025
1 check passed
Argmaster added a commit to Argmaster/Cubyz that referenced this pull request May 21, 2025
* Batch block updates

* Apply review change requests

* Allow blockUpdate to carry multiple block updates in single message

* Read until there is nothing left

* Use mesh_storage.BlockUpdate

* Break instead of boolean

* Restore client side neighbor updates

* Move side check in blockUpdate out of the loop

* Update src/utils.zig

* Fix minor issues

* Reverse ownership logic + change contains into liesInChunk

* Update liesInChunk

* No name for upadeBlock param

* Apply review change requests

* Fix formatting

* Restore onBreakClient where it should be

* Update src/renderer/chunk_meshing.zig

* Update src/renderer/chunk_meshing.zig

* Converge formatting with master

* fix formatting (ziglang/zig-spec#38 is so stupid)

---------

Co-authored-by: IntegratedQuantum <jahe788@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

engine enhancement a new feature or improvement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Process block updates in batches to avoid remeshing for every single block update in a chunk.

2 participants