Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Solving plenty of water bugs ?  (Read 479 times)

flap

  • Bay Watcher
    • View Profile
Solving plenty of water bugs ?
« on: August 23, 2006, 08:54:00 am »

Apparently there are plenty of water bugs. So I was wondering wether it would be possible to handle it slightly differently (Well, I don't know how it is handled now... So I can tell if it is that different!) : It would require to add a Z coordinate to all tiles (which exists If I understood well ?)

The water would go to a square only if its tile is above this one. So get water coming into a filed, you would have to go upstream the river where it slightly above the field, to remove water, you would need a second channel going downstream to the river where it is slightly lower than your field.

That would also be usefull if you could level the ground (raise or lower it slightly). To have an idea of the ground level, you could display a screen with arrows showing wich way the water would flow, or color related to the ground height.

I spoke of ground level, it might be more acurate of top water level. If the is no water on a square, the top water level of this one would be the ground level.

However to avoid the eternal wave bug : lets say you count water level in units. The smallest one is 1 unit. If the water height is only 1 unit above the next square water height, it will not move. (Thus creating a water puddle). Also, units don't need to mean anything in real life : it could be only 1 mm. So having lots of units difference through you fortress would not require to build (and thus implement) stairs. And for the boring one telling, "no but it is not tight,water should always go to the lowest point", you could reply that 1 unit is just what surface tension is strong enough to resist to the movement.

Ex :

code:
  

w  ->  w
---    --- : W (water) top is one unit above ground, it does not move

w
w  ->  ww
---    --- : W at the top is 2 units above ground, it moves at random

ww     w
--  -> --w
 -      - : the second W is 2 units above ground, it goes down.


Seeing that exemple, this 2 units high might be a problem. Maybe that would be it or 1 unit only only if is connected to a source of water higher or at the same level of the moving water ?

So would it help ?

Logged

Varil

  • Bay Watcher
    • View Profile
Re: Solving plenty of water bugs ?
« Reply #1 on: August 24, 2006, 03:20:00 am »

I like the height difference idea, though it will likely be ultimately complicated and lead to poor, poor confused players(and dwarves).

  I propose the height differences represent roughly one 'dwarf height'.

  Moving between 1 unit heights slows down dwarves some, unless it has been detailed by a mason, making it stairs. 2 unit heights can only be passed if they have been made stairs.

  Water, of course, only flows downhill. The outside could be randomly sloped or even variably hilly, depending on terrain.

  The river might randomly flow around or through hills during map gen. Hills it flows through are effectively erased. The river should either slope only one way or be the same height all the way. On same-slope maps for the outside, the river might be biased to curve 'downhill' during map generation.

  In mining, dwarves could be told to 'dig down' or 'dig straight' or 'dig up'. For simplicity, the end result should merely result in hilly tunnels, rather than a true 3D maze(which *would* be rather awesome...and damned hard to control. "Dig up here. Wait...where was the river ag-.)

  Maybe we could implement height in how missiles work. Hillside rigged with 'staired' ballistae, anyone?

Logged