Complete.Org: Mailing Lists: Archives: freeciv-dev: February 2003:
[Freeciv-Dev] Re: (PR#2957) is ocean as a function with oceanness read f
Home

[Freeciv-Dev] Re: (PR#2957) is ocean as a function with oceanness read f

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: kayeats@xxxxxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#2957) is ocean as a function with oceanness read from ruleset
From: "Jason Short via RT" <rt@xxxxxxxxxxxxxx>
Date: Sun, 9 Feb 2003 13:35:43 -0800
Reply-to: rt.freeciv.org@xxxxxxxxxxxxxx

Cameron Morland via RT wrote:

> On Sun, Feb 09, 2003 at 08:27:35AM -0500, Jason Short wrote:
> 
>>It looks to me like with this code, and suitable
>>mapgen/savegame+ruleset+tileset changes, you could get different-looking
>>types of ocean.  I would like to see a demo of this, if possible: some
>>crude tilesets (iso and non-iso) [1], a changed ruleset, and (at least)
>>a savegame to show that the basic infrastructure works.  Actual support
>>for these features can come later.
> 
> I made a hack of a patch that does this. This is not a real solution
> since it destroys T_RIVER and replaces it with T_SHELF. I only have it
> working with the Trident tileset. But it demonstrates what having
> shelf and deep ocean separate can look like.

Hmm, this is a major problem.  Since so many (all?) of the other terrain 
types have their characteristics hard-coded, adding new terrain types 
seems a very risky business.  The only solution I see is to add a lot of 
new flags controlling their behavior (although I'm not sure what flags 
are needed).

Another problem is that the map generator is highly dependent on the 
ruleset terrain specification - it has to know about the difference 
between coast, shelf, and ocean, but if you change the other terrains 
there will be problems.  This can be alleviated, but only by adding even 
more flags to the ruleset - for instance F_POLAR to specify that a 
terrain should be used for the poles.

>>Later other flags could be added controlling other rules behavior (for
>>instance triremes dying in "deep" water, not just when they leave shore).
>>
>>[1] This is important since the ocean drawing code is very different in
>>iso and non-iso mode, and may not generalize well to different types of
>>ocean.  But the tileset can be _very_ crude; you could just invert the
>>current sprites to get the new graphics.
> 
> 
> Right.
> 
> Is that dithering code in yet? If so, it could provide smoother
> transitions between the ocean types.

Err, what dithering code?  iso-mode drawing currently uses a blending 
mask (called the dither mask, although this is inaccurate).  This should 
work fine, except that blending is (or should be) disabled for 
ocean-ocean tile borders (although it should be easy to use it for ocean 
borders when the terrain types are not equal).

jason




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