4 ms·
Vanilla (java) Minecraft works ok until you start to push it in any serious way. While the limitations are easy to see when you mod it, you can still hit some s
by pdkl95 11y ago
Vanilla (java) Minecraft works ok until you start to push it in any serious way. While the limitations are easy to see when you mod it, you can still hit some serious problems in vanilla.
One of the nastier problems is how chunk[1] updates are performed. It used to be really bad: every time a block was added/modified/removed, the entire chunk (!) used to be sent to all the clients. It's somewhat better now, but modifications to the world still cause a lot of data to be sent[2] to the clients.
Even worse are the lighting recalculations. These happen on the server, which recalculates the lighting in up to a 16-block radius every time a torch is placed. These updates also happen when blocks are changed... and when redstone dust or redstone repeaters change their value, as they give off light. Of course, as these changes can span multiple chunks, changing redstone or placing a torch can trigger multiple chunks updates that need to be sent to each client.
This data-update problem is made much, much worse because of a particular design decision in Minecraft: each block stores a flag indicating if it is the top block in it's column (that is, it receives sunlight during the day). This means any change in the top block or any empty space above it causes the entire vertical space from sky to the top block to be searched. This is the cause of some of the nastier "lag spikes".
While it's a few years old now and addresses older Minecraft versions (1.5/1.6), I highly recommend watching TrazLander's investigation and analysis[3] of how these lighting calculations can destroy framerate. It is very enlightening about this weakness in Minecraft.
[1] The sparse octree that Minecraft uses to store the world is stored in 16x16 block horizontal, 266 block high sections called "chunks" http://minecraft.gamepedia.com/Chunk http://minecraft.gamepedia.com/Chunk
[2] Well, usually. Minecraft has always had bugs where updates would be dropped or missed, resulting in "world holes". This has also improved, but but not completely - world holes still happen, especially during heavy server load.
[3] https://www.youtube.com/watch?v=FUpwSZte4TA https://www.youtube.com/watch?v=FUpwSZte4TA