mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-16 18:59:00 +00:00
This reverts commit b172c93e45e60ee3dbfd8a2efbede60b894673a3. I made a significant mistake with this change: the scaling factor of batch-by-chunk is O(nSendBytes), while the scaling factor of sending directly to players is O(nSendBytes * nActivePlayers). It seems like the real problem is that this system isn't getting enough usage. While it does reduce compression efficiency in some cases, it falls back to letting the sessions do individual compression when the amount of data is less than 256 bytes anyway (compression-threshold in pocketmine.yml). My motivation for scrapping this system was to reduce the broadcast system's complexity to make it easier to thread the living shit out of compression, but it seems like this change was a step in the wrong direction for performance. A few steps can be taken to improve the usefulness of this system (and also improve output bandwidth): - Make general entity updates use this system. Movement and velocity already kinda used this system, but crucially, players did not, because we couldn't prevent the player from receiving its own movement updates if we did that, which caused all kinds of problems. - Therefore, we need to reintroduce static "self" entity IDs, like we had in the shoghi days when entity ID 0 referred to the "self" player. - However, since entity ID 0 has a variety of interesting bugs since it usually refers to "no entity" in MCPE, it would be better to use 1 (or 2, like MiNET does). - The fixed ID used should be close to zero to maximize varint encoding efficiency. - We assumed that changes to player's position and velocity would be ignored by the client. This assumption depends on the client and could be broken at any time, so it's best not to rely on it. - Make block updates use this system (when chunk updates are not sent). Currently, block updates use a separate mechanism which creates a second batch for every active chunk, which wastes CPU, and decreases bandwidth efficiency on multiple fronts (reduced compression efficiency, more cross-thread interactions, more bytes wasted on RakNet packet headers).
A highly customisable, open source server software for Minecraft: Bedrock Edition written in PHP
Getting started
Discussion/Help
For developers
- Building and running from source
- Latest API documentation - Doxygen documentation generated from development
- DevTools - Development tools plugin for creating plugins
- ExamplePlugin - Example plugin demonstrating some basic API features
- Contributing Guidelines
Donate
- Bitcoin Cash (BCH):
qq3r46hn6ljnhnqnfwxt5pg3g447eq9jhvw5ddfear
- Bitcoin (BTC):
171u8K9e4FtU6j3e5sqNoxKUgEw9qWQdRV
- Stellar Lumens (XLM):
GAAC5WZ33HCTE3BFJFZJXONMEIBNHFLBXM2HJVAZHXXPYA3HP5XPPS7T
- Patreon
Licensing information
This project is licensed under LGPL-3.0. Please see the LICENSE file for details.
pmmp/PocketMine are not affiliated with Mojang. All brands and trademarks belong to their respective owners. PocketMine-MP is not a Mojang-approved software, nor is it associated with Mojang.
Description
Languages
PHP
99.9%