Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 2 [3]

Author Topic: Do dwarves have a brain the size of a peanut?!  (Read 6488 times)

Jelle

  • Bay Watcher
    • View Profile
Re: Do dwarves have a brain the size of a peanut?!
« Reply #30 on: March 20, 2012, 08:29:11 am »

Isn't the game already quite capable of reading waterflow?
I mean watermills can check the flow of the tile they're on, wouldn't it be easy to do a similar check when pathing through a watertile to avoid the ones with high flow in them?
I'm probably talking to much about stuff I don't understand, pretty sure the most of ya know more about the specifics of how this pathing works then me. Still having a hard time believing something like this would be to complicated to implement
Logged

GoldenShadow

  • Bay Watcher
    • View Profile
Re: Do dwarves have a brain the size of a peanut?!
« Reply #31 on: March 20, 2012, 08:35:38 am »

Its not difficult to come up with solutions without changing anything with the game code.

Mark the shallow water as restricted traffic.
Build a wall along the shoreline 1 tile from water. install a door so the last dwarf can get out when he walls himself in. Once everyone is clear, lock the door and they will have no reason to path through the low water crossing. then you can build a bridge somewhere else without them wanting to cross the water to build the bridge.
Logged

Sphalerite

  • Bay Watcher
    • View Profile
    • Drew's Robots and stuff
Re: Do dwarves have a brain the size of a peanut?!
« Reply #32 on: March 20, 2012, 08:42:14 am »

Isn't the game already quite capable of reading waterflow?
I mean watermills can check the flow of the tile they're on, wouldn't it be easy to do a similar check when pathing through a watertile to avoid the ones with high flow in them?
I'm probably talking to much about stuff I don't understand, pretty sure the most of ya know more about the specifics of how this pathing works then me. Still having a hard time believing something like this would be to complicated to implement

DF isn't very good at determining when water is flowing.  It doesn't distinguish between 'river that will push you over a cliff' and 'pool of 2/7 deep with a few tiles of 3/7 deep moving around'.  If moving water is marked as impassible, then you will effectively be marking any water deeper than 1/7 as impassible.
Logged
Any intelligent fool can make things bigger and more complex... It takes a touch of genius --- and a lot of courage to move in the opposite direction.

Garath

  • Bay Watcher
  • Helping to deforest the world
    • View Profile
Re: Do dwarves have a brain the size of a peanut?!
« Reply #33 on: March 20, 2012, 09:37:23 am »

It also seems to be a problem at places where rivers leave the map.
Logged
Quote from: Urist Imiknorris
Jam a door with its corpse and let all the goblins in. Hey, nobody said it had to be a weapon against your enemies.
Quote from: Frogwarrior
And then everyone melted.

HiEv

  • Bay Watcher
  • Denizen of Counter-Earth
    • View Profile
Re: Do dwarves have a brain the size of a peanut?!
« Reply #34 on: March 20, 2012, 04:12:11 pm »

Or, Toady could use the far simpler method of marking those tiles as dangerous when he creates the waterfall initially, and then simply make pathing avoid those dangerous tiles.  I mean, dwarves already avoid walking into lava or crossing deep water, really, how hard would that be?
What criteria do you suggest the game use to determine those tiles are dangerous?  Magma is automatically marked as impassible at any depth.  Water is marked as impassible when at 4/7 or deeper.  The tiles on the edge of the waterfall are at less than 4/7 deep, so they aren't marked as impassible.  To mark those tiles as dangerous, you'd either need to mark all water at 1/7 or deeper as dangerous, or add in a special status to just those river tiles marking them as dangerous even when the game wouldn't normally consider them as such.  Presumably they'd then remain marked dangerous even if the player did something like divert the river.  It would be a bit of a clumsy way to solve the problem, adding a special-case exception to the normal game logic.

How about this?  If a tile is both a location of moving water ("flow" is turned on for that tile) and adjacent to an open space (or map edge?), then it would be marked as a waterfall edge and tagged as "dangerous" (avoided for pathing).  That "dangerous" tag would have a counter that would count down periodically, and if it reached 0 it would be treated as "safe".  However, if the tile was covered in 3/7 or higher water, the counter would be reset instead of counting down.  (The question of how high to set the counter when it is reset depends on how often the counter counts down, which should be infrequently.)  That way it would always be treated as "dangerous" and prevent pointless "cliff diving", unless you blocked, drained, and/or diverted the river in some way, where after a short period it would become "safe" until 3/7 or higher water passed over it again.

Yes, it's a special case, but it's an easy to implement case with little impact on processing time.

This would make creatures behave in an apparently rational way, and would save you the hassle of having to go out of your way to keep dwarves and traders from falling to an unnecessary death.

Sound good?
Logged
The difference between intelligence and stupidity is that intelligence has its limits.
Pages: 1 2 [3]