Bay 12 Games Forum

Please login or register.

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

Author Topic: [38c]Leaving traders kill framerate  (Read 1079 times)

Slartibartfast

  • Bay Watcher
  • Menaces with spikes of Tin
    • View Profile
[38c]Leaving traders kill framerate
« on: May 21, 2008, 11:44:00 am »

Here's how it happened:
1) I start constructing a trade depot
2) Traders arrive (the first dwarven caravan)
3) Wagons bypass my inaccessible site
4) Trade discussion takes place
5) Traders leave (trade depot still not built)
6) GAME SLOWS TO A SCREECHING HALT.

Basically, the second I got the message that the traders are leaving my FPS dropped from 100 (the cap) to 30, making this game unplayable to me.

I've got one save at the very beginning (the autosave at the start) and a save from a few seconds after the slowdown, I can upload both if asked to, though 40 megs will take some time.

I'm pretty sure this bug was around at least from 38a, because I remember another fortress slowing down dramatically for reasons then unknown.

*searches forum*
Apparently, there are already a couple of threads on this: http://www.bay12games.com/cgi-local/ultimatebb.cgi?ubb=get_topic&f=6&t=003534  http://www.bay12games.com/cgi-local/ultimatebb.cgi?ubb=get_topic&f=6&t=003487

But perhaps in this thread we can find out what common circumstances may cause the bug (like trade depot being unbuilt*) and maybe find more useful saves?
*-I'm guessing that the fact the trade depot wasn't built only contributed to the fact that the slowdown was immediate rather than caused it.

Logged
But what do I know?
Everything I say should be taken with atleast 1 tsp. of salt, and another liter of Dwarven Wine is recommended.

"I thought it was the size of the others!" said Vanon. "I guess it was just standing further away!"

martinuzz

  • Bay Watcher
  • High dwarf
    • View Profile
Re: [38c]Leaving traders kill framerate
« Reply #1 on: May 21, 2008, 01:08:00 pm »

Could it not be that a quite large goblin ambush appeared on the map but has not been spotted yet? Combined with the pathfinding of the leaving merchants, this could create quite a lag.


And for me, all my fortresses with more than 100 dwarves, my FPS is also 25-35.
I think it is quite playable. Wouldn't want it any faster with so many dwarves and so much going on in the game.
I admit that at first I did had some difficulties with the population slowdown. But I got used to it rather quick.

[ May 21, 2008: Message edited by: martinuzz ]

Logged
Friendly and polite reminder for optimists: Hope is a finite resource

We can ­disagree and still love each other, ­unless your disagreement is rooted in my oppression and denial of my humanity and right to exist - James Baldwin

http://www.bay12forums.com/smf/index.php?topic=73719.msg1830479#msg1830479

martinuzz

  • Bay Watcher
  • High dwarf
    • View Profile
Re: [38c]Leaving traders kill framerate
« Reply #2 on: May 21, 2008, 01:15:00 pm »

Or maybe.. I just make something up.. But it could be the cause:

combination of goblin ambush and leaving merchants:
As far as I know, goblin ambushers move to the nearest target on the map.

First, merchant 1 is the closest target. But he is moving toward the edge of the map (quite fast, I believe). So at some point, merchant 2 becomes the goblin's next target.

Pathfinding for the entire ambush is redone.

This repeats until all merchants have left the map (with their mules and guards and all), or a kitten becomes the closest target. Pathfinding is redone and redone and redone, causing the lag.


It's just a hypothesis.

Logged
Friendly and polite reminder for optimists: Hope is a finite resource

We can ­disagree and still love each other, ­unless your disagreement is rooted in my oppression and denial of my humanity and right to exist - James Baldwin

http://www.bay12forums.com/smf/index.php?topic=73719.msg1830479#msg1830479

Slartibartfast

  • Bay Watcher
  • Menaces with spikes of Tin
    • View Profile
Re: [38c]Leaving traders kill framerate
« Reply #3 on: May 21, 2008, 02:04:00 pm »

If that was the case than the lag would have disappeared as soon as the traders left the map, but it doesn't stop. (In fact, in my case the lag happened at the same time the traders left the map, since they were already on the border and so they disappeared almost instantly.)

Though of course, it is possible that maybe a goblin ambush decided to target the traders, and when the traders left they didn't change their target, and so that goblin ambush is locked on to a target that doesn't exist which causes trouble. But I don't think that's likely because I've had a similar problem in a previous fortress and the problem lasted for much much longer than any ambush could have stayed. (And of course, many ambushes were slain since the bug started. [it was a more developed fortress and the lag was slightly weaker, so I endured with the lag for a while])

EDIT: Just to clarify, "similar" in "similar problem" means I'm pretty sure it's the same bug, but it might not be, since it's an older fort and I don't remember exactly when it slowed down.

[ May 21, 2008: Message edited by: Slartibartfast ]

Logged
But what do I know?
Everything I say should be taken with atleast 1 tsp. of salt, and another liter of Dwarven Wine is recommended.

"I thought it was the size of the others!" said Vanon. "I guess it was just standing further away!"

RC

  • Bay Watcher
    • View Profile
Re: [38c]Leaving traders kill framerate
« Reply #4 on: May 21, 2008, 04:04:00 pm »

I have the same problem, but I dont think its been happening in all my maps.

I have INVADERS set to NO in the init.txt

Logged

Block

  • Bay Watcher
  • I see you...
    • View Profile
    • http://In progress
Re: [38c]Leaving traders kill framerate
« Reply #5 on: May 22, 2008, 11:13:00 am »

I have the same problem. It's not caused by invaders since I've played on this fortress for five years and every time the traders get to edge of the map when they're leaving my fps drops from about 50 to about 7. I've had lots of invaders during that time and they don't make any kind of difference. Also having a depot or not doesn't make a difference. It's just the traders leaving the map. After they're gone the game slowly picks up the speed again. I also have a save where the traders have just said that they're packing up and are going for the edge of the map. I can upload that somewhere if needed.
Logged
Now with 15% more blockiness!

BlckKnght

  • Bay Watcher
    • View Profile
Re: [38c]Leaving traders kill framerate
« Reply #6 on: May 22, 2008, 06:00:00 pm »

Could the Traders hitting the edge of the map trigger a sudden increase of of new jobs related to the hauling the goods at the depot to various stockpiles?
Logged

Block

  • Bay Watcher
  • I see you...
    • View Profile
    • http://In progress
Re: [38c]Leaving traders kill framerate
« Reply #7 on: May 23, 2008, 05:44:00 am »

quote:
Originally posted by BlckKnght:
<STRONG>Could the Traders hitting the edge of the map trigger a sudden increase of of new jobs related to the hauling the goods at the depot to various stockpiles?</STRONG>

Nope. I had a time I only bought a couple of plants (elves only bring like a few plants, enormous amounts of clothes,some wood, and no animals for some odd reason) and it still lagged when the traders left the map. Besides it doesn't lag when they leave the depot, it just lags when they leave the map.
Logged
Now with 15% more blockiness!

Brent Not Broken

  • Bay Watcher
    • View Profile
Re: [38c]Leaving traders kill framerate
« Reply #8 on: May 23, 2008, 06:40:00 am »

I've been having a similar FPS drop, and I can confirm that it isn't usually ambush-related. (Unless the ambushers have been sneaking around, then leaving without announcing themselves or killing anything other than my FPS.) In a fort of about 90 dwarves, I get a FPS plummet from about 85-95 to 5-15, each time traders pack up and leave.

The good news is that it always comes back, not long after the traders leave the map. So when my dwarves slow to a crawl, I go make a sandwich and let them work through it. With luck, I come back to find FPS problems are resolved, and the game is paused anyway because somebody struck microcline.

