The problem, as I know it, is that tracking leads you to the position of the object you track,
not towards cave entrances, should the object be inside one.
When you reach that point in the "overworld" and find that the object is not there, first then
do you know it's in a cave.
And then you need to find an entrance.
-
kaka
- Posts: 673
- Joined: Fri Apr 03, 2009 8:31 am
- Location: Château de Gâteau
-
loftar
- Posts: 9096
- Joined: Fri Apr 03, 2009 7:05 am
- Location: Your character database
Re: Caves, Mines and Hearth-fires
Not really. The pathfinder is made primarily for short distances (like helping an animal find its way past a palisade or through a farm) -- trying to find a path from a hearth to a cave entrance would be prohibitively expensive. It might be true, however, that a new pathfinder could be constructed for that purpose, but that would take some time.Jackard wrote:would your pathfinding help solve this? would it be possible to have some sort of indicator appear (footprints?) if you can actually reach the hearth from the current cluster?
"Object-oriented design is the roman numerals of computing." -- Rob Pike
-
sabinati
- Posts: 15527
- Joined: Mon Jul 13, 2009 4:25 am
- Location: View active topics
Re: Caves, Mines and Hearth-fires
couldn't you just make it so if a hearthfire is in a cave, tracking leads to the cave entrance, then when you get inside the cave, normal tracking resumes?
-
Potjeh
- Posts: 11825
- Joined: Fri May 29, 2009 4:03 pm
Re: Caves, Mines and Hearth-fires
That's not the problem Jackard is referring to. He's saying that tracking could lead you to a cave that is not even connected to the one where the tracked object is. I suppose this could be circumvented by assigning cave ID to cave tiles and entrances. Then you just check the cave ID where the tracked object is, and only look through the list of the entrances with the same ID to find the closest entrance. Once you're in the right cave, tracking is hard, but still quite doable.
-
sabinati
- Posts: 15527
- Joined: Mon Jul 13, 2009 4:25 am
- Location: View active topics
Re: Caves, Mines and Hearth-fires
oh right, i guess that would be necessary, that's kind of what i was thinking though, that tracking should lead to and entrance of the cave that the hearthfire is actually in, not just a random cave entrance.
-
loftar
- Posts: 9096
- Joined: Fri Apr 03, 2009 7:05 am
- Location: Your character database
Re: Caves, Mines and Hearth-fires
The main problem is, indeed, with mapping locations to cave entrances. Saving some kind of "cave ID" or anything per tile would be far too memory-expensive to be doable.Potjeh wrote:Then you just check the cave ID where the tracked object is, and only look through the list of the entrances with the same ID to find the closest entrance.
"Object-oriented design is the roman numerals of computing." -- Rob Pike
-
theTrav
- Posts: 3464
- Joined: Fri May 29, 2009 11:25 pm
Re: Caves, Mines and Hearth-fires
cave's don't seem to be quite the same as mines and cabins... They are labrinthian networks, some with multiple openingssabinati wrote:oh right, i guess that would be necessary, that's kind of what i was thinking though, that tracking should lead to and entrance of the cave that the hearthfire is actually in, not just a random cave entrance.
-
Potjeh
- Posts: 11825
- Joined: Fri May 29, 2009 4:03 pm
Re: Caves, Mines and Hearth-fires
Hmm, could you assign the cave ID to the actual object? Cave ID gets assigned to a character, based on the last used entrance, and any objects this character places in a cave get assigned the same ID. Would still be fairly memory expensive, but hey, better memory than CPU cycles.loftar wrote:The main problem is, indeed, with mapping locations to cave entrances. Saving some kind of "cave ID" or anything per tile would be far too memory-expensive to be doable.Potjeh wrote:Then you just check the cave ID where the tracked object is, and only look through the list of the entrances with the same ID to find the closest entrance.
-
loftar
- Posts: 9096
- Joined: Fri Apr 03, 2009 7:05 am
- Location: Your character database
Re: Caves, Mines and Hearth-fires
Hmm... I was considering that exact solution, but I concluded that it wouldn't work for some reason. I just don't remember the reason...Potjeh wrote:Hmm, could you assign the cave ID to the actual object? Cave ID gets assigned to a character, based on the last used entrance, and any objects this character places in a cave get assigned the same ID. Would still be fairly memory expensive, but hey, better memory than CPU cycles.loftar wrote:The main problem is, indeed, with mapping locations to cave entrances. Saving some kind of "cave ID" or anything per tile would be far too memory-expensive to be doable.Potjeh wrote:Then you just check the cave ID where the tracked object is, and only look through the list of the entrances with the same ID to find the closest entrance.
"Object-oriented design is the roman numerals of computing." -- Rob Pike
-
jorb
- Posts: 18715
- Joined: Fri Apr 03, 2009 7:07 am
- Location: Here, there and everywhere.
Re: Caves, Mines and Hearth-fires
If you teleport into the cave to get to your hearthfire, you haven't passed the entrance.
"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