Currently the land survey tool has a bias for digging/filling in from the northernmost point of the survey towards the south, probably just how the code searches for the next point needed to dig/fill at.
Problem:
When doing a land survey to substantially lower a large piece of uneven terrain, frequently the character will waste time digging only 1-2 units of soil at a time on the side of an uneven slope, despite having a shovel that allows the play to dig much more. The max difference in terrain elevation, combined with an uneven peak causes this. If the algorithm selected instead the highest point of the survey to dig and work downward, this should increase efficiency of digging and reduce the number of times they'll need to revisit the same node.
The same issue appears with filling in an uneven pit, though not as common for me at least.
So when digging downward, the character should chose the highest (diggable) point of the surface instead of just the northernmost one. And when filling in, select the lower diggable point.
One advantage to the current system is that by constantly focusing on the northern side (or any side, instead of peak elevation), this creates a flat surface sooner which is beneficial to placing dirt stockpiles for holding the remaining dirt to be dug. On a highly uneven starting surface, digging from peak elevation down might have a very "noisy" surface until the bottom of the survey is reached. Maybe a toggle in the survey menu, "Favor maxima/minima, Favor one edge."
tl;dr: survey digging logic should favor digging from the highest points, not the northernmost points. Maybe a toggle though for the occasions where an edge bias is more important than a peak bias.
-
loftar
- Posts: 9096
- Joined: Fri Apr 03, 2009 7:05 am
- Location: Your character database
Re: Land survey algorithm
It actually chooses the point closest to the player character, and I myself have never noticed any deviation from that.
"Object-oriented design is the roman numerals of computing." -- Rob Pike
-
Dakkan
- Posts: 666
- Joined: Thu Dec 12, 2013 2:58 am
Re: Land survey algorithm
I should have been more specific, I mean that if you start digging in the center of a survey, and all vertices around you are acceptable targets for the next dig operation, it is biased towards the northern one. Then east/west, then finally south. I'm guessing just on how it loops through the check of available nearest vertices.loftar wrote:It actually chooses the point closest to the player character, and I myself have never noticed any deviation from that.
Instead I was thinking of initially a total check on the entire query for the highest diggable vertex, then highest adjacent vertex after that.
-
Fierce_Deity
- Posts: 783
- Joined: Thu Feb 12, 2015 4:11 pm
Re: Land survey algorithm
I guess this is somewhat reasonable...but ultimately the result is the same no?
-
Dakkan
- Posts: 666
- Joined: Thu Dec 12, 2013 2:58 am
Re: Land survey algorithm
The ultimate result without any survey system and just digging each vertex manually is also the same.
I'm just suggesting an alternate way that the survey system can choose vertices that should greatly reduce the number of steps to finish a survey. Not sure about the operations cost behind the scenes however, which could be a problem.
edit:

This is a simplified example. The point where I dug could only be lowered two units due to the height of a nearby vertex. Then, the character checks the nearest vertex and digs those, even though they will now only be diggable by 2 units. Eventually the character reaches the bottom of the incline with these small digs, then heads to the top and digs the vertex that was originally holding back the character from digging more. Sure, in this example the problem would vanish after this happening a few times, but frequently with very unlevel surfaces it will happen over and over and over, significantly extending the time it takes to level a survey. For the record in this example the first 11 digging events my character only dug up 17 soil.
Instead if the highest point was chosen first, then the highest adjacent side and so on, it would ensure that the digger would always excavate the maximum possible amount their shovel is capable of with the exceptions of unusually placed surveys.
I'm just suggesting an alternate way that the survey system can choose vertices that should greatly reduce the number of steps to finish a survey. Not sure about the operations cost behind the scenes however, which could be a problem.
edit:

This is a simplified example. The point where I dug could only be lowered two units due to the height of a nearby vertex. Then, the character checks the nearest vertex and digs those, even though they will now only be diggable by 2 units. Eventually the character reaches the bottom of the incline with these small digs, then heads to the top and digs the vertex that was originally holding back the character from digging more. Sure, in this example the problem would vanish after this happening a few times, but frequently with very unlevel surfaces it will happen over and over and over, significantly extending the time it takes to level a survey. For the record in this example the first 11 digging events my character only dug up 17 soil.
Instead if the highest point was chosen first, then the highest adjacent side and so on, it would ensure that the digger would always excavate the maximum possible amount their shovel is capable of with the exceptions of unusually placed surveys.
-
jorb
- Posts: 18715
- Joined: Fri Apr 03, 2009 7:07 am
- Location: Here, there and everywhere.
Re: Land survey algorithm
Will consider, at least.
EDIT: Won't change the code due to other cases becoming less optimal -- prioritizing the highest point prevents multiple people from using the same survey, for example -- but a simple fix is to position the character at the highest point manually.
EDIT: Won't change the code due to other cases becoming less optimal -- prioritizing the highest point prevents multiple people from using the same survey, for example -- but a simple fix is to position the character at the highest point manually.
"The psychological trials of dwellers in the last times will be equal to the physical trials of the martyrs. In order to face these trials we must be living in a different world."
-- Hieromonk Seraphim Rose
-- Hieromonk Seraphim Rose
-
Dakkan
- Posts: 666
- Joined: Thu Dec 12, 2013 2:58 am
Re: Land survey algorithm
Two players can't work the same survey though?jorb wrote:Will consider, at least.
EDIT: Won't change the code due to other cases becoming less optimal -- prioritizing the highest point prevents multiple people from using the same survey, for example -- but a simple fix is to position the character at the highest point manually.
I guess I just want the player to choose the highest neighboring tiles to dig from after a digging event, otherwise the closest diggable point. This way the character might work their way towards these troublesome peaks when they show up.
-
jorb
- Posts: 18715
- Joined: Fri Apr 03, 2009 7:07 am
- Location: Here, there and everywhere.
Re: Land survey algorithm
Two players can indeed work the same survey.
"The psychological trials of dwellers in the last times will be equal to the physical trials of the martyrs. In order to face these trials we must be living in a different world."
-- Hieromonk Seraphim Rose
-- Hieromonk Seraphim Rose