Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Marksdwarves, constant patrol, and FPS  (Read 1055 times)

VerdantSF

  • Bay Watcher
    • View Profile
Marksdwarves, constant patrol, and FPS
« on: May 23, 2013, 02:56:31 pm »

I plan to eventually draft all weak, but agile dwarves into marksdwarf squads (strong & agile dwarves are reserved for melee).  Right now, I've got 6 constantly patrolling the wall between two archery towers to take advantage of Psieye's auto-reloading strategy

It's worked like a charm, but I'm wondering if I should be worried about the longterm FPS ramifications.  At 6 troops and 4 on duty at any given time, the number is too small for it to make any noticeable impact on FPS.  However, I plan to have 30+ marksdwarves patrolling the perimeter one day.  Their paths are all along a 1-tile wide path, bounded by fortifications, so I assume the calculations are straightforward and not FPS-intensive.  Anyone with large numbers of troops on perpetual patrol, please share some insight on the FPS impact.  Thanks in advance!
« Last Edit: May 23, 2013, 02:58:05 pm by VerdantSF »
Logged

DethBrand

  • Bay Watcher
    • View Profile
Re: Marksdwarves, constant patrol, and FPS
« Reply #1 on: May 23, 2013, 06:46:47 pm »

Never gotten that many going at once normally only about 16 on patrol if I'm lucky enough to keep a fort long enough, but by the time I have that many I'd never be able to tell how it impacts FPS because of all the other dwarves lagging the hell outta my machine. =(
Logged

ChuckWeiss

  • Bay Watcher
    • View Profile
Re: Marksdwarves, constant patrol, and FPS
« Reply #2 on: May 23, 2013, 07:49:57 pm »

Be careful with that. Dwarves on patrol have a tendency to pick a destination that's within a certain range of the patrol node (a square about 7 tiles wide centered on the node I think, it's been a while though) and path to there instead of the node itself. If you have a 3 by 3 room for them to stand in, they may pick a spot that's outside the room. Which could be the top of the mountain outside; which means they need to path through the entire fortress, then up the mountain.

Just make sure they don't have any wiggle room.
Logged
When he dies for the Mountain, the Mountain will weep not tears, but Blood for the Blood God!

VerdantSF

  • Bay Watcher
    • View Profile
Re: Marksdwarves, constant patrol, and FPS
« Reply #3 on: May 23, 2013, 08:02:32 pm »

Yeah, that was such a headache >:(!  At first, they were patrolling outside of the walls, instead of on top.  I then made my archery towers 2 stories high, with the patrol end points at the top of each.  Now the top of the fortified wall is the closest connecting path no matter what, so they go exactly where I want them to :D.

ORCACommander

  • Bay Watcher
  • [ETHIC:TORTURE_ELVES: PERSONAL_MATTER]
    • View Profile
Re: Marksdwarves, constant patrol, and FPS
« Reply #4 on: May 23, 2013, 08:28:55 pm »

i remember hearing that DF uses a modified A* pathing algorithm. you can play with it here: http://qiao.github.io/PathFinding.js/visual/

bear in mind that it is slowed down to allow you to perceive progress
Logged