World Size Comparison

By Plump Helmet Studios on

World Size Comparison

Sometimes you're using your trusty old single core laptop, other times you're sat at your 16-core battlestation which pumps out enough heat that it _is_ your heating system. Either way, the games you play should be able to adapt to the hardware gracefully.

In our medieval settlement simulator, where the world is heavily simulated alongside your gameplay, one way we're going to address this is by allowing a range of world sizes when you're setting up your game in the first place. The default size is 480x270, or 129,600 individual sectors, that will be simulated with every passing day in the in-game world, though that can go as low as 160x90 giving 14,400 sectors, or right up to 800x450 for 360,000 sectors.

To show the effect of the size on the world generation, take a look at the below visual representations along with a breakdown of their generation*.

Smallest

Name: WorldGeneration (Smallest - 160x90 - 14,400)
------------------------------------------------------------------------
0   Variables                          0.008 ms /     0.008 ms (  0.00%)
1   GenerateElevation                 94.109 ms /    94.117 ms ( 37.37%)
2   GenerateTemperature               78.566 ms /   172.683 ms ( 31.19%)
3   GenerateRainfall                  63.666 ms /   236.349 ms ( 25.28%)
4   SectorGeneration                   4.411 ms /   240.760 ms (  1.75%)
5   UpdateSectorNeighbours             3.425 ms /   244.185 ms (  1.36%)
6   UpdateSectorBitmasks               7.668 ms /   251.853 ms (  3.04%)
7   CreateWorld                        0.002 ms /   251.855 ms (  0.00%)

Small

Name: WorldGeneration (Small - 320x180 - 57,600)
------------------------------------------------------------------------
0   Variables                          0.022 ms /     0.022 ms (  0.00%)
1   GenerateElevation                366.901 ms /   366.923 ms ( 36.08%)
2   GenerateTemperature              291.599 ms /   658.522 ms ( 28.68%)
3   GenerateRainfall                 293.972 ms /   952.494 ms ( 28.91%)
4   SectorGeneration                  17.424 ms /   969.918 ms (  1.71%)
5   UpdateSectorNeighbours            14.740 ms /   984.658 ms (  1.45%)
6   UpdateSectorBitmasks              32.178 ms /  1016.836 ms (  3.16%)
7   CreateWorld                        0.001 ms /  1016.837 ms (  0.00%)

Medium

Name: WorldGeneration (Medium - 480x270 - 129,600)
------------------------------------------------------------------------
0   Variables                          0.046 ms /     0.046 ms (  0.00%)
1   GenerateElevation                832.049 ms /   832.095 ms ( 35.82%)
2   GenerateTemperature              660.468 ms /  1492.563 ms ( 28.43%)
3   GenerateRainfall                 656.581 ms /  2149.144 ms ( 28.26%)
4   SectorGeneration                  65.737 ms /  2214.881 ms (  2.83%)
5   UpdateSectorNeighbours            33.504 ms /  2248.385 ms (  1.44%)
6   UpdateSectorBitmasks              74.693 ms /  2323.078 ms (  3.22%)
7   CreateWorld                        0.001 ms /  2323.079 ms (  0.00%)

Large

Name: WorldGeneration (Large - 640x360 - 230,400)
------------------------------------------------------------------------
0   Variables                          1.065 ms /     1.065 ms (  0.03%)
1   GenerateElevation               1497.784 ms /  1498.849 ms ( 35.52%)
2   GenerateTemperature             1203.489 ms /  2702.338 ms ( 28.54%)
3   GenerateRainfall                1201.902 ms /  3904.240 ms ( 28.50%)
4   SectorGeneration                  70.763 ms /  3975.003 ms (  1.68%)
5   UpdateSectorNeighbours            59.534 ms /  4034.537 ms (  1.41%)
6   UpdateSectorBitmasks             182.444 ms /  4216.981 ms (  4.33%)
7   CreateWorld                        0.001 ms /  4216.982 ms (  0.00%)

Largest

Name: WorldGeneration (Largest - 800x450 - 360,000)
------------------------------------------------------------------------
0   Variables                          1.687 ms /     1.687 ms (  0.03%)
1   GenerateElevation               2398.563 ms /  2400.250 ms ( 35.55%)
2   GenerateTemperature             1950.626 ms /  4350.876 ms ( 28.91%)
3   GenerateRainfall                1893.593 ms /  6244.469 ms ( 28.07%)
4   SectorGeneration                 144.208 ms /  6388.677 ms (  2.14%)
5   UpdateSectorNeighbours            93.394 ms /  6482.071 ms (  1.38%)
6   UpdateSectorBitmasks             264.655 ms /  6746.726 ms (  3.92%)
7   CreateWorld                        0.000 ms /  6746.726 ms (  0.00%)

* Note that as we're still in very early development, the world generation will expand to include more elements (such as inland lakes, rivers, volcanoes, settlements, roads, paths, and who knows what else) while simultaneously becoming more efficient as we refine the process.

Please consider following us on Twitter @plump_helmet or take a look at our Patreon.