Re: [Freeciv-Dev] (PR#35646) Remove unsafe terrain
http://bugs.freeciv.org/Ticket/Display.html?id=35646 > Per I. Mathisen wrote: > http://bugs.freeciv.org/Ticket/Display.html?id=35646 > > > On Sun, 11 Feb 2007, Marko Lindqvist wrote: >> Have you tested with different landmass settings? > > No, but I will do that before committing anything. > >>> Do you find it unacceptable as a step on the way to deep ocean? >> Actually, I wonder if there is much point in making temporary >> solutions when final solution is already so close. But then again, it >> might be a long time before we get that gfx. > > The temporary solution itself is very small. The big change is ripping out > the dangerous position related code, which would be done in any case. > > However, if we are to simplify the path finding code, we need the > dangerous position code cleaned up or removed first, and I would rather > not have that wait more than necessary. This is a fine step for the development branch on the way to deep ocean. All it means is that we are committed to fixing up deep ocean before the next release. -jason ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
Re: [Freeciv-Dev] (PR#35646) Remove unsafe terrain
http://bugs.freeciv.org/Ticket/Display.html?id=35646 > On Sun, 11 Feb 2007, Marko Lindqvist wrote: > Have you tested with different landmass settings? No, but I will do that before committing anything. >> Do you find it unacceptable as a step on the way to deep ocean? > > Actually, I wonder if there is much point in making temporary > solutions when final solution is already so close. But then again, it > might be a long time before we get that gfx. The temporary solution itself is very small. The big change is ripping out the dangerous position related code, which would be done in any case. However, if we are to simplify the path finding code, we need the dangerous position code cleaned up or removed first, and I would rather not have that wait more than necessary. - Per ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
Re: [Freeciv-Dev] (PR#35646) Remove unsafe terrain
http://bugs.freeciv.org/Ticket/Display.html?id=35646 > On 2/11/07, Marko Lindqvist <[EMAIL PROTECTED]> wrote: > > http://bugs.freeciv.org/Ticket/Display.html?id=35646 > > > On 2/11/07, Per I. Mathisen <[EMAIL PROTECTED]> wrote: > > > > On Sat, 10 Feb 2007, Marko Lindqvist wrote: > > > They can transport units to other islands only if there is one or two > > > ocean tiles in between. > > > > But this is not quite right. During testing I usually managed to find > > neighbouring islands easily. Maybe this was an artefact of the map > > generator and map seed I was using, but it is as clear cut as you make it > > sound. > > Well, if your testing shows that it's not too much of a problem... > I'm not happy with this, but I can accept it. Have you tested with > different landmass settings? > > > Do you find it unacceptable as a step on the way to deep ocean? > > Actually, I wonder if there is much point in making temporary > solutions when final solution is already so close. But then again, it > might be a long time before we get that gfx. > > > - ML > If we request it, I'm sure Eleazar could produce the missing graphics quite easily. http://forum.freeciv.org/viewtopic.php?t=1846 ~Daniel ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
Re: [Freeciv-Dev] (PR#35646) Remove unsafe terrain
http://bugs.freeciv.org/Ticket/Display.html?id=35646 > On 2/11/07, Per I. Mathisen <[EMAIL PROTECTED]> wrote: > > On Sat, 10 Feb 2007, Marko Lindqvist wrote: > > They can transport units to other islands only if there is one or two > > ocean tiles in between. > > But this is not quite right. During testing I usually managed to find > neighbouring islands easily. Maybe this was an artefact of the map > generator and map seed I was using, but it is as clear cut as you make it > sound. Well, if your testing shows that it's not too much of a problem... I'm not happy with this, but I can accept it. Have you tested with different landmass settings? > Do you find it unacceptable as a step on the way to deep ocean? Actually, I wonder if there is much point in making temporary solutions when final solution is already so close. But then again, it might be a long time before we get that gfx. - ML ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
Re: [Freeciv-Dev] (PR#35646) Remove unsafe terrain
http://bugs.freeciv.org/Ticket/Display.html?id=35646 > On Sat, 10 Feb 2007, Marko Lindqvist wrote: >>> Is the coastline check at the end of a (goto) move or performed for >>> every step a trireme might take? >> >> Every step. > > This is too harsh for triremes. It is a bit harsh. > They can transport units to other islands only if there is one or two > ocean tiles in between. But this is not quite right. During testing I usually managed to find neighbouring islands easily. Maybe this was an artefact of the map generator and map seed I was using, but it is as clear cut as you make it sound. Do you find it unacceptable as a step on the way to deep ocean? - Per ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
Re: [Freeciv-Dev] (PR#35646) Remove unsafe terrain
http://bugs.freeciv.org/Ticket/Display.html?id=35646 > Per I. Mathisen wrote: > http://bugs.freeciv.org/Ticket/Display.html?id=35646 > > > On Sat, 10 Feb 2007, Christian Knoke wrote: >>> This patch removes all unsafe terrain, both the unsafe terrain flag >>> (currently unused, used to set for glaciers, but was removed since it >>> was annoying) and unsafe ocean for triremes. Instead, triremes simply >>> cannot travel into an ocean square with no coastline. >> Doesn't this mean it will be harder for triremes to discover new land? > > Yes, unfortunately. Not necessarily. With shallow and deep ocean, triremes are allowed to travel anywhere there is shallow ocean. Once this is implemented, depending on the settings (how much shallow versus deep ocean is created) the range of triremes could actually be increased. In the simplistic system Per is proposing where triremes are confined to coastline, yes their range is lowered because they cannot cross non-coastal areas. -jason ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
Re: [Freeciv-Dev] (PR#35646) Remove unsafe terrain
http://bugs.freeciv.org/Ticket/Display.html?id=35646 > Per I. Mathisen wrote: > http://bugs.freeciv.org/Ticket/Display.html?id=35646 > > > This patch removes all unsafe terrain, both the unsafe terrain flag > (currently unused, used to set for glaciers, but was removed since it > was annoying) and unsafe ocean for triremes. Instead, triremes simply > cannot travel into an ocean square with no coastline. No objection. > There is an issue, though, which is that the server checks its global > knowledge of coastlines to determine whether a trireme can go > somewhere. So the user can try to move the trireme toward unexplored > tiles and whether and if the unexplored tiles are coastline, the move > will succeed and explore them, but if they are ocean, the move will > fail. This might seem wrong - the trireme's refusal to leave the > coastline should depend on the client knowledge, not the server > knowledge. This looks quite a bit harder to implement, though. On the > other hand, if we think about it in terms of deep vs shallow waters, > there most likely is shallow water whereever the trireme is allowed to > go - the client just cannot display it yet. So if this is just a step > on the way to implementing deep vs shallow ocean, perhaps it is ok as > it is. Yes, this is unacceptable in the long run. Deep-ocean is the solution. -jason ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
Re: [Freeciv-Dev] (PR#35646) Remove unsafe terrain
http://bugs.freeciv.org/Ticket/Display.html?id=35646 > On 2/10/07, Per I. Mathisen <[EMAIL PROTECTED]> wrote: > > On Sat, 10 Feb 2007, Christian Knoke wrote: > >> This patch removes all unsafe terrain, both the unsafe terrain flag > >> (currently unused, used to set for glaciers, but was removed since it > >> was annoying) and unsafe ocean for triremes. Instead, triremes simply > >> cannot travel into an ocean square with no coastline. > > > > Doesn't this mean it will be harder for triremes to discover new land? > > Yes, unfortunately. > > >> There is an issue, though, which is that the server checks its global > >> knowledge of coastlines to determine whether a trireme can go > >> somewhere. > > > > Is the coastline check at the end of a (goto) move or performed for > > every step a trireme might take? > > Every step. This is too harsh for triremes. They can transport units to other islands only if there is one or two ocean tiles in between. - ML ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
Re: [Freeciv-Dev] (PR#35646) Remove unsafe terrain
http://bugs.freeciv.org/Ticket/Display.html?id=35646 > On Sat, 10 Feb 2007, Christian Knoke wrote: >> This patch removes all unsafe terrain, both the unsafe terrain flag >> (currently unused, used to set for glaciers, but was removed since it >> was annoying) and unsafe ocean for triremes. Instead, triremes simply >> cannot travel into an ocean square with no coastline. > > Doesn't this mean it will be harder for triremes to discover new land? Yes, unfortunately. >> There is an issue, though, which is that the server checks its global >> knowledge of coastlines to determine whether a trireme can go >> somewhere. > > Is the coastline check at the end of a (goto) move or performed for > every step a trireme might take? Every step. - Per ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
Re: [Freeciv-Dev] (PR#35646) Remove unsafe terrain
http://bugs.freeciv.org/Ticket/Display.html?id=35646 > Per I. Mathisen wrote on Feb 10, 10:52 (-0800): > > This patch removes all unsafe terrain, both the unsafe terrain flag > (currently unused, used to set for glaciers, but was removed since it > was annoying) and unsafe ocean for triremes. Instead, triremes simply > cannot travel into an ocean square with no coastline. Doesn't this mean it will be harder for triremes to discover new land? Depending of the maps setting of course. > There is an issue, though, which is that the server checks its global > knowledge of coastlines to determine whether a trireme can go > somewhere. Is the coastline check at the end of a (goto) move or performed for every step a trireme might take? Christian -- Christian Knoke* * *http://cknoke.de * * * * * * * * * Ceterum censeo Microsoft esse dividendum. ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
[Freeciv-Dev] (PR#35646) Remove unsafe terrain
http://bugs.freeciv.org/Ticket/Display.html?id=35646 > This patch removes all unsafe terrain, both the unsafe terrain flag (currently unused, used to set for glaciers, but was removed since it was annoying) and unsafe ocean for triremes. Instead, triremes simply cannot travel into an ocean square with no coastline. There is an issue, though, which is that the server checks its global knowledge of coastlines to determine whether a trireme can go somewhere. So the user can try to move the trireme toward unexplored tiles and whether and if the unexplored tiles are coastline, the move will succeed and explore them, but if they are ocean, the move will fail. This might seem wrong - the trireme's refusal to leave the coastline should depend on the client knowledge, not the server knowledge. This looks quite a bit harder to implement, though. On the other hand, if we think about it in terms of deep vs shallow waters, there most likely is shallow water whereever the trireme is allowed to go - the client just cannot display it yet. So if this is just a step on the way to implementing deep vs shallow ocean, perhaps it is ok as it is. - Per Index: server/generator/startpos.c === --- server/generator/startpos.c (revision 12614) +++ server/generator/startpos.c (working copy) @@ -223,10 +223,7 @@ create_tmap(FALSE); } - /* Unsafe terrains separate continents, otherwise small areas of green - * near the poles could be populated by a civilization if that pole - * was part of a larger continent. */ - assign_continent_numbers(TRUE); + assign_continent_numbers(); /* If the default is given, just use MT_VARIABLE. */ if (mode == MT_DEFAULT) { Index: server/generator/mapgen.c === --- server/generator/mapgen.c (revision 12614) +++ server/generator/mapgen.c (working copy) @@ -390,7 +390,7 @@ / static void make_polar_land(void) { - assign_continent_numbers(FALSE); + assign_continent_numbers(); whole_map_iterate(ptile) { if ((tmap_is(ptile, TT_FROZEN ) && ok_for_separate_poles(ptile)) @@ -1256,7 +1256,7 @@ } - assign_continent_numbers(FALSE); + assign_continent_numbers(); game_map_init(); print_mapgen_map(); Index: server/settlers.c === --- server/settlers.c (revision 12614) +++ server/settlers.c (working copy) @@ -805,8 +805,7 @@ city_map_checked_iterate(pcity->tile, cx, cy, ptile) { bool consider = TRUE; - if (get_worker_city(pcity, cx, cy) == C_TILE_UNAVAILABLE - || terrain_has_flag(pcity->tile->terrain, TER_UNSAFE)) { + if (get_worker_city(pcity, cx, cy) == C_TILE_UNAVAILABLE) { /* Don't risk bothering with this tile. */ continue; } Index: server/maphand.c === --- server/maphand.c (revision 12614) +++ server/maphand.c (working copy) @@ -63,12 +63,8 @@ is_land tells us whether we are assigning continent numbers or ocean numbers. - - if skip_unsafe is specified then "unsafe" terrains are skipped. This - is useful for mapgen algorithms. **/ -static void assign_continent_flood(struct tile *ptile, bool is_land, - int nr, bool skip_unsafe) +static void assign_continent_flood(struct tile *ptile, bool is_land, int nr) { if (tile_get_continent(ptile) != 0) { return; @@ -78,12 +74,6 @@ return; } - if (skip_unsafe && terrain_has_flag(tile_get_terrain(ptile), TER_UNSAFE)) { -/* FIXME: This should check a specialized flag, not the TER_UNSAFE - * flag which may not even be present. */ -return; - } - if (!XOR(is_land, is_ocean(tile_get_terrain(ptile { return; } @@ -98,7 +88,7 @@ } adjc_iterate(ptile, tile1) { -assign_continent_flood(tile1, is_land, nr, skip_unsafe); +assign_continent_flood(tile1, is_land, nr); } adjc_iterate_end; } @@ -136,12 +126,8 @@ Continents have numbers 1 to map.num_continents _inclusive_. Oceans have (negative) numbers -1 to -map.num_oceans _inclusive_. - - If skip_unsafe is specified then unsafe terrains are not used to - connect continents. This is useful for generator code so that polar - regions don't connect landmasses. **/ -void assign_continent_numbers(bool skip_unsafe) +void assign_continent_numbers(void) { /* Initialize */ @@ -165,22 +151,18 @@ continue; /* Can't assign this. */ } -if (!skip_unsafe || !terrain_has_flag(pterrain, TER_UNSAFE)) { - if (!is_ocean(pterrain)) { - map.num_continents++; - continent_sizes - = fc_realloc(continent_sizes, +if (!is_ocean(pterrain)) { + map.num_continents++; +