13

Caching Data to Decrease Bandwidth

When it comes to reducing bandwidth usage and optimizing network usage in game development, there is a powerful technique that always comes to mind: caching.

Caching solves the question of why we should keep downloading the same data repeatedly when we can download it once, store it somewhere, and reuse it whenever needed. In this chapter, we will delve into caching techniques and learn how to apply them to efficiently download, store, and reuse images and other relevant data. For that, we will use a database that contains image URLs that we are going to download directly from the internet into our players’ machines.

To demonstrate the implementation of these caching techniques, we will prototype a new feature ...

Get The Essential Guide to Creating Multiplayer Games with Godot 4.0 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.