[Freeciv-Dev] (PR#34265) [Patch] Deep ocean

2007-02-12 Thread Jason Short

http://bugs.freeciv.org/Ticket/Display.html?id=34265 >

This patch 'fixes' the drawing problems for amplio with deep ocean.

These problems were several.  First, as the comment says in
amplio.tilespec, drawing it like this is a hack.  We basically overlay
coast on top of the actual ocean drawing, so that in the bottom layer
ocean and deep-ocean are drawn (with an appropriate border tile) and in
the next layer up coast and deep-ocean are drawn (with an appropriate
border tile).

Two bugs kept this from working.  The first is that there is no way to
have 2 layers use the same match style for the same terrain, because the
layer number isn't a part of the sprite name.  This patch fixes that by
adding the layer number (only for these boolean-matched corner cells
though).

The second is that the layers were being reversed!  The coast has to be
drawn on *top* of the deep-ocean graphics or we always get ocean
overwriting the pretty coastlines.  To work around this (and it too is
UGLY) I added a new terrain parameter, is_reversed.  If this is set then
the 2 (or however many) layers are simply drawn in reverse order for
that terrain.

This patch has to be used with Daniel's terrain2.png (attached earlier
in the patch).  Even so there are still problems.  Because the ocean
encroaches onto the deep-ocean tiles (since ocean is only matched
against coastline, NOT against deep ocean), narrow areas of deep ocean
(often seen along the poles) look VERY bad.

Also, as a final comment, I think that ocean isn't deep enough on
average.  With a trireme in an average map you can go pretty much anywhere.

-jason

