FANDOM


Illustrations for the various radius effects explained on Editing rulesets for rectangular or isometric topologies (hex topologies are simpler and different). On this page (x,y) means (+x,+y), (-x,+y), (+x,-y), (-x,-y), or one of the four identical (y,x) distances, picking x>y if different to represent four x=y or eight x<>y +/- sign combinations.

On this page the delta column contains the value for an accumulative "squared radius" effect, if you want to get from the previous radius (x',y') to the next radius (x,y) in the order shown below, e.g., to get from (3,1) for any squared radius 3*3+1*1=10 to (3,2) for any squared radius 3*3+2*2=13 the delta is 13-10=3.

Square sums Edit

  • The sum of two squares {0,1,2,4,5,8,9,10,13,16,17,18,20,…} is OEISiconA001481.
  • Sorted by the number of tiles {1,5,9,13,21,25,29,37,45,49,…} is OEISiconA057961.
  • Tiles sorted by the radius {1,5,9,13,21,25,29,37,45,49,57,49,69,…} is "unknown". Something here is seriously wrong, Freeciv cannot be OEISiconunkn obsc dumb less.

 Sq. sum       Delta Tiles       ASCII art       Freeciv example
 x*x+y*y (x,y)              9876543210123456789

       0 (0,0)     0     1           o           Classic buoy before 2.6

                                     *
       1 (1,0)     1     5          *o*          Cardinally adjacent
                                     *

                                    +++
       2 (1,1)     1     9          +o+          Experimental city radius
                                    +++

                                     x
                                    xxx
       4 (2,0)     2    13         xxoxx
                                    xxx
                                     x

                                    ***
                                   *****
       5 (2,1)     1    21         **o**         Classic city radius
                                   *****
                                    ***

                                   +++++
                                   +++++
       8 (2,2)     3    25         ++o++
                                   +++++
                                   +++++

                                     x
                                   xxxxx
                                   xxxxx
       9 (3,0)     1    29        xxxoxxx
                                   xxxxx
                                   xxxxx
                                     x

                                    ***
                                   *****
                                  *******
      10 (3,1)     1    37        ***o***        Experimental big city
                                  *******
                                   *****
                                    ***

                                   +++++
                                  +++++++
                                  +++++++
      13 (3,2)     3    45        +++o+++
                                  +++++++
                                  +++++++
                                   +++++

                                     x
                                   xxxxx
                                  xxxxxxx
                                  xxxxxxx
      16 (4,0)     3    49       xxxxoxxxx
                                  xxxxxxx
                                  xxxxxxx
                                   xxxxx
                                     x

                                    ***
                                   *****
                                  *******
                                 *********
      17 (4,1)     1    57       ****o****       Experimental huge city
                                 *********
                                  *******
                                   *****
                                    ***
GTK2 2.5.4 minimap test 64

16=4*4+0*0

Caveat: (4,1) for the squared radius 4*4+1*1=17 is smaller than (3,3) for 3*3+3*3=18, but (4.1) covers 57 tiles, while (3,3) covers only 49 tiles. If you want a city radius as proper subset of the (next) vision radius it won't work for city radius (4,1) with vision (3,3), because invisible tiles are also unworkable. The experimental ruleset uses always the same values for the city radius and the city vision; that recipe can't go wrong.
                                  +++++++
                                  +++++++
                                  +++++++
      18 (3,3)     1    49        +++o+++
                                  +++++++
                                  +++++++
                                  +++++++

                                   xxxxx
                                  xxxxxxx
                                 xxxxxxxxx
                                 xxxxxxxxx
      20 (4,2)     2    69       xxxxoxxxx        Classic AWACS vision radius
                                 xxxxxxxxx
                                 xxxxxxxxx
                                  xxxxxxx
                                   xxxxx

                                  *******
                                 *********
                                 *********
                                 *********
      25 (4,3)     5    77       ****o****
                                 *********
                                 *********
                                 *********
                                  *******
