Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Digging algorithm  (Read 1020 times)

PaulMurrayCbr

  • Bay Watcher
    • View Profile
Digging algorithm
« on: March 02, 2013, 07:16:00 am »

1- If an area is marked to be dug or channeled, then dwarves should not dig it if the square immediately above is accessible and is marked to dug or channeled. "accessible" in this context means normally reachable, or reachable through other squares that are marked to be dug or channeled. Perhaps there might be a check based on the dwarf's spatial sense.

2 - dwarves should prefer to dig squares that have fewest designated dig squares surrounding them. The effect of this is that they will tend to dig out rectangular areas. Alternatively: dwarves can be told to dig out areas, which means digging squares with fewest designated dig squares around them, or to dig exporatively, preferentially digging out squares with the most dig designated squares and undesignated solid blocks surrounding them. This should result in a dendritic dig pattern that will follow the border of the designated areas.
« Last Edit: March 02, 2013, 07:28:52 am by PaulMurrayCbr »
Logged

GreatWyrmGold

  • Bay Watcher
  • Sane, by the local standards.
    • View Profile
Re: Digging algorithm
« Reply #1 on: March 05, 2013, 01:24:59 pm »

1 sounds like a simple way to limit dwarven stupidity. 2 is a bit more involved, but makes sense.
Logged
Sig
Are you a GM with players who haven't posted? TheDelinquent Players Help will have Bay12 give you an action!
[GreatWyrmGold] gets a little crown. May it forever be his mark of Cain; let no one argue pointless subjects with him lest they receive the same.