Accounts e-mail HP

CityWorkingTiles & Borders algorythm

What would you like to see in Freeciv? Do you have a good idea what should be improved or how?

CityWorkingTiles & Borders algorythm

Postby monamipierrot » Thu Feb 07, 2013 10:46 am

IMHO, We have to redesign CityWorkingTiles (tiles that a city can work) & borders algorythm.
They both should be movement-terrain-infrastructure-sensible.
The territory of a player should depend on how easy it is to reach its tiles from a city given a x3mps imaginery unit, maybe ignoring railroads. At the beginning the territory of a new found city could be very small, expecially if found on hills/mountain area. With some roads, the borders could expand and reach a maximum theorical radius of a 9 tiles - square. Actually it will at most look more like a circle than a square. And if we don't build roads over mountains, these will likely be the uttermost borders of our empire. With sea/lake it could be quite a problem, but I would use the same algorythm, providing a land-to-sea-or-sea-to-land-1mp-penalty for the imaginery unit. This would mean that a sea city can extend a border on a 3 tiles radius over the sea, and maybe reach close islands. An inner city is likely to extend borders only on water tiles which are next to shore.
Similarly, a city could work tiles which are reachable with some fixed mps, which could be 1 (recommended) or 2mps, ignoring railroads. This way (1mp), from the beginning of the game, you can work ONLY tiles which are next to city (if it is not on a river), and will reach that valuable coal only if you build a road to it, or to a tile next to it. A non-coastal city will then have chance of working only ocean tiles next to the shore.
These algorythm would provide a design based almost entirely on infrastructures (roads) builded by player. this could disturb some of players who want territory to be affected by city size. This could also be implemented by making the imaginery unit mps being a function of city size. E.g. it could be cubicroot(citysize), rounded down.
This way, to reach 2mp (and 6 squares of theoretical distance), one would need a 8sized city. 27 is required for 3mp, and only a huge 64sized city could have a 4mp, e,g, 12 square distance territory size.

A city could work any tile that a imaginery unit could reach.

HERE I APPEND SOME OLD vERSION OF THE TEXT I WROTE LONG TIME AGO (+1 year) which contains more ideas:

Territor
{I noticed that Experimental ruleset in Freeciv 2.3 now have a new algorythm bound to the city radius, which I didn’t understand. I wrote this before notice it, but it is still interesting for future developing}
I don’t like very much the territory algorythm. It looks like the city territory radius is always the same, just slightly bigger at sizes 3 and 8. and spawn across seas to another continent (small inner seas, for some reasons, are considered land by the algorythm).
Territory should be smaller for smaller cities, and it could be bound to geographical features.
For example, the rule may be:
-” the territory of a city is the subset of tiles which a imaginary normal land or sea unit located inside the city and with mp=sqr(citysize), could reach with one move.”
To have a even smaller territory, substitute the square root with a cubic root. Roads rivers and railroads DO affect this calculations but, in order to avoid, a infinite territory spawning by railroad, we can set the maximum distance=citysize.
If there are no roads/rivers at all, the shape of a 4+ city would tend to a rounded square.
I tried to imagine this algorythm to some real-game maps of mine and it draws very realistic territories with “natural” borders.
To calculate wether a tile is of a player or of the enemy would be a matter of remaining mp for our imaginary unit: the player with more remaining mp (or, fairer, the % of original mp) owns the tile. In case mp are =, wins the nearest.
When calculating the root of the imaginery unit, the presence of enemy units or even their ZOC may be used in the calculations, but I would recommend not to. I find more logical that only cities and occupied Fortress DO impose ZOC in territory calculations.
In order to reach overseas shore or distant sea tiles (for BIG cities), the rule may allow the imaginery unit to change type (from sea to land or viceversa) at the cost of 1 full mp. Some improvements may affect the mps of the imaginary unit.
Of course territory should affect tile working also: a small city may not be able to work all city radius tiles, and should wait for growth or roads to reach that valuable gold on the mountains!
Here’s the mp radius, rounded to the nearest, of the cities:

1mp
1⅓mps
1⅔mps
2mps
2⅓mps
2⅓mps
2⅔mps
2⅔mps
3mps
3mps etc.
monamipierrot
Co-Admin of GT01, GT10-Hex.
 
Posts: 444
Joined: Sat Nov 03, 2012 8:43 pm
Location: Barcelona, Spain

Return to Wishlist

Who is online

Users browsing this forum: No registered users and 4 guests

cron