1
DF Gameplay Questions / Re: Increasing framerates... without money - fortress design for fast pathfinding
« on: April 30, 2010, 05:01:56 pm »
One thing about the walling off resources bit. It seems (from my experience years of experience in dwarf fortressing) that inaccesible items don't have a huge effect fps. You will get a short stutter in fps from the dwarves finding new tasks and pathfinding all at once, but after that they seem to happily ignore the areas they can no longer go. This wasn't always the case. Back in the 2d version if you locked a door to something a dwarf wanted they would occasionally retry the pathing and spit out an error announcement. Now you'll only get that message if you block their path when they were already headed there. Whether there is still a small drain on the cpu from inaccesible items or not, I have no idea. I know next to nothing about programming, this is all based on observation.
One exception is animals, they will continue to attempt to path through a door over and over causing pretty significant fps issues at times. Again, it's better than it was back in the 2d days, but it's something to keep in mind with animals roaming free.
My theory (just a theory, like I said I have no programming experience to back this up with) is that all items do a routine pathfinding of the entire landscape. Updating when the landscape changes. It's probably more complicated then that but it seems possible.
Say you craft a statue and you go to build it on the other end of your fortress. The game tells you have many steps away the statue is from where you're trying to build it. Go somewhere the statue can't reach, the other side of a river for instance, and it'll simply say it's inaccesible. Build a thousand statues and it'll tell you the distance each one is from you chosen build site. The fact that the game can give you the distance to thousands and thousands of rocks in an instant when you build a wall suggests to me that it's not calculating on the fly but rather has the information on hand already.
One exception is animals, they will continue to attempt to path through a door over and over causing pretty significant fps issues at times. Again, it's better than it was back in the 2d days, but it's something to keep in mind with animals roaming free.
My theory (just a theory, like I said I have no programming experience to back this up with) is that all items do a routine pathfinding of the entire landscape. Updating when the landscape changes. It's probably more complicated then that but it seems possible.
Say you craft a statue and you go to build it on the other end of your fortress. The game tells you have many steps away the statue is from where you're trying to build it. Go somewhere the statue can't reach, the other side of a river for instance, and it'll simply say it's inaccesible. Build a thousand statues and it'll tell you the distance each one is from you chosen build site. The fact that the game can give you the distance to thousands and thousands of rocks in an instant when you build a wall suggests to me that it's not calculating on the fly but rather has the information on hand already.