News:

Welcome to the new Sinister Design forums!

Main Menu

Heavy slowdown still present in some large battles (particle bug?)

Started by Zetor, September 28, 2015, 12:19:10 PM

Previous topic - Next topic

Zetor

It seems the 'slowdown problem' is back in some form... I've noticed it in quite a few late-game battles. Basically after a certain point in the battle when *something* happens (doesn't have to be late-combat, I had it happen as soon as the third turn), the game significantly slows down and starts to eat 25% CPU -- so basically 100% assuming it's only using one core. I attached an animated gif to illustrate from an endgame battle... though now that I reviewed it, the gif actually seems to be significantly faster than the ingame speed (the mindblast counter was pretty much a frame-by-frame slow motion experience).
http://gfycat.com/ChillyMistyIraniangroundjay (spoilers inside, btw)

The most significant symptom that I can notice are leftover particles; f'rex, note the poison splash in the water, as well as the 'attack sparklies' around it. I forgot to generate a log -- sorry! I have a log from earlier in the battle, but I don't think the slowdown was noticeable back then.

Using latest steam version, Windows 10, etc etc.

CraigStern

Quote from: Zetor on September 28, 2015, 12:19:10 PMThe most significant symptom that I can notice are leftover particles

Oh! That certainly shouldn't be happening; I'll look into that.

CraigStern

Okay! I believe I've fixed the issue. I'll be pushing it with the version 1.049 update. :)

Zetor

Definitely seems to be better in 1.049, thanks! Unfortunately the bug reared its ugly head again when I got near the end of the "mines entrance" battle. While fighting some of the reinforcements (not sure if it was a killing blow or not), the 'combat sparklies' decided to stick around, and the game slowed down a lot after that. I attached two screenshots showing the offending particles at the center-left of the screen... also, this time I captured a log a short while after I first noticed the slowdown in case it contains anything useful.

CraigStern

Huh--that's odd. So, the relevant lines are 627 and 914. clearEmitters() is the function responsible for getting rid of any left-over particle fountain emitters remaining at the beginning of each turn. That's odd that it kept counting 0 emitters in the renderer even while it was still clearing them out of the emitters array, but there were none left in emitters by line 914, so it at least seems like it was working? I'm going to need to do some tests on this one.

If you notice this happening again, do me a favor and let me know if you saw anything immediately preceding the particles sticking around.

Jeth

I have updated to patch 1.051, but I registered just to let you know that the problem of the game slowing far too much still persists. I just finished the battle before the mines entrance and by the end I was really watching it in super-slow motion.

Next time I will try and keep the logs (just now found out how to generate them) and post them here, but it has been a problem in all the long battles and in previous patches as well. Once the battle finishes though and the next one starts, the problem vanishes till the next battle progresses into 40-50 minutes ... maybe a memory leak or a function that is supposed to empty memory, but does not work correctly .?.

bugfartboy

Quote from: Jeth on October 25, 2015, 12:48:02 PM
... maybe a memory leak or a function that is supposed to empty memory, but does not work correctly .?.
Actually, most of it is an issue with Flash itself.  From what it sounds like the only option option left would be to recreate the game in a language without the issue.