Decreased network usage by 400% for loading world


Same World 400% Less Data

Introduction

We’ve made a significant update to the world generation logic in ZomdeadZ. The new approach drastically reduces the amount of data sent to the client while maintaining the same immersive experience.

We went from 250-300kB to 50-60kb for each time the player loads more of the world. 200kB saved might not sound like a lot, but it is if you consider how often we load new parts of the world when walking, especially with lots of players online. It quickly becomes a lot of data that the server needs to send.

Old system

Previously, the server would generate the world around the player and transmit this entire region back to the client. Each time the player requested more of the world, the server would send the tiles based on the player’s current location, including data the player had already received. This approach led to a substantial amount of redundant data being sent.

How it works now

In the updated system, we now store the player's previous data request on the server. When a player requests more world data, the server compares the new position with the previous one, identifies the tiles that have already been sent, and only sends the new tiles. This optimization significantly reduces the data transmitted to the client.

Result

This change has led to a reduction of approximately 400% in the amount of data sent to the client. This made a big difference in the feel of the game as now new terrain loads much faster.

Leave a comment

Log in with itch.io to leave a comment.