Re: [Freeciv-Dev] Freeciv patch #1235: [Metaticket] variable city radii
Matthias Pfafferodt matthias.pfaffer...@mapfa.de writes: [...] city_radius_sq = 5 = city_radius = 2 mgr_dist = 2 max distance for migration (tiles) = 2 + 2 =4 city_radius_sq = 10 = city_radius = 3(.1) = 3 mgr_dist = 2 max distance for migration (tiles) = 3 + 2 =5 Yes, that is along the lines of my though. a new patch is available implementing radius_sq and this definition of the migration distance Defining max distance for migration (tiles) = radius1 + radius2 + X would make things more difficult I guess. radius2 won't be known so you would have to assume the maximum, scan for cities and then check if their radius is big enough for migration. But just radius1 + X should be easy to code. [...] Actualy I thing something like that is already needed. The road/rail building AI currently has no notion of connecting cities, only adjacent tiles. With city_min_dist raised that performes really bad. If a city knew the surrounding cities the auto-worker could build a road on a line between two cities. But a lot of AI code needs a fresh look and redesign I feel. This is known but nobody takes this job. I still have one thing open: bug #13599 [RFC; patch] pollution on lakes / ocean (https://gna.org/bugs/?13599). But it is really hard to understand the ai code ... But is it too much work? If I understood migration right then it is done only once every 5 turns. That's right. Migration is checked every fifth turn after a city was founded (default settings). Does the variable city radii work for you? Seems to work great so far. I'm not sure the plague settings are fine tuned yet though. I have a large food box and cities always get plague before hitting size 12 an requiring a Sewer System. The plague effectively obsoletes the size 12 limit except when migration happens a lot and the city shoots up. Not sure if that should be that way. My biggest city is size 17 so far. I will have to see if the plague allows the city to grow to size 30 at all. Did you try the experimental ruleset? There, some buildings with a 'health' effect are added. This means, that the possibility of an illness is reduced. Furthermore you could check the corresponding wiki page (http://freeciv.wikia.com/wiki/Math_of_Freeciv). Matthias Hospital, genlab and cure for cancer help a lot. Biggest city is now size 54. 270+ production in that city. I didn't merge changing unit upkeep from shield to gold in my ruleset. I have tons of shield but never enough gold. Given the amount of pollution, even with recycling I will have to destroy the Hover Dam and build solar plants instead. MfG Goswin ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
Re: [Freeciv-Dev] Freeciv patch #1235: [Metaticket] variable city radii
Matthias Pfafferodt matthias.pfaffer...@mapfa.de writes: Am Saturday 10 October 2009 09:54:26 schrieb Goswin von Brederlow: Matthias Pfafferodt matthias.pfaffer...@mapfa.de writes: Am Thursday 08 October 2009 01:43:23 schrieb Goswin von Brederlow: On a related matter, how does migration work with the patch? The patch says the city radius is considered. Does the other city need to lie within the city raidus? Do the city radius of both cities need to overlap? Can there be a gap of x tiles between the city radii of both cities? I think the migration distance config option should select this, e.g. -99: city must lie within city radius -x: city radii must overlap 0: city radii must touch x: there may be x tiles between city radii I think a default of -1 would make sense. At the moment migration is defined by a migration distance (1 to 7). The patch #1232 adds the possibility to set the migration distance to 0. In this case, the migration distance depends on the city radius (migration distance = city radius + 1; your case 0). I will definetly want to have more choices there. The migration distance setting could also be defined as the value added to the current city radius. This would require a change of the current definition (name). Example: city_radius_sq = 5 = city_radius = 2 mgr_dist = 2 max distance for migration (tiles) = 2 + 2 =4 city_radius_sq = 10 = city_radius = 3(.1) = 3 mgr_dist = 2 max distance for migration (tiles) = 3 + 2 =5 Yes, that is along the lines of my though. Defining max distance for migration (tiles) = radius1 + radius2 + X would make things more difficult I guess. radius2 won't be known so you would have to assume the maximum, scan for cities and then check if their radius is big enough for migration. But just radius1 + X should be easy to code. As for the migration one has to check all tiles within migration radius of the receiving city for giver cities the radius should be as small as possible. If checking the tiles is too expensive then cache the result: When creating a city check if it is within the migration radius of another city and link it into a migration list for that city. When the city radius of a city changes (and therefor migration radius) then scan the area once to rebuild the list. This list has to be updated every time a city is created or destroyed. Furthermore it would spread the code needed for migration over a lot of files. At the moment it is mainly in one file. Actualy I thing something like that is already needed. The road/rail building AI currently has no notion of connecting cities, only adjacent tiles. With city_min_dist raised that performes really bad. If a city knew the surrounding cities the auto-worker could build a road on a line between two cities. But a lot of AI code needs a fresh look and redesign I feel. But is it too much work? If I understood migration right then it is done only once every 5 turns. That's right. Migration is checked every fifth turn after a city was founded (default settings). Does the variable city radii work for you? Seems to work great so far. I'm not sure the plague settings are fine tuned yet though. I have a large food box and cities always get plague before hitting size 12 an requiring a Sewer System. The plague effectively obsoletes the size 12 limit except when migration happens a lot and the city shoots up. Not sure if that should be that way. My biggest city is size 17 so far. I will have to see if the plague allows the city to grow to size 30 at all. Matthias MfG Goswin MfG Goswin ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
Re: [Freeciv-Dev] Freeciv patch #1235: [Metaticket] variable city radii
[...] city_radius_sq = 5 = city_radius = 2 mgr_dist = 2 max distance for migration (tiles) = 2 + 2 =4 city_radius_sq = 10 = city_radius = 3(.1) = 3 mgr_dist = 2 max distance for migration (tiles) = 3 + 2 =5 Yes, that is along the lines of my though. a new patch is available implementing radius_sq and this definition of the migration distance Defining max distance for migration (tiles) = radius1 + radius2 + X would make things more difficult I guess. radius2 won't be known so you would have to assume the maximum, scan for cities and then check if their radius is big enough for migration. But just radius1 + X should be easy to code. [...] Actualy I thing something like that is already needed. The road/rail building AI currently has no notion of connecting cities, only adjacent tiles. With city_min_dist raised that performes really bad. If a city knew the surrounding cities the auto-worker could build a road on a line between two cities. But a lot of AI code needs a fresh look and redesign I feel. This is known but nobody takes this job. I still have one thing open: bug #13599 [RFC; patch] pollution on lakes / ocean (https://gna.org/bugs/?13599). But it is really hard to understand the ai code ... But is it too much work? If I understood migration right then it is done only once every 5 turns. That's right. Migration is checked every fifth turn after a city was founded (default settings). Does the variable city radii work for you? Seems to work great so far. I'm not sure the plague settings are fine tuned yet though. I have a large food box and cities always get plague before hitting size 12 an requiring a Sewer System. The plague effectively obsoletes the size 12 limit except when migration happens a lot and the city shoots up. Not sure if that should be that way. My biggest city is size 17 so far. I will have to see if the plague allows the city to grow to size 30 at all. Did you try the experimental ruleset? There, some buildings with a 'health' effect are added. This means, that the possibility of an illness is reduced. Furthermore you could check the corresponding wiki page (http://freeciv.wikia.com/wiki/Math_of_Freeciv). Matthias Matthias MfG Goswin MfG Goswin ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev -- Matthias Pfafferodt - http://www.mapfa.de Matthias.Pfafferodt at mapfa.de ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
Re: [Freeciv-Dev] Freeciv patch #1235: [Metaticket] variable city radii
2009/10/7 Matthias Pfafferodt matthias.pfaffer...@mapfa.de: At the moment I don't have much time, but this seems something which should be done. I think 2.3.0 (or 2.2.1?) will have this ;-) There's a lot of time before 2.3.0 will be released - most likely too much time (I really hate it how long our release cycles take) 2.2.1 will be bugfix release from S2_2 branch. - ML ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
Re: [Freeciv-Dev] Freeciv patch #1235: [Metaticket] variable city radii
OK; so is there a possibility for this to go into 2.2.0? I have an updated patch which uses radius_sq. It needs some testing but should be ready latest beginning of next week. But this patch series touches a lot of code (especially the savegame format). Matthias 2009/10/7 Matthias Pfafferodt matthias.pfaffer...@mapfa.de: At the moment I don't have much time, but this seems something which should be done. I think 2.3.0 (or 2.2.1?) will have this ;-) There's a lot of time before 2.3.0 will be released - most likely too much time (I really hate it how long our release cycles take) 2.2.1 will be bugfix release from S2_2 branch. - ML -- Matthias Pfafferodt - http://www.mapfa.de Matthias.Pfafferodt at mapfa.de ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
Re: [Freeciv-Dev] Freeciv patch #1235: [Metaticket] variable city radii
Matthias Pfafferodt matthias.pfaffer...@mapfa.de writes: Hello Goswin, Thanks for testing the patch. Here only a short answer; more later ... At the moment the freeciv development is really fast. So there seems to be some changes which require an update of the patch. I tested the entire patch set (see patch #1235; https://gna.org/patch/?1235; file #6879: cityradius.diff) before I updated it. I will check for compile errors and update it today in the evening. Have you ever used quilt? It might be usefull to provide the colective diff as quilt series. It is easy enough to generate a quilt series from git preserving the individual patches and comments from the individual bug reports you filed. To use variable city radii you need some changes to the ruleset. You could try my experimental ruleset (patch #1236; https://gna.org/patch/?1236). Within this ruleset the following city radii are defined (see effects.ruleset and also ./doc/README.ruleset_experimental): - Activate variable city radii: radius 1: start radius 2: city size 3 radius 3: city size 10 + Railroad radius 4: city size 30 + Railroad + Mass Transit + Super Highway The vision range of the city is adapted accordingly. To get all the new things listed in this file some additional patches are needed (settings patch series for game settings in the game.ruleset file). What else besides #1235 and #1236? Changing the definition to use radius_sq should be possible and would also be consistend with the use of radius_sq for borders and vision range. I will check this. The 'lot of black' in the city window is a known problem. I don't know how to code for the (gtk) client. Ideally there would be a 5x5 map (default size) and scrolling bars. After opening, this window should be centered on the city. Please use the bug / patch tracker for comments. It helps to follow the discussion(s). Sure. Just didn't want to clutter it up with compile errors. I should probably create a login for it too instead of anonymous. Matthias MfG Goswin ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
Re: [Freeciv-Dev] Freeciv patch #1235: [Metaticket] variable city radii
Am Wednesday 07 October 2009 13:22:13 schrieb Goswin von Brederlow: Matthias Pfafferodt matthias.pfaffer...@mapfa.de writes: Hello Goswin, Thanks for testing the patch. Here only a short answer; more later ... At the moment the freeciv development is really fast. So there seems to be some changes which require an update of the patch. I tested the entire patch set (see patch #1235; https://gna.org/patch/?1235; file #6879: cityradius.diff) before I updated it. I will check for compile errors and update it today in the evening. Have you ever used quilt? It might be usefull to provide the colective diff as quilt series. It is easy enough to generate a quilt series from git preserving the individual patches and comments from the individual bug reports you filed. I'm using git (format-patch) and as user interface qgit2. I have not tested quilt. I only compile tested the patch for gtk2. Thanks for catching this errors on the other clients! To use variable city radii you need some changes to the ruleset. You could try my experimental ruleset (patch #1236; https://gna.org/patch/?1236). Within this ruleset the following city radii are defined (see effects.ruleset and also ./doc/README.ruleset_experimental): - Activate variable city radii: radius 1: start radius 2: city size 3 radius 3: city size 10 + Railroad radius 4: city size 30 + Railroad + Mass Transit + Super Highway The vision range of the city is adapted accordingly. To get all the new things listed in this file some additional patches are needed (settings patch series for game settings in the game.ruleset file). What else besides #1235 and #1236? Nothing! #1235 includes all the patches listed in this metaticket and #1236 adds a ruleset which activates the variable city radii. You have to execute 'rulesetdir experimental'. I tested it and got a city with a radius of 5 ;-) Changing the definition to use radius_sq should be possible and would also be consistend with the use of radius_sq for borders and vision range. I will check this. It would be possible to use radius_sq. But this would require a complete rewrite of most code of the patch due to the changes needed to the city tiles iterator. All references to city_radius (or the function city_map_radius()) have to be replaced by city_map_radius_sq() ... At the moment I don't have much time, but this seems something which should be done. I think 2.3.0 (or 2.2.1?) will have this ;-) Matthias The 'lot of black' in the city window is a known problem. I don't know how to code for the (gtk) client. Ideally there would be a 5x5 map (default size) and scrolling bars. After opening, this window should be centered on the city. Please use the bug / patch tracker for comments. It helps to follow the discussion(s). Sure. Just didn't want to clutter it up with compile errors. I should probably create a login for it too instead of anonymous. Matthias MfG Goswin ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev -- Matthias Pfafferodt - http://www.mapfa.de Matthias.Pfafferodt at mapfa.de ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
Re: [Freeciv-Dev] Freeciv patch #1235: [Metaticket] variable city radii
Matthias Pfafferodt matthias.pfaffer...@mapfa.de writes: Am Wednesday 07 October 2009 13:22:13 schrieb Goswin von Brederlow: Matthias Pfafferodt matthias.pfaffer...@mapfa.de writes: Hello Goswin, Thanks for testing the patch. Here only a short answer; more later ... At the moment the freeciv development is really fast. So there seems to be some changes which require an update of the patch. I tested the entire patch set (see patch #1235; https://gna.org/patch/?1235; file #6879: cityradius.diff) before I updated it. I will check for compile errors and update it today in the evening. Have you ever used quilt? It might be usefull to provide the colective diff as quilt series. It is easy enough to generate a quilt series from git preserving the individual patches and comments from the individual bug reports you filed. I'm using git (format-patch) and as user interface qgit2. I have not tested quilt. I only compile tested the patch for gtk2. Thanks for catching this errors on the other clients! To use variable city radii you need some changes to the ruleset. You could try my experimental ruleset (patch #1236; https://gna.org/patch/?1236). Within this ruleset the following city radii are defined (see effects.ruleset and also ./doc/README.ruleset_experimental): - Activate variable city radii: radius 1: start radius 2: city size 3 radius 3: city size 10 + Railroad radius 4: city size 30 + Railroad + Mass Transit + Super Highway The vision range of the city is adapted accordingly. To get all the new things listed in this file some additional patches are needed (settings patch series for game settings in the game.ruleset file). What else besides #1235 and #1236? Nothing! #1235 includes all the patches listed in this metaticket and #1236 adds a ruleset which activates the variable city radii. You have to execute 'rulesetdir experimental'. I tested it and got a city with a radius of 5 ;-) Changing the definition to use radius_sq should be possible and would also be consistend with the use of radius_sq for borders and vision range. I will check this. It would be possible to use radius_sq. But this would require a complete rewrite of most code of the patch due to the changes needed to the city tiles iterator. All references to city_radius (or the function city_map_radius()) have to be replaced by city_map_radius_sq() ... At the moment I don't have much time, but this seems something which should be done. I think 2.3.0 (or 2.2.1?) will have this ;-) Matthias On a related matter, how does migration work with the patch? The patch says the city radius is considered. Does the other city need to lie within the city raidus? Do the city radius of both cities need to overlap? Can there be a gap of x tiles between the city radii of both cities? I think the migration distance config option should select this, e.g. -99: city must lie within city radius -x: city radii must overlap 0: city radii must touch x: there may be x tiles between city radii I think a default of -1 would make sense. Another option would be that only used tiles of one city that lie within the city radius of another may cause migration. MfG Goswin ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev