Commit Graph

9 Commits

Author SHA1 Message Date
85db85a737 refactor(client_world): use concurrent data structures for chunk management
Replace std::shared_mutex and std::unordered_set with tbb::concurrent_hash_map for chunk storage, tbb::concurrent_queue for pending uploads, and absl::flat_hash_set for player chunk positions. This improves thread safety and reduces locking overhead. Refactor receive_chunk and request_chunk to work with the new concurrent model.
2026-06-29 14:14:36 +08:00
43395d4794 feat(dev_panel): split world tab; add chunk request logging and fix flag reset 2026-06-27 12:07:39 +08:00
4631bbe6d6 feat(gameplay): optimize chunk request with player chunk tracking
Add `update_player_chunk()` method to `ClientPlayer` that triggers a chunk request when the player moves more than 2 chunks away from the last recorded chunk. Introduce an atomic `m_requesting_chunk` flag in `ClientWorld` to prevent concurrent requests. Rename `m_player_chunk_pos` to `m_last_chunk_pos` for clarity.
2026-06-25 21:57:55 +08:00
db10d30dc2 fix: correct neighbor block indexing and add time update support 2026-06-25 21:37:19 +08:00
d7d47e9e7f refactor(gameplay): split world into client and server
Remove monolithic World, Player, Chunk classes. Introduce ClientWorld, ServerWorld, ClientPlayer, and related networked components. Add Abseil dependency for logging and checks. Rename old files to pre_remove_* and update all includes and references accordingly.
2026-06-25 17:54:32 +08:00
b782b40133 feat(gameplay): add block change sync and coordinate utils 2026-06-25 17:09:41 +08:00
4a1ef54258 feat(gameplay): integrate network client and thread-safe player pos 2026-06-25 16:49:45 +08:00
cbc04f6ab0 feat(client_player): add name constructor param, remove chunk transition 2026-06-25 14:38:57 +08:00
27e3cd6851 refactor(gameplay): split Chunk into server/client variants and add networking 2026-06-23 14:49:16 +08:00