Optimal city distance

SirTurtle

Warlord
Joined
Sep 4, 2010
Messages
126
I did some quick calculations to try to figure out the optimal city distance, with the aid of some hex paper. I'm assuming a regular arrangement of cities; in reality this would have to be adjusted for coastlines and other terrain.

Let D = distance between cities. Let S(D,N) = number of tiles shared between N cities for distance D. Define TPC(D) to be the number of tiles per city for distance D, assuming all terrain is claimed and the tiles are distributed evenly among the cities. Clearly TPC(D) = S(D,1) + S(D,2)/2 + S(D,3)/3 + D(D,4)/4.

For example, if D = 4 then for each city there is 1 tile (the city itself) that is not shared. So S(4,1) = 1. There are 18 tiles shared by each city and one of its neighbors, S(4,2) = 18, and 18 shared by each city and two of its neighbors, S(4,3) = 18. There are no tiles shared by 4 cities. So TPC(4)=1+18/2+18/3=16. Similar calculations can be done for other values of D.

In summary:
TPC(3) = 9
TPC(4) = 12 *
TPC(4) = 16
TPC(5) = 25
TPC(6) = 27 *
TPC(6) = 34
TPC(7) = 37

Also for D >= 6 there are gaps between the cities.

So what's the best distance? I'd guess gaps are bad and between 16-25 tiles per city is reasonable, so a city distance of 4-5 is probably best.

Any thoughts?


* There are alternate regular configurations for the even distances. The more compact configurations are generated by "zig-zagging" hexes to travel between cities, the less compact by going straight. There are no gaps in the D=6 compact configuration.
 
Wow, it's college calculus all over again, isn't it?
I'd love a thread discussing why some people love programming but not math, and some are the other way around.

Back on topic, I think I'd go with at least 5, I never liked cities sharing too many plots, especially when they were good ones.
 
6. You get a very nice honeycomb pattern, each city shares the sides of it's BFH with one other city, and the corners with 3. If you arrange to have a strategic resource like say gold or horses in those corners, then 3 cities can build the building that gives bonuses but requires the city in it's radius (buildings like the mint, circus). Note that you have to go 6 tiles in the non-straight directions (IE 6 east of the center city is actually NE,SE,NE,SE,NE,SE). The overlap doesn't work as nice if you go 6 in the straight directions. I'd love to show a picture of this, but can't seem to find an online hex-generator that I can play with.


While 5 might even be more ideal especially as you might not need quite that many tiles until late game, with cities themselves providing unhappiness, I think 6 gives you the best balance of land grab with usable tiles.

Your math seems to be off somewhere, if only in my specific example. I have each city having it's 19 center tiles to itself (19), sharing it's 12 side tiles with one other city each (12/2=6), and it's 6 corners shared with 2 cities each (6/3=2) ... seems to me that TPC(6) should be 27.
 
I think that the biggest determining factor would be - realistically enough - potential food production. That would be the determining factor in how many tiles the city will be able to work.
 
Wow, it's college calculus all over again, isn't it?
I'd love a thread discussing why some people love programming but not math, and some are the other way around.

Heh, it's not really math. I haven't proven anything; you have to trust that my hex sketches were correct.

And actually I failed at being a mathematician and ended up a programmer. :(
 
I did some quick calculations to try to figure out the optimal city distance, with the aid of some hex paper.

You haven't said what you're optimizing for. I'm assuming you're trying to minimize overlap while keeping complete coverage, but I highly doubt that's actually good play in the game.
 
Your math seems to be off somewhere, if only in my specific example. I have each city having it's 19 center tiles to itself (19), sharing it's 12 side tiles with one other city each (12/2=6), and it's 6 corners shared with 2 cities each (6/3=2) ... seems to me that TPC(6) should be 27.

We're both right. There's actually multiple configurations that meet the D=6 criteria.

I tried drawing your configuration it's really nice if you don't want gaps, but want to maximize the tiles per city.
 
Does it mean Im stupid if I read this and my brain hurts?
 
The biggest advantage of having close cities is you get the free tiles from the secondary cities in the range of multiple cities and thus do not need to quickly grow the secondary cities. Meanwhile, the primary city would be able to grow quickly without the need to purchase additional tiles or generate culture to grow onto them.

Def: N (the number of open tiles between cities)

Ideally the 2nd city founded would be the "primary" city in this case and you can get a little leeway with the capital since it will be able to populate its outer ring of hexes without too much difficulty. Citites 3-7 can be built close in (N=2) so that they provide most of their first-ring tiles to the central/primary city.

With a pure N=2 symmetic setup (7 Cities) you'd go from covering a maximum of 259 tiles maximum to only covering 127. However, that still gives you about 18 population / city on average. And defensively you only span 13 tiles in either direction with most tiles in the range of 2 cities.

I've also experimented with an "airplane" like setup. I may try to scan and upload a diagram later but basically you have.

A) 3 Cities; N = 6 relative to each other (straight line) as a base
B) 2 Cities; N = 2 relative to the outer cities in A (Upper-Left Direction)
C) 2 Cities; N = 8 relative to the central city in A (North) (symmetric, N = 2 relative to each other)
D) 1 City; N(2) = 5 relative to the central city (Count full tiles directly north of the city, skipping the "lines")
 
