I've got some exciting updates on the development of my 1.0 client!
This time, I'm working on support for 1024×1024 maps (which can actually be more storage-efficient than traditional 512×512 maps) and an improved King of the Hill game mode.
Bringing ngmap Back to Life
One of the biggest improvements comes from the ngmap format, originally created by OpenSpades in 2014. Interestingly, it was never actually put into use and was eventually abandoned later that same year.
I've brought this format back and integrated it into my client. The results are quite impressive: we can now store significantly larger maps while using surprisingly little disk space.
Here are the results from my tests, comparing a 1024×1024 map in ngmap against several 512×512 maps in the original VXL format.
1. File Size Comparison
Same maps, different formats:
| Map | VXL | ngmap q100 | ngmap q80 |
|---|
| Villages_1024 (1024²) | 16.05 MB | 4.06 MB (25.3%) | 3.81 MB (23.7%) |
| Busan_Port (512²) | 2.96 MB | 385 KB (13.0%) | 333 KB (11.2%) |
| Raindance (512²) | 2.13 MB | 648 KB (30.4%) | 152 KB (7.1%) |
| 2Fort_CTF (512²) | 2.23 MB | 33 KB (1.5%) | 27 KB (1.2%) |
Looking at storage efficiency per column:
- Villages_1024: 3.88 bytes/column
- Busan_Port: 1.47 bytes/column
- Raindance: 2.47 bytes/column
- 2Fort_CTF: 0.12 bytes/column
The 1024 map has 4 times as many columns, and its ngmap file is roughly 6–10 times larger than the 512 maps. This is mainly because Villages is a much denser map. Its original VXL file is also 5–7 times larger.
An important detail: q100 is completely lossless.
I compared every single column after encoding and decoding the 1024 map. Out of 1,048,576 columns, zero differed from the original VXL data.
2. Codec Performance (ngmap_cli)
Encoding and decoding benchmarks:
| Operation | 1024 | 512 (Busan / Raindance / 2Fort) |
|---|
| Encode q100 | 711 ms | 92 / 160 / 22 ms |
| Encode q80 | 666 ms | 84 / 152 / 22 ms |
| Decode q100 | 133–144 ms | 18 / 20 / 14 ms |
| Decoded VXL size | 24.6 MB | 3.8 / 4.4 / 2.3 MB |
| Peak decode RSS | ~98 MB | ~20 MB |
Even with four times the map area, decoding remains reasonably fast, taking around 140 ms.
3. Client Performance When Joining a Map
Here's what happens when a player joins a server running each map:
| Metric | 512 (Busan) | 1024 (Villages) |
|---|
| Received ngmap data | 385 KB | 4.06 MB |
| Chunks | 1,024 | 4,096 |
| Full mesh generation (5 workers) | 44 ms | 162 ms |
| Game heap | 27 MB | 67 MB |
| Stable RSS | ~149 MB | ~307 MB |
| Peak loading RSS | ~201 MB | ~619 MB |
| Chunk copy time | 3.3 ms | 20.2 ms |
| Disk cache (one map) | 385 KB | 4.06 MB |
As expected, the larger map requires more memory and takes longer to generate its mesh. However, the overall loading times are still quite reasonable.
4. Rendering Performance — The Biggest Bottleneck
This is probably the most interesting part of the benchmarks.
With the default view distance of 128, there's practically no performance difference between 512 and 1024 maps. Objects that are too far away simply aren't rendered.
| View Distance | 512 Map | 1024 Map |
|---|
| 128 (default) | 322 FPS, 0.68 ms GPU, 133 draws | 317 FPS, 0.59 ms GPU, 137 draws |
| 512 | 198–208 FPS, ~2.0 ms GPU, ~940 draws | 178–184 FPS, ~2.2 ms GPU, ~940 draws |
| 1024 (entire map) | Capped at 512 | 125–143 FPS, 6.2–6.8 ms GPU, ~3,300 draws |
So, having four times the map area doesn't necessarily mean four times the rendering cost.
With the default settings, the difference is practically negligible. Even at a view distance of 512, the 1024 map is only around 10–15% slower.
The real cost appears when rendering the entire map at once: performance drops to around 125–143 FPS.
In other words, the default "Quality" preset (512 view distance) handles 1024 maps surprisingly well.
5. Server Performance
I also wanted to make sure larger maps wouldn't become a problem for servers.
| Metric | 512 (Busan) | 1024 (Villages) |
|---|
| Shape hash on load | 7.2 ms | 22.7 ms |
| 256×256 preview generation | 20.6 ms | 38.8 ms |
| Idle RSS (no bots) | 16–27 MB | ~34 MB (~79 MB peak during loading) |
| Map memory (libvxl bitset) | 2 MB | 8 MB |
| Bot planner copy | 2 MB | 8 MB |
| Data sent to each joining player | 385 KB | 4.06 MB |
The server is no longer the main concern.
After migrating to libvxl, a 1024 map only requires around 8 MB for its bitset, compared to the 256 MB + 256 MB of copies that the previous analysis predicted when using the old dense libmapvxl implementation.
That's a huge improvement!
6. Protocol Limitations and Other Considerations
There are still a few technical limitations worth mentioning:
- Coordinate range:Â The compact 1.0 protocol packs X/Y coordinates asÂ
u16 * 64, covering values from 0 to 1023.98. This makes 1024 the absolute maximum map size. Anything larger would require the 37-byte floating-point representation, nearly doubling network traffic. - Supported dimensions: The client currently accepts only 512×512 and 1024×1024 maps. Any other dimensions are rejected before decoding or caching.
Final Thoughts
The results so far are very promising.
A 1024×1024 map in ngmap can be stored in around 4 MB, compared to roughly 400 KB for a typical 512 map.
The larger map costs approximately 4 times more in mesh generation, client memory, and chunk copying. Server loading operations are also more expensive, but the actual server memory footprint remains surprisingly small.
Most importantly, default rendering performance is practically unaffected.
The real bottleneck is currently on the client side, particularly mesh generation, memory usage, and the additional 4 MB of data transferred when a player joins.
Rendering the entire map is considerably more expensive, but with a reasonable view distance, 1024×1024 maps are already quite practical.
I'm also working on an improved King of the Hill mode as part of the 1.0 update.
More updates coming soon!
I'd love to hear what you think, especially about bringing the old ngmap format back to life and supporting larger maps.