Posted July 30, 2025 by Rakudajin
Today's devlog is about a minimap and tilemap chunking I've implemented in Godot. This time, the devlog is way more technical, as I did just one small thing, but it was an interesting technical challenge.
So the challenges were:
So first, minimap.
My first idea was to make it like I did for a jam - drawing primitives, but since it is CPU-based, and the area I wanted to draw is ~320x240 pixels, with 3 layers (biomes, features, units), I thought that it might make the game stutter.
The next idea was multimeshes. It was perfect when minimap consisted of ~2000 tiles (each tile 12x9px), but when it got to ~8000 tiles (6x5 pixels) - it became too much. Or rather - it was ok, but it became too much after I added tilemap chanking on camera movement... It was cool to learn multimeshes (really liked them! way easier than they seem - although tutorials are a bit too barren in godot docs), but that was too much... I think I might have made it work if I made a good way to keep when to redraw all meshes and when to alter some (by index) - but I decided to try something else. So I kept them for unit flashing only.
The next idea was - making an image for the tilemap, and updating it when the map changes. This seemed to go perfectly! It takes more time when the game starts (as it takes time to create an image from scratch), but panning the image with camera movement was almost seamless, smooth, and had almost zero impact on the game's performance. The problem happened when I tried working with a 1024x1024 map - adding a new pixel to it was a bit too heavy, took way more than a few frames... The issue is that a whole 200000x150000 px image has to be loaded into the GPU every time something changes on the map. But with even a 512x512 (let alone 512x512) map, it works with no lag! But still, to mark the problem as solved, I need to add chunking here as well - probably split the map into images of 128x128 size, and edit only affected images, not all of them.
And the map chanking!
In short, it works like this:
So that's all I have to share! Many technical details - probably too much for those who are not into it, and not enough for those who are :D I might end up doing a tutorial about map batching and minimaps, if I have time and feel like it :)
And another big new - the reason I'm making this devlog so early in the week - tomorrow GMTK game jam starts, and I'm in! I'm so eager to get into a jam after half a year, and see how it works! This time I joined the team rather than assembled it myself - last GMTK they got #67 out of ~8000, which is crazy good and I'm happy to join them this time and see where it goes :)
It's only 4 days though, so next monday I'm back on Final Form :) But I will share GMTK results next devlog too!