Bay 12 Games Forum

Please login or register.

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

Author Topic: [40c] Walking far distance for materials that are much closer.  (Read 5518 times)

Veroule

  • Bay Watcher
    • View Profile
Re: [40c] Walking far distance for materials that are much closer.
« Reply #15 on: September 06, 2008, 05:16:32 pm »

I have stated it many times before.

The correction for mining is to path from the squared to be mined to the miner.  Reverse the path, and remove the final step.

Correcting item usage is a little more complex.  The first step to do it is to make the item chosen by its distance from the workshop instead of the dwarf.

I have detailed the logic for both of these in quite a few posts.  I won't repeat it all again, but both changes should be very easy to implement as long as it is only those small logic changes.  Each would have a significant impact in dwarven efficiency, without actually reducing FPS.
Logged
"Please, spare us additional torture; and just euthanise yourselves."
Delivered by Tim Curry of Clue as a parody of the lead ass from American Idol in the show Psych.

Draco18s

  • Bay Watcher
    • View Profile
Re: [40c] Walking far distance for materials that are much closer.
« Reply #16 on: September 06, 2008, 06:38:09 pm »

How about...

Given:
The next square to be mined is likely either 1 or 2 spaces away from the dorf in question (i.e. they just mined a tile, if the next tile chosen is either: adjacent to that tile or adjacent to the dorf)

Then:
If the path the dorf plans to take is longer than 5 tiles, abort and find a new path.  Suggest marking the last tile in that path as "wallish" and path to a different standable tile.
Logged

Starver

  • Bay Watcher
    • View Profile
Re: [40c] Walking far distance for materials that are much closer.
« Reply #17 on: September 06, 2008, 10:51:51 pm »

I have stated it many times before.

The correction for mining is to path from the squared to be mined to the miner.  Reverse the path, and remove the final step.
I don't understand the need for the initial switch and later reversal.  Unless that's your way of getting around the destination being normally unroutable-to.


Quote
Correcting item usage is a little more complex.  The first step to do it is to make the item chosen by its distance from the workshop instead of the dwarf.
If it weren't a matter of having to find multiple destinations (or reverse routes from multiple start-points) a future improvement might be that while a particular object might be tentatively reserved for a task, as each and every job comes up the nearest object (or one that results in the shortest total path, via the point of collection) that is the exact same type of item is used (any tentative reservation applied to that one switched over for later optomisation).  More advanced versions controls might even allow (frexample) "any bed" or "bed of this quality or greater" or even "bed of greatest quality" to be auto-substituted.

(Nope, way too much processor cycles involved in that, unless enough drastic improvements can be made with the whole routines that such extravagance can be bowed down to.  Really, not a serious suggestion, just a wild musing... 8))


Of course, right now you can deliberately use the ability to choose specific materials to prioritise their movement out of newly-dug areas that one wants to make inaccessible as soon as they're cleared, and I'm sure everyone would want to retain this particular ability as an option.  (Hey, adding "get furthest stone of any kind that you can find" could be a well-used option, to enhance the gathering-in speed.)  Though the current masters of resource allocation can doubtless engineer these things this way already, by judicious mass allocation and deallocation

Quote
I have detailed the logic for both of these in quite a few posts.  I won't repeat it all again, but both changes should be very easy to implement as long as it is only those small logic changes.  Each would have a significant impact in dwarven efficiency, without actually reducing FPS.
Unlike most of my ideas in this post, which are fanciful at best!
Logged

numerobis

  • Bay Watcher
    • View Profile
Re: [40c] Walking far distance for materials that are much closer.
« Reply #18 on: September 08, 2008, 06:06:04 pm »

Correcting item usage is a little more complex.  The first step to do it is to make the item chosen by its distance from the workshop instead of the dwarf.

If the dwarf and workshop are in the same place, then this is not a change (they aren't always, but they often are).  What we're all looking at is the fact that the search for the item uses the wrong notion of distance.

The mining thing is a somewhat different issue.  For some reason, the miner desperately wants to stand on a particular side of a wall when mining it.  The logic is detailed on the wiki on some page I can never quickly find.  It's as if the job were "stand on this tile; now, dig at that tile."  The same happens for building and removing constructions, for engraving walls, and a couple other things.  I'm not sure why it's this way, and hopefully that will be fixed too someday.  On the other hand, it's pretty useful to be able to predict which side of the wall my dwarf will be after she's done building it.
« Last Edit: September 08, 2008, 06:11:02 pm by benoit.hudson »
Logged

Draco18s

  • Bay Watcher
    • View Profile
Re: [40c] Walking far distance for materials that are much closer.
« Reply #19 on: September 08, 2008, 08:00:14 pm »

For some reason, the miner desperately wants to stand on a particular side of a wall when mining it.  The logic is detailed on the wiki on some page I can never quickly find.

WENS
West, East, North, South.  Followed by all diagonals with the same hierarchy (things with west come first, things with north come first).
Logged
Pages: 1 [2]