But if you look at the screenshots the average distance between cities appears to be 3 spaces, so maybe your calculations don't hold true ingame.
 
But if you look at the screenshots the average distance between cities appears to be 3 spaces, so maybe your calculations don't hold true ingame.

We're doing "Civ for the artistically inclined".

The easiest way to make this work is to have zero opponent civs and one city-state on a large pangea map; you can build in whatever configuration you well please.

Anyway, screens show that you can have a gap as small as one (1); but it has been mentioned there would be "game specific penalties" associated with building cities too close so who knows.

Resource acquisition is the most important piece of city location but even then for a fun-type game doing symmetric layouts is cool. Hexes just makes the available symmetric layouts look cooler than squares; plus with cities having ranged attacks having tiles covered by multiple cities has significant military advantages in that fewer actual units would be required to defend the homeland.
 
The right (artistic) side of my brain loves math - the big picture stuff - but my left (analytical) side has difficulty with the little details.

Logic is the happy compromise and so I program.
 
I had to play around with a hex grid in GIMP (DL'ed a PNG and copied the grid over and over). One thing I notice (which will make it much harder for me to wrap my head around city planning with hexes) is that two cities 6 hexes apart, with one directly on top of the other, will have an overlap of 4 hexes, while two cities the same distance apart that are side by side will only have an overlap of 1 hex...obviously this is just a factor of the basic geometry of a hex vs a square (which would be the same overlap regardless of side), but I found it intriguing nevertheless. Not even factoring that you can choose squares to own, it will still be much easier to have cities "fit" together than in CivIV, without having to waste good tiles. I would likely found cities at a distance of 5 hexes ideally. That's an 8 tile overlap, and so 29 tiles that are fully available for each city. A much more flexible system :D
 
...plus with cities having ranged attacks having tiles covered by multiple cities has significant military advantages in that fewer actual units would be required to defend the homeland.

I'm not sure on the range for cities, but I know ranged units are mostly limited to shooting 2 hexes ahead of them (I think some might be 3 hexes), so you would have to build your cities really close together for them to team up on an enemy, and even then you'd be fighting alone most of the time: I doubt anyone would want to build a city any closer than 3 hexes away and that would still leave well over half of the other side of the city (unless you built another city on that side 3 hexes away!)
 
Yes, the fact that you cover the interior of the structure did not get lost upon me; at that if you lose an outer-ring city the overlap is lost as well. You do have the option to place forts/archers and the like on the outer ring as well.

To some degree it is more an anti-pillaging measure for the center than anything else (though if the captial is in the center they are going to have to take out some outer-ring cities before capturing it). But, you can minimize the defenses in the center and place extra fortifications on the ring - toward whichever side is most likely to be attacked.
 
I remember a few months ago John Schafer saying there would be some sort of enormous penalty for city overlap in Civ 5. I guess that's not the case anymore?
 
I remember a few months ago John Schafer saying there would be some sort of enormous penalty for city overlap in Civ 5. I guess that's not the case anymore?

I can't believe that - if they wanted to achieve anything then probably to get rid of the weird, gamey city placement of civ4 (making unrealistic BFCs not overlap too much while using ressources best).

So I guess they want to make city placement more flexible, making real-world factors like fresh water, coast access and defensive position more important than avoiding overlaps.

Also, with a shared happiness pool, there is no longer ONE optimal city size for your whole empire (the happy-cap-size) but you are allowed a good mixture of city sizes.



I guess the whole topic of this thread - placing cities in a geometrical order - is what happened in civ4 too much and what they wanted to avoid for civ5.
 
Top Bottom