Logged

Wiles

  • Bay Watcher
    • View Profile
Re: [38c]Leaving traders kill framerate
« Reply #9 on: May 27, 2008, 06:49:00 pm »

I also have this problem. When the traders leave my fps plummets, even if I don't get any ambushers.
Logged

James85

  • Escaped Lunatic
    • View Profile
Re: [38c]Leaving traders kill framerate
« Reply #10 on: June 02, 2008, 10:59:00 pm »

Hey there.. been playing this cool game for a few days now and this 'leaving traders' bug popped up out of nowhere bringing my frame rate down to 8-15fps. I tried all the max framerate tips and looked over everything in this thread but nothing worked.

I managed to fix my issue though! Its a really odd region I'm on with a grassy area enclosed by mountain but touching the edge of the map. I had built a channel across this edge to prevent anything from jumping into my paradise from off the screen unexpectedly. It was still in the first year, I had 7 dwarfs. I built no trading depot and the traders came, bypassed, and left.. dunno where they were but after leaving the framerate died. Anyways I built a floor tile on the channel that was blocking the path to the edge of the map. Once that was built the fps jumped back to 100.

So this is some pathing issue relating to the traders. Try opening up areas you might have blocked off, or maybe it had to do with the channel being at the extreme edge. Hope this helps..

Logged

martinuzz

  • Bay Watcher
  • High dwarf
    • View Profile
Re: [38c]Leaving traders kill framerate
« Reply #11 on: June 03, 2008, 02:56:00 am »

I never encountered the trader lag. It might be a coïncidence, but I (almost) never play on maps with cliffs. I always pick the flat lands.
Maybe 'cause I'm Dutch, dunno.
Logged
Friendly and polite reminder for optimists: Hope is a finite resource

We can ­disagree and still love each other, ­unless your disagreement is rooted in my oppression and denial of my humanity and right to exist - James Baldwin

http://www.bay12forums.com/smf/index.php?topic=73719.msg1830479#msg1830479

ein Syndication

  • Bay Watcher
    • View Profile
Re: [38c]Leaving traders kill framerate
« Reply #12 on: June 03, 2008, 06:42:00 pm »

Cliffs shouldn't be a factor, I get this as well on my current 3x3 fort that is 95% on one z-level. 110-130 FPS normally, when traders leave it's about 25 to 35. I always just figured it was a weird pathing issue left over after the traders leave, like suddenly they decide they wanted to pick up something extra or something.
Logged

martinuzz

  • Bay Watcher
  • High dwarf
    • View Profile
Re: [38c]Leaving traders kill framerate
« Reply #13 on: June 03, 2008, 07:33:00 pm »

Hmm. Maybe I'm just lucky then..
I do experience a barely significant drop in FPS when traders arrive and leave but that is normal. More units on the map = less FPS.
For now, I'm in the dark here. Anyways, we have already eliminated 2 possible causes. I'll try and think up some more hypotheses for you to disprove. Hope we can help Toady One find the cause of this bug for I can imagine it being very annoying.
Logged
Friendly and polite reminder for optimists: Hope is a finite resource

We can ­disagree and still love each other, ­unless your disagreement is rooted in my oppression and denial of my humanity and right to exist - James Baldwin

http://www.bay12forums.com/smf/index.php?topic=73719.msg1830479#msg1830479

awdball

  • Bay Watcher
    • View Profile
Re: [38c]Leaving traders kill framerate
« Reply #14 on: June 04, 2008, 06:16:00 pm »

The only time I've had that sort of frame rate drop was when a dwarf had a job to do something they couldn't path to. Such as cage an animal that was innacessible due to locked doors or raised drawbridges. I can imagine the same thing happening if  you managed to give an order to dump an item the merchants were carrying, or an order to pit/cage/chain  a critter the merchants had. I'll try to remember to test this theory when I get home... <grin>

AWDBall.

Logged
Pages: [1] 2