- Use the in-game editor to define the rules for creating your terrain, grass, rocks, trees, city and traffic
- Create your own unique look using the wide range of graphical settings from retro-pixelated to film-noir and more
- Walk and fly around your creation
- More features (and gameplay) coming soon...
Tile Caching = 159x Faster City Streaming
Today I want to share a technical update rather than a visual one but its a huge boost for performance. My game uses procedural city tiles. Generating a full city tile costs around 1 millisecond. When the player is flying fast over the world, dozens of tiles may need to be created quickly, and that can become a bottleneck even when each tile is loaded in a background thread (actually as a tile load task serviced by a fixed sized pool of threads). So I implemented a tile caching system and the speedups are dramatic.
Benchmark Results
Heres how long each operation now takes:
Full city generation: 1.08 ms
[/*]Generate + save to cache (first time): 4.09 ms
[/*]Load from cache (disk hit): 6.79 s
[/*]Load tile already in memory: 6.8 ns
[/*]
That means loading from cache is roughly 159x faster than generating a tile from scratch. Thats a huge performance win for streaming an open world.
[img src=\"https://cdn.cloudflare.steamstatic.com/steamcommunity/public/images/clans/44960045/735595175ef8e01fcc123de62a55cef06571d041.png\"][/img]
How the Cache Works
The core idea is simple:
[olist]Generate the tile once.
[/*]Serialize the result to disk.
[/*]Next time, load it instead of regenerating it.
[/*][/olist]Some technical details:
I compute a BLAKE3 hash of the map file to detect changes. If the map changes, the cache automatically invalidates.
[/*]Each tile uses a filename based on its coordinates, e.g. 5_7.bin.
[/*]Tile requests return a std::shared_future, so only the first thread generates the tile others wait for the same result.
[/*]The system is fully thread-safe and works perfectly with my streaming worker threads.
[/*]Where the Cache Lives
The game ships on Steam for Windows and Linux, including AppImage builds. AppImages are mounted as read-only, so the cache must go into the players writable directories, not beside the game files. Heres where tile cache files are stored:
Windows: %LOCALAPPDATA%/Infinicity/TileCache
[/*]Linux / Steam Deck: $XDG_CACHE_HOME/Infinicity/TileCache or ~/.cache/Infinicity/TileCache
[/*]This keeps everything clean, safe, and consistent with OS conventions.\n
What I (re)Learned
Caching procedural data is a massive win for performance.
[/*]Hashing the map file is a clean solution to cache invalidation.
[/*]Don\'t write to the game\'s install directory especially with AppImages.
[/*]std::shared_future is perfect for eliminating redundant work across threads.
[/*]strace is an excellent debugging tool when you want to see where your game is trying to write files.
[/*]Tile caching has completely transformed streaming performance in the world and its exciting to see how much smoother everything feels now. More updates soon!
Minimum Setup
- OS: Linux + SteamOS
- Processor: Requires a 64-bit processor and operating system
- Graphics: OpenGL 3.3
Recommended Setup
- OS: Linux + SteamOS
- Processor: Requires a 64-bit processor and operating system
- Graphics: OpenGL 3.3
[ 6381 ]
[ 5874 ]
[ 750 ]
[ 1993 ]
[ 1017 ]