Index: data/amplio/terrain2.spec
===
--- data/amplio/terrain2.spec	(revision 12631)
+++ data/amplio/terrain2.spec	(working copy)
@@ -144,76 +144,113 @@
 tiles = { "row", "column","tag"
 
 ; ocean cell sprites.  See doc/README.graphics
- 0, 0,  "t.ocean_cell_u000"
- 0, 2,  "t.ocean_cell_u100"
- 0, 4,  "t.ocean_cell_u010"
- 0, 6,  "t.ocean_cell_u110"
- 0, 8,  "t.ocean_cell_u001"
- 0, 10, "t.ocean_cell_u101"
- 0, 12, "t.ocean_cell_u011"
- 0, 14, "t.ocean_cell_u111"
+ 0, 0,  "t.l0.ocean_cell_u000"
+ 0, 2,  "t.l0.ocean_cell_u100"
+ 0, 4,  "t.l0.ocean_cell_u010"
+ 0, 6,  "t.l0.ocean_cell_u110"
+ 0, 8,  "t.l0.ocean_cell_u001"
+ 0, 10, "t.l0.ocean_cell_u101"
+ 0, 12, "t.l0.ocean_cell_u011"
+ 0, 14, "t.l0.ocean_cell_u111"
  
- 1, 0,  "t.ocean_cell_d000"
- 1, 2,  "t.ocean_cell_d100"
- 1, 4,  "t.ocean_cell_d010"
- 1, 6,  "t.ocean_cell_d110"
- 1, 8,  "t.ocean_cell_d001"
- 1, 10, "t.ocean_cell_d101"
- 1, 12, "t.ocean_cell_d011"
- 1, 14, "t.ocean_cell_d111"
+ 1, 0,  "t.l0.ocean_cell_d000"
+ 1, 2,  "t.l0.ocean_cell_d100"
+ 1, 4,  "t.l0.ocean_cell_d010"
+ 1, 6,  "t.l0.ocean_cell_d110"
+ 1, 8,  "t.l0.ocean_cell_d001"
+ 1, 10, "t.l0.ocean_cell_d101"
+ 1, 12, "t.l0.ocean_cell_d011"
+ 1, 14, "t.l0.ocean_cell_d111"
 
- 2, 0,  "t.ocean_cell_l000"
- 2, 2,  "t.ocean_cell_l100"
- 2, 4,  "t.ocean_cell_l010"
- 2, 6,  "t.ocean_cell_l110"
- 2, 8,  "t.ocean_cell_l001"
- 2, 10, "t.ocean_cell_l101"
- 2, 12, "t.ocean_cell_l011"
- 2, 14, "t.ocean_cell_l111"
+ 2, 0,  "t.l0.ocean_cell_l000"
+ 2, 2,  "t.l0.ocean_cell_l100"
+ 2, 4,  "t.l0.ocean_cell_l010"
+ 2, 6,  "t.l0.ocean_cell_l110"
+ 2, 8,  "t.l0.ocean_cell_l001"
+ 2, 10, "t.l0.ocean_cell_l101"
+ 2, 12, "t.l0.ocean_cell_l011"
+ 2, 14, "t.l0.ocean_cell_l111"
 
- 2, 1,  "t.ocean_cell_r000"
- 2, 3,  "t.ocean_cell_r100"
- 2, 5,  "t.ocean_cell_r010"
- 2, 7,  "t.ocean_cell_r110"
- 2, 9,  "t.ocean_cell_r001"
- 2, 11, "t.ocean_cell_r101"
- 2, 13, "t.ocean_cell_r011"
- 2, 15, "t.ocean_cell_r111"
+ 2, 1,  "t.l0.ocean_cell_r000"
+ 2, 3,  "t.l0.ocean_cell_r100"
+ 2, 5,  "t.l0.ocean_cell_r010"
+ 2, 7,  "t.l0.ocean_cell_r110"
+ 2, 9,  "t.l0.ocean_cell_r001"
+ 2, 11, "t.l0.ocean_cell_r101"
+ 2, 13, "t.l0.ocean_cell_r011"
+ 2, 15, "t.l0.ocean_cell_r111"
 
+; deep ocean coasts.
+ 0, 1,  "t.l0.deep_cell_u000"
+ 6, 2,  "t.l0.deep_cell_u100"
+ 6, 4,  "t.l0.deep_cell_u010"
+ 6, 6,  "t.l0.deep_cell_u110"
+ 6, 8,  "t.l0.deep_cell_u001"
+ 6, 10, "t.l0.deep_cell_u101"
+ 6, 12, "t.l0.deep_cell_u011"
+ 6, 14, "t.l0.deep_cell_u111"
+ 
+ 0, 1,  "t.l0.deep_cell_d000"
+ 7, 2,  "t.l0.deep_cell_d100"
+ 7, 4,  "t.l0.deep_cell_d010"
+ 7, 6,  "t.l0.deep_cell_d110"
+ 7, 8,  "t.l0.deep_cell_d001"
+ 7, 10, "t.l0.deep_cell_d101"
+ 7, 12, "t.l0.deep_cell_d011"
+ 7, 14, "t.l0.deep_cell_d111"
+
+ 0, 1,  "t.l0.deep_cell_l000"
+ 8, 2,  "t.l0.deep_cell_l100"
+ 8, 4,  "t.l0.deep_cell_l010"
+ 8, 6,  "t.l0.deep_cell_l110"
+ 8, 8,  "t.l0.deep_cell_l001"
+ 8, 10, "t.l0.deep_cell_l101"
+ 8, 12, "t.l0.deep_cell_l011"
+ 8, 14, "t.l0.deep_cell_l111"
+
+ 0, 1,  "t.l0.deep_cell_r000"
+ 8, 3,  "t.l0.deep_cell_r100"
+ 8, 5,  "t.l0.deep_cell_r010"
+ 8, 7,  "t.l0.deep_cell_r110"
+ 8, 9,  "t.l0.deep_cell_r001"
+ 8, 11, "t.l0.deep_cell_r101"
+ 8, 13, "t.l0.deep_cell_r011"
+ 8, 15, "t.l0.deep_cell_r111"
+
 ; Deep Ocean sprites.
- 3, 0,  "t.deep_cell_u000"
- 3, 2,  "t.deep_cell_u100"
- 3, 4,  "t.deep_cel

Re: [Freeciv-Dev] (PR#34265) [Patch] Deep ocean

2007-02-11 Thread Daniel Markstedt

http://bugs.freeciv.org/Ticket/Display.html?id=34265 >

On 2/12/07, Daniel Markstedt <[EMAIL PROTECTED]> wrote:
>
> http://bugs.freeciv.org/Ticket/Display.html?id=34265 >
>
> new version by Eleazar
>

Didn't intend to send a 426K image to the mailing list. Sorry about
that. Anyhow, this terrain2.png contains the deep ocean shoreline
tiles that were missing before.

 ~Daniel



___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


Re: [Freeciv-Dev] (PR#34265) [Patch] Deep ocean

2007-01-23 Thread Marko Lindqvist

http://bugs.freeciv.org/Ticket/Display.html?id=34265 >

On 1/22/07, Marko Lindqvist <[EMAIL PROTECTED]> wrote:
>
>  Ruleset patch for deep ocean. This is just for testing gfx for two
> different ocean types. Ocean types have no functional difference. They
> only will look different when we get working gfx.

 Adjusted ocean_depth parameters for both ocean types so there will be
more Ocean and less Deep Ocean. Now there should be slightly more
Ocean than Deep Ocean.


 - ML

diff -Nurd -X.diff_ignore freeciv/data/default/terrain.ruleset freeciv/data/default/terrain.ruleset
--- freeciv/data/default/terrain.ruleset	2007-01-22 22:06:23.0 +0200
+++ freeciv/data/default/terrain.ruleset	2007-01-23 14:20:13.0 +0200
@@ -218,6 +218,45 @@
  work with.\
 ")
 
+[terrain_deep_ocean]
+name = _("Deep Ocean")
+graphic  = "deep"
+graphic_alt	 = "ocean"
+identifier	 = " "
+movement_cost= 1
+defense_bonus= 0
+food = 1
+shield   = 0
+trade= 2
+resources= "Fish", "Whales"
+road_trade_incr  = 0
+road_time= 0
+irrigation_result= "no"
+irrigation_food_incr = 0
+irrigation_time  = 0
+mining_result= "no"
+mining_shield_incr   = 0
+mining_time  = 0
+transform_result = "Ocean"
+transform_time   = 36
+rail_time= 3
+airbase_time = 3
+fortress_time= 3
+clean_pollution_time = 3
+clean_fallout_time   = 3
+warmer_wetter_result = "no"
+warmer_drier_result  = "no"
+cooler_wetter_result = "no"
+cooler_drier_result  = "no"
+native_to= "Sea", "Air", "Missile", "Helicopter"
+flags= "Oceanic", "NoPollution", "UnsafeCoast", "NoCities"
+property_ocean_depth = 80
+helptext	 = _("\
+Oceans cover much of the world, and only sea units can travel on them.\
+\n\n\
+Ocean squares can never be polluted or subjected to fallout.\
+")
+
 [terrain_desert]
 name = _("Desert")
 graphic  = "desert"
@@ -455,7 +494,7 @@
 name = _("Ocean")
 graphic  = "ocean"
 graphic_alt	 = "-"
-identifier	 = " "
+identifier	 = "_"
 movement_cost= 1
 defense_bonus= 0
 food = 1
@@ -483,7 +522,7 @@
 cooler_drier_result  = "no"
 native_to= "Sea", "Air", "Missile", "Helicopter"
 flags= "Oceanic", "NoPollution", "UnsafeCoast", "NoCities"
-property_ocean_depth = 10
+property_ocean_depth = 30
 helptext	 = _("\
 Oceans cover much of the world, and only sea units (Triremes and\
  other boats) can travel on them.\
___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


Re: [Freeciv-Dev] (PR#34265) [Patch] Deep ocean

2007-01-23 Thread Marko Lindqvist

http://bugs.freeciv.org/Ticket/Display.html?id=34265 >

 Daniel has attached terrain2.png with Eleazar's Deep Ocean gfx to
this ticket. Attached patch contains related .tilespec and .spec
changes.

 Gfx and this patch should go in for those who want to use Deep Ocean
rulesets, but ruleset change should not. I don't think we can add Deep
Ocean to default ruleset when it has this big problems with our
default tileset (amplio). Poles look terrible.


 - ML

diff -Nurd -X.diff_ignore freeciv/data/amplio/terrain2.spec freeciv/data/amplio/terrain2.spec
--- freeciv/data/amplio/terrain2.spec	2007-01-23 12:20:34.0 +0200
+++ freeciv/data/amplio/terrain2.spec	2007-01-23 13:53:08.0 +0200
@@ -11,6 +11,7 @@
 Tim F. Smith <[EMAIL PROTECTED]>
 Yautja
 Daniel Speyer
+Eleazar
 "
 
 [file]
@@ -179,40 +180,40 @@
  2, 13, "t.ocean_cell_r011"
  2, 15, "t.ocean_cell_r111"
 
-; Deep Ocean fallback to same tiles as Ocean.
- 0, 0,  "t.deep_cell_u000"
- 0, 2,  "t.deep_cell_u100"
- 0, 4,  "t.deep_cell_u010"
- 0, 6,  "t.deep_cell_u110"
- 0, 8,  "t.deep_cell_u001"
- 0, 10, "t.deep_cell_u101"
- 0, 12, "t.deep_cell_u011"
- 0, 14, "t.deep_cell_u111"
+; Deep Ocean sprites.
+ 3, 0,  "t.deep_cell_u000"
+ 3, 2,  "t.deep_cell_u100"
+ 3, 4,  "t.deep_cell_u010"
+ 3, 6,  "t.deep_cell_u110"
+ 3, 8,  "t.deep_cell_u001"
+ 3, 10, "t.deep_cell_u101"
+ 3, 12, "t.deep_cell_u011"
+ 3, 14, "t.deep_cell_u111"
  
- 1, 0,  "t.deep_cell_d000"
- 1, 2,  "t.deep_cell_d100"
- 1, 4,  "t.deep_cell_d010"
- 1, 6,  "t.deep_cell_d110"
- 1, 8,  "t.deep_cell_d001"
- 1, 10, "t.deep_cell_d101"
- 1, 12, "t.deep_cell_d011"
- 1, 14, "t.deep_cell_d111"
+ 4, 0,  "t.deep_cell_d000"
+ 4, 2,  "t.deep_cell_d100"
+ 4, 4,  "t.deep_cell_d010"
+ 4, 6,  "t.deep_cell_d110"
+ 4, 8,  "t.deep_cell_d001"
+ 4, 10, "t.deep_cell_d101"
+ 4, 12, "t.deep_cell_d011"
+ 4, 14, "t.deep_cell_d111"
 
- 2, 0,  "t.deep_cell_l000"
- 2, 2,  "t.deep_cell_l100"
- 2, 4,  "t.deep_cell_l010"
- 2, 6,  "t.deep_cell_l110"
- 2, 8,  "t.deep_cell_l001"
- 2, 10, "t.deep_cell_l101"
- 2, 12, "t.deep_cell_l011"
- 2, 14, "t.deep_cell_l111"
+ 5, 0,  "t.deep_cell_l000"
+ 5, 2,  "t.deep_cell_l100"
+ 5, 4,  "t.deep_cell_l010"
+ 5, 6,  "t.deep_cell_l110"
+ 5, 8,  "t.deep_cell_l001"
+ 5, 10, "t.deep_cell_l101"
+ 5, 12, "t.deep_cell_l011"
+ 5, 14, "t.deep_cell_l111"
 
- 2, 1,  "t.deep_cell_r000"
- 2, 3,  "t.deep_cell_r100"
- 2, 5,  "t.deep_cell_r010"
- 2, 7,  "t.deep_cell_r110"
- 2, 9,  "t.deep_cell_r001"
- 2, 11, "t.deep_cell_r101"
- 2, 13, "t.deep_cell_r011"
- 2, 15, "t.deep_cell_r111"
+ 5, 1,  "t.deep_cell_r000"
+ 5, 3,  "t.deep_cell_r100"
+ 5, 5,  "t.deep_cell_r010"
+ 5, 7,  "t.deep_cell_r110"
+ 5, 9,  "t.deep_cell_r001"
+ 5, 11, "t.deep_cell_r101"
+ 5, 13, "t.deep_cell_r011"
+ 5, 15, "t.deep_cell_r111"
 }
diff -Nurd -X.diff_ignore freeciv/data/amplio.tilespec freeciv/data/amplio.tilespec
--- freeciv/data/amplio.tilespec	2007-01-23 12:20:34.0 +0200
+++ freeciv/data/amplio.tilespec	2007-01-23 14:02:28.0 +0200
@@ -96,7 +96,7 @@
 
 [layer1]
 match_style = "BOOL"
-match_types = "forest", "hills", "mountains"
+match_types = "forest", "hills", "mountains", "deep"
 
 [terrain_arctic]
 is_blended = 1
@@ -150,12 +150,30 @@
 layer0_match_type = "ocean"
 layer0_cell_type = "rect"
 
+; Deep Ocean is currently quite a hack:
+; - Blending is disabled so there will be no blending
+;   between Ocean and Deep Ocean. Ocean blending tile
+;   is of land colour and we don't want that to appear
+;   in the middle of the ocean.
+; - Deep Ocean is in two layers. Layer0 is setup just
+;   for match_type = "ocean". Ocean will match this
+;   and will not draw coast sprites between Ocean and
+;   Deep Ocean. Layer1 is for actual Deep Ocean drawing.
+;   Ocean will not match this, so Deep Ocean to Ocean
+;   sprites will be drawn.
+;
+; Problems:
+; - There is no blending between Deep Ocean and land tiles
+; - There is no coast drawn beteen Deep Ocean and land tiles
 [terrain_deep]
 is_blended = 0
-num_layers = 1
+num_layers = 2
 layer0_match_style = "bool"
 layer0_match_type  = "ocean"
 layer0_cell_type   = "rect"
+layer1_match_style = "bool"
+layer1_match_type  = "deep"
+layer1_cell_type   = "rect"
 
 [terrain_plains]
 is_blended = 1
___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] (PR#34265) [Patch] Deep ocean

2007-01-21 Thread Marko Lindqvist

http://bugs.freeciv.org/Ticket/Display.html?id=34265 >

 Ruleset patch for deep ocean. This is just for testing gfx for two
different ocean types. Ocean types have no functional difference. They
only will look different when we get working gfx.
 This cannot be committed until tilesets work correctly at least using
fallbacks. Current tilespecs are such that coast is drawn between
Ocean and Deep Ocean.


 - ML



___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev