Devlog #1 – The First Step: A Planet of Hexagons


Today marks the beginning of something I’ve dreamt about for years: Dawn to Dusk.

This will be a massive-scale, real-time 4X grand strategy game that aims to simulate everything: weather, geology, economics, cultures, and more. It’s ambitious. It’s long-term. It might take years. But it starts now.

So… where do you even begin building a living world?

Laying the Groundwork: A Spherical World

To simulate a realistic planet, I can’t rely on a flat 2D map. The world needs to be a sphere and one that feels tangible, natural, and full of dynamic geography. But this raises a big challenge: how do you grid a sphere for a strategy game?

Most RTS or 4X games use square or hex grids. Squares feel unnatural. Hexagons? Much better for movement, adjacency, and visual clarity. But the kicker is you can’t perfectly tile a sphere with only hexagons.

Enter the Icosahedron

To make this work, we start with an icosahedron: a 20-faced polyhedron that approximates a sphere. From there, we can recursively subdivide each triangle, project the points onto a sphere, and eventually end up with a grid that’s mostly hexagons—with exactly 12 pentagons sprinkled in due to geometric necessity.


This gives us a beautiful, mostly-hexagonal sphere... but doing math on it gets gnarly fast. I need a way to manage the grid.

Enter: Uber?

Yeah, Uber, the rideshare company. Turns out their engineers built a library called H3 for mapping and analyzing spatial data on Earth using icosahedron-based hex grids.

It’s open source, supports multiple resolutions, and comes packed with helpful tools:

  • Each resolution level subdivides the previous one. Resolution 0 has big hexagons; resolution 1 slices those into smaller ones, and so on.

  • You can query distances, neighbors, latitude/longitude conversions, and even generate polygonal regions.

  • It works great with spherical coordinates, which means I don’t have to write that math myself.

It’s not built for game development, but I think it’s going to save me a lot of time.

Building the Mesh Generator

To get started, I built a utility to generate 3D mesh tiles from the H3 grid at any resolution. You can find it here:
H3_World_Geometry_Generator

What it does:

  • Loops through every tile (hex or pentagon) at a given resolution

  • Converts them into mesh geometry

  • Chunks the output into manageable files for import into a game engine

Pro tip: do not try this at resolution 15. That would generate 569 trillion tiles. You’ve been warned.

Here’s what the output looks like:

Okay, it's hard to see what's going on, but this is about 7 'chunks' of hexagons, though you can't really see the individual hexagons unless you look at the edges!

Choosing the Right Resolution

Picking a resolution isn’t just a technical decision, it affects gameplay, simulation fidelity, AI complexity, and server performance. Uber provides a handy chart showing tile counts and average areas for each resolution.

ResTotal number of cellsNumber of hexagonsNumber of pentagons
0 122 110 12
1 842 830 12
2 5,882 5,870 12
3 41,162 41,150 12
4 288,122 288,110 12
5 2,016,842 2,016,830 12
6 14,117,882 14,117,870 12
7 98,825,162 98,825,150 12
8 691,776,122 691,776,110 12
9 4,842,432,842 4,842,432,830 12
10 33,897,029,882 33,897,029,870 12
11 237,279,209,162 237,279,209,150 12
12 1,660,954,464,122 1,660,954,464,110 12
13 11,626,681,248,842 11,626,681,248,830 12
14 81,386,768,741,882 81,386,768,741,870 12
15 569,707,381,193,162 569,707,381,193,150 12

At resolution 6, we get around 14 million tiles worldwide.

That’s a lot—but it’s doable for a server-hosted game like Dawn to Dusk, where the heavy lifting is done server-side instead of on a player’s machine. That said, I’ll be doing plenty of testing to see if 6 is a sustainable number once weather, ecosystems, and AI come into play.

The Italy Test

Why resolution 6? Because of Italy.

Italy is one of the most culturally and geographically interesting places in the world. Yet in most Earth maps in strategy games, it’s barely more than a handful of tiles maybe 5 hexes wide. That’s tragic.

^ Italy in Civ is tragic!

At resolution 6, Italy is ~37 tiles wide. That’s enough to have cities, factions, wars, and culture all within the peninsula. That’s the kind of resolution I want for my simulated world even if it’s not Earth.

^ Italy at resolution 6

I’m not just building another Civ clone, I want a world that feels alive, textured, and explorable. I want it to pass the Italy Test.

Thanks for reading! This is the first of many devlogs as I chip away at this crazy dream of a game.

If you're excited by the project or just want to help keep me motivated, consider buying me a coffee.

Until next time,
Tim

Leave a comment

Log in with itch.io to leave a comment.