Complete.Org: Mailing Lists: Archives: freeciv: June 2002:
[Freeciv] Re: suggestion: ships out of cities
Home

[Freeciv] Re: suggestion: ships out of cities

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Jules Bean <jules@xxxxxxxxxxxxxxx>
Cc: Per I Mathisen <per@xxxxxxxxxxx>, freeciv@xxxxxxxxxxx
Subject: [Freeciv] Re: suggestion: ships out of cities
From: "Ross W. Wetmore" <rwetmore@xxxxxxxxxxxx>
Date: Thu, 20 Jun 2002 19:15:16 -0400

At 01:11 PM 02/06/20 +0100, Jules Bean wrote:
>
>On Wed, Jun 19, 2002 at 11:08:47PM +0200, Per I Mathisen wrote:
>> 
>> On Wed, 19 Jun 2002, Jules Bean wrote:
[...]
>> Not that hard. Requires Ross' ocean patch and an additional int in the
>> unit field denoting the ship's original ocean, that's all. But is it
>> desirable? I always thought of such cities as the equivalent of the Suez
>> Canal, and a very good feature.
>
>How does Ross' ocean patch work?  Global ocean numbers?  If so, that's
>not enough;  it won't stop ships taking short cuts (such as a short
>cut through barcelona from the med to the atlantic, since the med and
>the atlantic are connected properly at gibraltar).  Notice that in the
>real world most of the major oceans are in fact connected (so not, in
>a usual sense, different oceans).
>
>You need local ocean numbers, defined at each city.  Just defined in
>terms of local adjacency.

Correct. 

What you need is an adjacent iterate that starts at one tile and loops
to the next as long as every tile is OCEAN. It is a double check as you
can start again at the dest and loop in the same direction to the start.
Use DIR_CW() as the iterator next function.

The patch, is really just a few routines in a mapgen replacement that 
labels watersheds the same way continents are labelled by flood fill.
It needs a few extra fields in struct map to expose it to the main core.
Quite often, there is one ocean/watershed as even internal lakes are 
connected through rivers to the ocean tiles. Currently the routines
follow rivers as well as ocean tiles. Again this is easily hacked.

>I think the 'automatic' ship canal is annoying: I'd be in favour of a
>ship canal as an improvement, though.  Only available to build in a
>city which has two or more distinct local oceans, requiring roughly
>railroad-level technology.

It matches automatic road and rail improvements. Removing one without
the others doesn't make a lot of consistency sense.

And you should realize that citites cannot be built on OCEAN tiles so
there is no current terrain type that acts as a channel or strait. 
Allowing cities to "enhance" such features to usability isn't a bad
fallback in the meantime. 

Having a terrain modifier like S_RIVER that allows ship passage through 
the tile is the natural way to build in this behaviour. Then Engineers
could do a "channel" improvement. Restrictions like - must be adjacent
to an existing OCEAN or CHANNELled tiles, half cost if already a RIVER
etc. would be obvious implementation details.


[...]
>Jules

Cheers,
RossW
=====




[Prev in Thread] Current Thread [Next in Thread]