Caveat: (4,3) for the squared radius 4*4+3*3=25 is the same as (5,0) for 5*5+0*0=25, more dubious script-generated ASCII art on this page deleted. The server code of course considers any tile with radius <= 5 as within radius 5, and the 77 shown above is wrong.

Limit Edit

26 for (5,1) is the biggest permitted radius in …/common/city.c, which also lists the corresponding values for hex. topologies:


  /* The city's valid positions are in a circle around the city center.
   * Depending on the value for the squared city radius the circle will be:
   *
   *  - rectangular (max radius = 5; max squared radius = 26)
   *
   *        0    1    2    3    4    5    6    7    8    9   10
   *
   *  0                        26   25   26                       -5
   *  1              25   20   17   16   17   20   25             -4
   *  2         25   18   13   10    9   10   13   18   25        -3
   *  3         20   13    8    5    4    5    8   13   20        -2
   *  4    26   17   10    5    2    1    2    5   10   17   26   -1
   *  5    25   16    9    4    1    0    1    4    9   16   25   +0
   *  6    26   17   10    5    2    1    2    5   10   17   26   +1
   *  7         20   13    8    5    4    5    8   13   20        +2
   *  8         25   18   13   10    9   10   13   18   25        +3
   *  9              25   20   17   16   17   20   25             +4
   * 10                        26   25   26                       +5
   *
   *       -5   -4   -3   -2   -1   +0   +1   +2   +3   +4   +5
   *
   * - hexagonal (max radius = 5; max squared radius = 26)
   *
   *        0    1    2    3    4    5    6    7    8    9   10
   *
   *  0                             25   25   25   25   25   25   -5
   *  1                        25   16   16   16   16   16   25   -4
   *  2                   25   16    9    9    9    9   16   25   -3
   *  3              25   16    9    4    4    4    9   16   25   -2
   *  4         25   16    9    4    1    1    4    9   16   25   -1
   *  5    25   16    9    4    1    0    1    4    9   16   25   +0
   *  6    25   16    9    4    1    1    4    9   16   25        +1
   *  7    25   16    9    4    4    4    9   16   25             +2
   *  8    25   16    9    9    9    9   16   25                  +3
   *  9    25   16   16   16   16   16   25                       +4
   * 10    25   25   25   25   25   25                            +5
   *
   *       -5   -4   -3   -2   -1   +0   +1   +2   +3   +4   +5
   *
   * The following tables show the tiles per city radii / squared city radii.
   * '-' indicates no change compared to the previous value
   *
   * radius            |  0 |  1 |    |    |  2 |    |    |    |    |  3
   * radius_sq         |  1 |  2 |  3 |  4 |  5 |  6 |  7 |  8 |  9 | 10
   * ------------------+----+----+----+----+----+----+----+----+----+----
   * tiles rectangular |  5 |  9 |  - | 13 | 21 |  - |  - | 25 | 29 | 37
   * tiles hexagonal   |  7 |  - |  - | 19 |  - |  - |  - |  - | 37 |  -
   *
   * radius            |    |    |    |    |    |    |  4 |    |    |
   * radius_sq         | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20
   * ------------------+----+----+----+----+----+----+----+----+----+----
   * tiles rectangular |  - |  - | 45 |  - |  - | 49 | 57 | 61 |  - | 69
   * tiles hexagonal   |  - |  - |  - |  - |  - | 61 |  - |  - |  - |  -
   *
   * radius            |    |    |    |    |    |  5
   * radius_sq         | 21 | 22 | 23 | 24 | 25 | 26
   * ------------------+----+----+----+----+----+----
   * tiles rectangular |  - |  - |  - |  - | 81 | 89
   * tiles hexagonal   |  - |  - |  - |  - | 91 |  -
   *
   * So radius_sq == 5 (radius == 2) corresponds to the "traditional"
   * used city map.
   */

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.