Ive had a different idea for path finding for a while.
Maybe there can be someway toady can set it up so that we can pre-set degsinated paths around are forts.
Rather then what was said in the first post in this thread, Where the universe stops and the dwarf has to find a path to where he/she needs to go.
The player, "us" we set pre desinated "Roads" / "Paths" Through the fort.
If the dwarf needs to get to a certain location, rather then the program itself trying to find a path tile by tile. It reads the predesinated "Roads" / "Paths" which we set.
(im trying to be as clear as i can on this)
This system would work with the current system.
Such as the "Traffic zones" are already working and in place. These set traffic zones could be used to help the dwarfs get to where there going.
Instead of calculating and re calculating pathfinding.
The cpu/game makes a path using the "Traffic Zones" Rather then finding a path tile by tile.
A dwarf then doesnt have to look at the whole "Universe" it just has to follow the traffic paths we setup.
If theres a job at x=5 y=5 z=5
and the dwarf is at x=5 y=100 z=6
And theres a traffic zone set connection to where the dwarf needs to get to. Then it just needs to follow the path.
The game / cpu would have to of course assume that the paths we set are correct, and that there wont be any blockage getting from point A to B.
So as long as we setup correct traffic routes, the dwarfs will move fine.
There will be need of a internal checker to make sure the route the dwarf if trying to goto works. If the route doesnt work, "Give a message to the player letting the player know he effed up"
Well i think i kinda got my idea through.
Main theme of this, rather then checking 100 diffrent tiles, it mainly checks a single zone which we preset.
Being the traffic zones already in place.
Toady wouldnt have to change much code, i don't think, atleast not as much as revamping the whole path finding system.
If we set down traffic zones, rather then dwarfs looking all over the world to path find, it just follows the preset traffic zones.
Rather then using CPU logic, we use our own logic.
We could also be giving the option to preset paths OR.
For say a farmer, rather then repath finding from his bedroom, to the farm, to the dining room, to the bathrooms to where ever else that dwarf needs to go, once a path is found, the game should not forget about it.
Each dwarf should have his own store memory of where he or she needs to go. The quickest path it finds to its desitnations would be the one it uses.
If theres traffic zones setup, it trying to path find only by linking diffrent traffic zones together, and not having to complie every tile by its own.
Sorry for all the spelling mistakes, but its early and im not fixing them all even if there is a spell checker
Edit: Just to add on. The current path finding system would stay in place with myidea. But however, the current path finding system would be the last resort for a dwarf trying to get some wheres. The dwarf would first check the set traffic zones, before it trys to get to its destination with the current pathfinding system.