The grid tool says it can make a perfect grid. It has angles that are exactly 90 degrees. But, is it truly perfect? Let’s figure out what’s the best way to make a grid.
Introduction
Which of these two square grids do you believe has more zoning cells?
Both grids cover the same area, with each side being 1008 meters long, which is about 100 hectares for each grid.
The grid on the left might seem like the obvious choice because it has exactly 12 zoning cell widths between the roads, which is the most you can fit without leaving a gap. It’s also a convenient length for drawing with the road tool since you can easily line up the zoning circles. Additionally, it happens to be the widest width you can achieve with the parallel road mode.
However, if we count them all, the grid on the right actually has more zoning cells, even though it has large holes in the middle of each block. The right grid is also more cost-effective to build and maintain because it has less roadway.
The left grid contains 12²×9² = 11,664 cells, while the right grid has (16² – 4²)×7² = 11,760 cells.
But can we do even better? Let’s calculate it! (Spoiler: Yes, we can.)
Optimal Square Grids
First, let’s establish some variables:
- x represents the length of the road on one side of a block, as determined by the road tool.
- z stands for the length of zonable frontage.
- h represents the length of the side of the hole in the middle of the zoning.
- W denotes the width of the road being utilized.
Using these variables, the zonable area within each block can be calculated as the space inside the block (z²) minus the part that’s too far from the roads (h²). Both of these are directly related to the block length because the frontage is the block size minus the road width (z = x – W), and similarly, the hole size is the frontage minus how far the zoning extends (h = z – 2 × 6 x 8m = x – W – 96m).
The density, which we want to optimize, can be expressed as:
(z² – h²) / x² = ((x – W)² – (x – W – 96)²) / x² = 192×(x – W + 48) / x²
To find the maximum density, we can use calculus. The maximum occurs where the derivative is zero:
0 = d/dx 192×(x – W + 48m) / x² 0 = (384W – 192x + 18432) / x³ 0 = 384W – 192x + 18432 x = 2W + 96m
Substituting this result into the previous formula for the hole size simplifies interestingly:
h = x – W – 96m h = 2W + 96m – W – 96m h = (2W – W) + (96m – 96m) h = W
In other words, to create an optimal square grid, leave a hole in the middle that is the same size as the road you’re using.
Now, let’s see how this concept works for a narrow road.
Block Size | Density | Road Needed |
---|---|---|
112m (14u) | ³⁶⁄₄₉ ≈ 73.5% | ²⁸⁄₉ ≈ 3.11 m/cell |
128m (16u) | ¾ = 75% | ⁸⁄₃ ≈ 2.67 m/cell |
144m (18u) | ²⁰⁄₂₇ ≈ 74.1% | ¹²⁄₅ = 2.40 m/cell |
With 16m roads, by employing the optimal square grid, you can achieve approximately 2% more zoning cells in the same area and save about 14% on road costs, both upfront and in maintenance, compared to the square grid without the hole in the middle.
In summary:
- 112m for tiny (8m) roads like the gravel road
- 128m for small (16m) roads like the two-lane road
- 144m for medium (24m) roads like the four-lane road
- 160m for large (32m) roads like the six-lane road
But in reality, you might not want to zone on the medium or large roads.
Conclusion
I’m glad you came to have a look at my guide! It’s great to hear that people enjoyed the one I wrote for the first game, and when the new one came out with a different zoning depth, I knew it was time to update it.
Please let me know in the comments what else you’d like to see. I’m excited to explore rectangular grids, other patterns like herringbone layouts, and see how the new alleys work in practice. Hopefully, that will lead to more sections here once I create a few more cities.
That's everything we are sharing today for this Cities: Skylines II guide. This guide was originally created and written by me22ca. In case we fail to update this guide, you can find the latest update by following this link.
C’est super ! Beau calcul ! MErci !