Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: [40d16] Massive lag when soldiers head to the barracks to spar  (Read 600 times)

Derakon

  • Bay Watcher
    • View Profile
[40d16] Massive lag when soldiers head to the barracks to spar
« on: November 11, 2009, 12:25:15 pm »

My fortress is on a 3x3 embark zone, and I've walled off the entire perimeter as close as I can get to the edge. Every once in a while I send out patrols around the outside to flush out any ambushes (well, I say patrols, but basically I'm just stationing the dwarves on the opposite side of the map from my front gate). Once they're done, I release them by taking them off active duty, at which point typically they decide to either go hang out or spar in the barracks. If they do choose to spar in the barracks, I get massive lag -- going from 40FPS to 14! I can easily verify that it's the sparring that does it, by putting the soldiers who wanted to spar back on duty and stationing them in the barracks. My FPS shoots right up.

In the situations I've noticed this lag, the soldiers wanting to spar were right next to each other on the patrol. I don't know if that's relevant though.
Logged
Jetblade - an open-source Metroid/Castlevania game with procedurally-generated levels

Helmaroc

  • Bay Watcher
    • View Profile
Re: [40d16] Massive lag when soldiers head to the barracks to spar
« Reply #1 on: January 16, 2010, 09:22:10 pm »

I have the same problem. It started for me when my army became 15+ dwarves. I think it's simply the group path-finding all at once.
Logged

Derakon

  • Bay Watcher
    • View Profile
Re: [40d16] Massive lag when soldiers head to the barracks to spar
« Reply #2 on: January 17, 2010, 03:05:03 pm »

I suspect the soldiers are repeatedly spamming the pathfinding algorithm; if I recall correctly, I could see their icons flashing the '?' symbol that, as I understand it, indicates they're figuring out where to go. If they just did pathfinding once, then this wouldn't be as noticeable; my FPS would drop for a couple of seconds and then I'd be fine.
Logged
Jetblade - an open-source Metroid/Castlevania game with procedurally-generated levels

jfs

  • Bay Watcher
    • View Profile
Re: [40d16] Massive lag when soldiers head to the barracks to spar
« Reply #3 on: January 19, 2010, 05:29:09 am »

How large is your barracks? Maybe try increasing the floor space.
Logged