Bay 12 Games Forum

Please login or register.

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

Author Topic: Why so CPU intensive?  (Read 1697 times)

ShunterAlhena

  • Bay Watcher
    • View Profile
Re: Why so CPU intensive?
« Reply #30 on: June 11, 2008, 10:10:00 am »

quote:
Originally posted by Schmoe:
<STRONG>The pathfinding CPU burden could probably be considerably lessened if he used Djikstra's algorithm for finding generic resources (ie, picking up any stone to use in a task) instead of A*.  Doing so would also prevent dwarves from walking all the way around the fortress to pick up a stone directly below the workshop 3 z-levels below, when there is a stone just 4 tiles away.  It would probably only help, though, for resources that are ubiquitous.  Maybe just stone.</STRONG>

Using Dijkstra algorithm wouldn't improve anything a bit, since A* is a special case of Dijkstra. So in a sense we already are using Dijsktra, only a souped-up version of it.

Logged
fox has become enraged!

The13thRonin

  • Bay Watcher
  • Profession: Handsome Rogue
    • View Profile
Re: Why so CPU intensive?
« Reply #31 on: June 11, 2008, 10:19:00 am »

Obviously *A (whatever that is) doesn't factor in for fire imps or rampant elephants at this stage eh?
Logged
I'm Digging Deeper... AGAIN... You Should Too!

Dig Deeper DIAMOND - 750+ items of new content including; new plants, new creatures, new metals, new woods, new gems, new stones, new crafts and much, much more.
Pages: 1 2 [3]