In the latest Snapshot we all see a new step the Mojang team has taken for improving Minecraft. What the Bukkit team talked about when being hired now actually is making its way into Minecraft.
What am I talking about?
The separation of Server and Client logic.
This is important, as now the server and client often miscommunicate and double check each other for no real reason. This results in client side ghosts, lag in general, chunk errors, etc.
What is being done about it?
Well, they (Team Mojang) are actively dumbing down the client so it only is a graphical filter between the server and the player. The server will do all the calculation, while the client only shows what the server tells it to show.
Let me sketch very roughly how the client-serve communication currently works:
The server and the client both have certain chunks loaded and constantly cross check these with each other. When a player destroys a block this info will be uploaded to the server and this will send it out to other clients that some player destroyed some block.
In general this should work pretty fine, but it sometimes doesn't, because the info of those chunks exists both in server and client form.
A player destroys a block, the client immediately deletes it from the chunk (Why? Because it can...). While the info of that chunk is being send to the server the client may receive the previous chunk information from the server, saying no block has been destroyed, so the block reappears in the client. Then the servers receives the updated information, deletes the block and sends this back to the client.
On a fast server this may be hardly noticeable, but with a bit of lag this may result in many blocks reappearing and then disappearing (especially if the server works with a "list of forbidden blocks" to which each update must be compared to).
To solve this Mojang is making the client accept ONLY the info from the server as true. So the player destroys a block, this info is sent to the server and only if the server send a comnfirmation back the client will show the block as deleted.
This will decrease the number of times the server has to process conflicting information, the client will become faster as it only has to do quite basic calculations.
This change will also lead to a change in the way modding works. Currently mods for multiplayer and singleplayer are developed separately. If for example someone makes a mod for singleplayer he'll have to rework it a bit to make it also work in multiplayer. If some people even want specific API support (Bukkit, Spout, ...) for those mods you'd end up making 4 separate versions.
With the new version (and API) this will become a lot easier. Mods won't break when a new update comes out (unless the thing that's being modded gets changed by Mojang), and the one version will both work for single and multiplayer.
I just saw a new Snapshot has bee released, let me take a look at it...
-ThOR
No comments:
Post a Comment