[Freeciv-Dev] Re: (PR#9181) [freeciv #9176] Re: Freeciv algorythm
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
<URL: http://rt.freeciv.org/Ticket/Display.html?id=9181 >
There is a working prototype for ocean assignments in the last few
corecleanup patches or the standalone civmap program.
I think issues with recomputing various ocean and continent numbers
on savegame load and/or terrain changes that connect things up might
be holes requiring subsequent patching. And the duality of cities
(and river estuaries in the corecleanups) is not properly accounted
for.
One thing that would be intriguing in the assignment code is to
abstract the underlying Djikstra iteration for use with any type of
assign test and pass in the sets of tests for continents, oceans and
even other possibilities (reachable by land unit from here, within
"n" squares of a player's civ, etc.). Something like a bitmask of
such dynamically passed tests with a working summary bit would be
an extremely useful function not only for ocean assignments. But
this should be something that intrigues the coder and any sponsoring
maintainer, not a condition of doing the current dual hardcoded
solution.
There is an ocean number location added to the basic map struct that
can be used for your extensions. The extra storage location can go
away when the city/river estuary (aka land or sea units can live here
condition) issue is resolved where some tiles can have two identifiers.
Cheers,
RossW
=====
Pavel Bogdan wrote:
> <URL: http://rt.freeciv.org/Ticket/Display.html?id=9181 >
>
> Mike Kaufman <kaufman@xxxxxxxxxxxxxxxxxxxxxx> wrote:
>
> On Sun, Jul 04, 2004 at 03:16:42AM -0700, Per I. Mathisen wrote:
>
>>This is not the right way to go about it. Currently we have continent
>>numbers for all continents, set when the map is created. We should do
>>the same for all oceans, so that we can check if city A lies by the same
>>ocean as city B just by reading the ocean number. The changes should go
>>in mapgen.c
>
>
> As I might have mentioned before, ocean numbers should be negative.
>
> -mike
>
> Ok. So you have numbers for all oceans and continents, in order to see which
> city is near which ocean an on which continent, right? I guess you put a new
> variable in the "struct city...." which sets this thing... Then I believe
> it's very easy to set the "should_build_navy" variable, so you don't need the
> algorythm I gave you... :) Please tell me a way to solve the other issues
> I posted in the previous message, so I could compile(and test) the game
> myself. Now you could give some other "algorythm-like" problem and I may be
> able to help you(and any useful info regarding it). I will post a solution
> when I find it, so don't wait too much for my e-mail response... :]
>
> ---------------------------------
> Do you Yahoo!?
> Yahoo! Mail - 50x more storage than other providers!
|
|