Bay 12 Games Forum

Please login or register.

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

Author Topic: Framerate drops with large open production areas?  (Read 1450 times)

RogerN

  • Bay Watcher
    • View Profile
Re: Framerate drops with large open production areas?
« Reply #15 on: September 30, 2008, 05:06:06 pm »

Also, now that I think of it, I've often seen dwarfs move diagonally in open areas. A* with the Manhattan heuristic should have dwarves move in straight angles a lot. Unless ties are resolved by preferring diagonal movement.

Actually I think you've got it backwards.  By using the Manhattan heuristic the pathfinder will prefer diagonal movement even more than it normally would, because a diagonal move reduces the heuristic distance by 2.  I can't think of any specific cases when that would lead to sub-optimal paths, though.  Generally it's always better to move diagonally unless you're already lined up with your goal.

Speaking of which, does it take more time for a dwarf to move diagonally?  Or are they equally fast in all 8 directions?
Logged

Great Cthulhu

  • Bay Watcher
  • Likes metal for its screaming guitars.
    • View Profile
Re: Framerate drops with large open production areas?
« Reply #16 on: October 01, 2008, 03:12:53 am »

You're totally right, of course.

I guess I need to shut up until I've played with the algorithm for a bit. Sleeping for a solid 8 hours might help too. ;)
Logged
Pages: 1 [2]