Hard Light Productions Forums

Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: General Battuta on June 20, 2014, 01:06:03 am

Title: My performance is ****.
Post by: General Battuta on June 20, 2014, 01:06:03 am
Is anyone else experiencing jumps between a steady 60, a steady 30, and massively uneven framerates? Sometimes this occurs in combat, sometimes just spinning around and looking at different ships.

It's particularly obnoxious because it doesn't seem to track very well with scene complexity. I can get a smooth 60 in combat, then a smooth 30 staring at a frigate with some skybox in the background.

I will try to track down more details when time avails, just need to get this down and open the discussion.
Title: Re: My performance is ****.
Post by: The E on June 20, 2014, 01:37:04 am
That jumping between 60 and 30 sounds rather like a vsync thing.
Title: Re: My performance is ****.
Post by: General Battuta on June 20, 2014, 01:40:36 am
I also just loaded a mission with no soundtrack and the previous mission's soundtrack kicked in  :nervous:

e: On a second restart, the first two messages are now playing the audio of the first two messages from the last mission :wtf:. Clearly an unrelated issue, but fairly, er...

e2: Third restart, message audio is replaced by sounds of mass drivers/torpedoes firing. I am just going to keep restarting because this is great.

e3: Wowww this is weird. June 16th Windows nightly.
Title: Re: My performance is ****.
Post by: General Battuta on June 20, 2014, 01:54:14 am
Separate from all the audio shenanigans, even with vsync off I am getting wild framerate peaks and crashes. During the closing frames of Artemis Station, before the fadeout, my framerate is zagging between 80 and 120 FPS every second or two.
Title: Re: My performance is ****.
Post by: AdmiralRalwood on June 20, 2014, 02:06:05 am
:wtf:

Debug log?
Title: Re: My performance is ****.
Post by: The E on June 20, 2014, 02:10:56 am
I'm not sure that's going to help.

What may help is looking at the output of the engine profiler to see if there's a subsystem that spikes in concert with those framerate jumps.
Title: Re: My performance is ****.
Post by: General Battuta on June 20, 2014, 02:15:48 am
Well here is the debug lol just in case (lol, lol): http://pastebin.com/Mhz5ZFbF
Title: Re: My performance is ****.
Post by: AdmiralRalwood on June 20, 2014, 02:29:53 am
Code: [Select]
SOUND: c:\code\fs2_open_0\code\sound\ds.cpp:1268 - OpenAL error = 'Invalid Operation'Have you tried OpenAL Soft?
Title: Re: My performance is ****.
Post by: General Battuta on June 20, 2014, 10:32:45 am
No change on either the framerate issue or the issue of all the spoken dialog being replaced by gun sounds.
Title: Re: My performance is ****.
Post by: AdmiralRalwood on June 20, 2014, 10:40:58 am
No change on either the framerate issue or the issue of all the spoken dialog being replaced by gun sounds.
Fresh debug log with OAL Soft?
Title: Re: My performance is ****.
Post by: General Battuta on June 20, 2014, 10:46:10 am
First, confirm that I installed it right. I put the Win64 soft_oal.dll into C:\Windows\SysWOW64
Title: Re: My performance is ****.
Post by: AdmiralRalwood on June 20, 2014, 10:47:49 am
Wrong on two counts; you want the Win32 version (FSO is 32-bit, but SysWOW64 is, in fact, where 32-bit .dll files go), and you want to name it OpenAL32.dll (rename or move your current Creative OpenAL32.dll so you can restore it if need be).

At least, that's how I'm doing it; a quick check of the debug log should tell you if FSO is loading OpenAL Soft.


EDIT: Do what chief says below (you still want the 32-bit version).
Title: Re: My performance is ****.
Post by: chief1983 on June 20, 2014, 10:48:57 am
Or name it OpenAL32.dll in your FS2 folder, if you only want this to affect FSO.  I think that's the other way it can work.
Title: Re: My performance is ****.
Post by: mjn.mixael on June 20, 2014, 10:51:24 am
Is OAL Soft really going to be the magic fixer upper to any and every reported sound issue? Unless battuta just installed some new hardware, I'm betting the real problem lies elsewhere... regardless of how OAL Soft affects the symptoms.

But if we are going to rely on OAL Soft to fix everything, then we should probably to stop pointing people to OAL at all and write a tutorial about OAL Soft's config file (which is what I had to tweak to minimize that awful sound stuttering issue.)

Man we need a real sound coder...
Title: Re: My performance is ****.
Post by: AdmiralRalwood on June 20, 2014, 10:52:57 am
Or name it OpenAL32.dll in your FS2 folder, if you only want this to affect FSO.  I think that's the other way it can work.
Right, I forgot the reason I put it in my SysWOW64 version was to test if it changed anything related to something else (which, AFAICR, it did not).
Title: Re: My performance is ****.
Post by: chief1983 on June 20, 2014, 10:58:40 am
I didn't know there was a config file.  Some more documentation for that as it applies to FSO would be useful indeed.
Title: Re: My performance is ****.
Post by: mjn.mixael on June 20, 2014, 11:05:51 am
alsoft.ini is the config file for OAL Soft. I had to scour the interwebz to find any detail about it and finally tweaked the settings that brought my sound stutter to a minimum. (still there, though.)

The OAL Soft thing is not exactly user friendly, which is why I'm not a big fan of it being the fix-all for sound issues given the kind of new users we seem to be getting from Steam. But.. here I am hijacking a thread. Sorry.
Title: Re: My performance is ****.
Post by: General Battuta on June 20, 2014, 11:24:47 am
No change on performance.

The game continues to substitute previously loaded audio in after hitting 'replay' on the mission (this is from in-game, the esc options menu). Seems like it must be a code issue. Can anyone repro? June 16th Windows.
Title: Re: My performance is ****.
Post by: StarSlayer on June 20, 2014, 11:24:54 am
Talk to your Doctor

(http://viagraclub.com/wp-content/uploads/2013/09/viagra4.jpg)
Title: Re: My performance is ****.
Post by: AdmiralRalwood on June 20, 2014, 11:27:00 am
The game continues to substitute previously loaded audio in after hitting 'replay' on the mission (this is from in-game, the esc options menu). Seems like it must be a code issue. Can anyone repro? June 16th Windows.
I already tried to reproduce this with that exact nightly when you first mentioned which one you were using and failed. Does it happen in every mission?
Title: Re: My performance is ****.
Post by: Kolgena on June 20, 2014, 01:59:41 pm
I've said this before, but I also get massive slowdown whenever flak is exploding, but it only seems to happen 80% of the time. IIRC it's independent of display resolution (still happens on 1024x768 vs 1080p) so it's probably CPU related. Otherwise my framerates are fine. Jumps between 60 and 30 does sound like vync though, because my jumps are between 65-90 and 15-45.

@Battuta: Did you ever try removing all mv_effects (or whereever sprites and scripts for particles are--it's in one VP I can't be bothered to double check right now) from Mediavps 2014 and seeing if you still get framedrops? Doing that completely eliminates the problem, but I'm obviously looking at retail flak and lasers instead (yay blobs)

(How are people getting OAL soft to work at all on windows 8.0 and wxlauncher? Am I the only one having troubles getting it to work by putting it in the system folder or in the fs2 directory?)
Title: Re: My performance is ****.
Post by: Kobrar44 on June 20, 2014, 02:33:24 pm
Separate from all the audio shenanigans, even with vsync off I am getting wild framerate peaks and crashes. During the closing frames of Artemis Station, before the fadeout, my framerate is zagging between 80 and 120 FPS every second or two.
Sounds kinda familiar. I once compiled a build with msvc 2010 and profiling code to track the lagspikes and I experienced none. Nightlies etc are still msvc 2008 IIRC. I do not possess the knowledge to determine how relevant this may be. I did not investigate further, waiting for move to msvc 2012 for nightlies to test again.
Title: Re: My performance is ****.
Post by: chief1983 on June 20, 2014, 03:19:18 pm
Battuta, if you need I can make a 2012 build for you.  Or 2013, whatever the latest I have on my PC is.  Then you can compare.  I plan on updating to a new compiler for nightlies after 3.7.2 anyway, for FreeBSD, Windows, and Linux.
Title: Re: My performance is ****.
Post by: Lykurgos88 on June 22, 2014, 04:44:49 am
My only slowdown comes from FS1 bombs (tsunami & harbinger) when they explode and when framebuffer explosions are enabled. The screen freezes for 0,2 seconds for every explosion. Strangely enough, FS2 bombs (cyclops and Helios) work perfectly with framebuffer explosions.
Title: Re: My performance is ****.
Post by: Kolgena on August 12, 2014, 02:27:05 am
Sorry for necro, but any updates on this? I was revisiting FSO with both the 3.7.2 RC3 and latest nightly (today), and neither build was playable for me. Any time that scripted effect (piercing impact explosions, presumably) where cluster flak spawns a ton of particles still drops my fps from 80 to 10. Turning off FXAA, smooth particles, framebuffer shockwaves, and/or enabling that ATI input lag flag thing do nothing.

If nothing else, I'd like to know if anyone is getting similar problems in big insane-difficulty (the only difficulty with uncapped AI fire rates) firefights.
Title: Re: My performance is ****.
Post by: ngld on August 13, 2014, 12:16:06 pm
If the compiler version is the problem, this nightly (https://build.tproxy.de/dl/fs2open-ngld/master-latest-windows.7z) might work. It's compiled with MSVC 2013.
Title: Re: My performance is ****.
Post by: Kolgena on August 15, 2014, 03:22:06 am
Sorry, that build doesn't fix it. For giggles I tried playing the game at 1366x768, but still no dice. I go from 120 fps (seems to be a hard cap even without vsync) to 12 fps in firefights.

 (Also, I've noticed with the last couple nightlies I've tried, the ATI black model bug in weapon/ship selection appears to be fixed, BUT briefing screen grid (the one where ship/wing icons appear) appears to be zoomed way in. The icons themselves aren't larger, but a lot of them aren't being drawn because they're way off the screen.
Title: Re: My performance is ****.
Post by: AdmiralRalwood on August 15, 2014, 08:48:51 am
briefing screen grid (the one where ship/wing icons appear) appears to be zoomed way in. The icons themselves aren't larger, but a lot of them aren't being drawn because they're way off the screen.
This is actually the result of this bug (http://scp.indiegames.us/mantis/view.php?id=3016) being fixed. You may want to look at this game_settings.tbl setting (http://www.hard-light.net/wiki/index.php/Game_settings.tbl#.24Briefing_Window_FOV:).

I go from 120 fps (seems to be a hard cap even without vsync) to 12 fps in firefights.
Did you use both -no_vsync and -no_fps_capping?
Title: Re: My performance is ****.
Post by: niffiwan on August 15, 2014, 07:36:46 pm
It's a longshot, but have you tried "Disable Lightshafts"? And was there an old version of FSO that doesn't have the problem?

(I feel like I've had a similar problem with the APE gun explosions from The Antagonist, but only that gun in that mod, and I haven't found a solution yet.  I'm using an nVidia card as well, so it may be completely unrelated)
Title: Re: My performance is ****.
Post by: Cyborg17 on August 15, 2014, 08:10:23 pm
Shot in the dark here, but could this be collision code related?  I know you said the slowdown usually happens with flak, but you never know.  Does the slowdown happen outside firefights when there are lots of asteroids in mission?

I think there's a launcher flag to use the old system in the troubleshooting section.
Title: Re: My performance is ****.
Post by: Kolgena on August 16, 2014, 04:53:32 pm
Good question. I went and tried with the old collision code, but I still get flak slowdowns. Asteroids (like those nav buoey missions in Derelict) can drop my framerates to the 50s, but that's always steady fps and totally fine. The symptom I describe is more like frame drops, wherein your screen freezes for a few hundred milliseconds and stutters like mad before going back instantaneously to reasonably fluid, before dropping to zero again momentarily when the next round of flak explodes.

briefing screen grid (the one where ship/wing icons appear) appears to be zoomed way in. The icons themselves aren't larger, but a lot of them aren't being drawn because they're way off the screen.
This is actually the result of this bug (http://scp.indiegames.us/mantis/view.php?id=3016) being fixed. You may want to look at this game_settings.tbl setting (http://www.hard-light.net/wiki/index.php/Game_settings.tbl#.24Briefing_Window_FOV:).

I go from 120 fps (seems to be a hard cap even without vsync) to 12 fps in firefights.
Did you use both -no_vsync and -no_fps_capping?

Thanks for the tip about briefing icons. I haven't checked retail briefings (which I presume are now fixed), but mods assuming old behavior (such as BP) have broken briefings as a result. They'll probably need to roll out a patch at some point to address this.

I didn't use -no_fps_capping. Either way, as long as vsync isn't on, I shouldn't expect framerate stepping of 60/30/20/15/12/10 etc etc.


It's a longshot, but have you tried "Disable Lightshafts"? And was there an old version of FSO that doesn't have the problem?

(I feel like I've had a similar problem with the APE gun explosions from The Antagonist, but only that gun in that mod, and I haven't found a solution yet.  I'm using an nVidia card as well, so it may be completely unrelated)

I have disabled lightshafts and still see the problem. (Conversely, I never play with them on, so don't know if the bug would disappear if I turned them on...)

I use an ATI card (8870m) paired to an i7 3635QM. It's been a long time since I've played FSO, but I remember my old laptop didn't have the stuttering problem before I got rid of it a year ago. That used to run an ATI 3650 mobility which could actually float decent framerates at 1366x768 in firefights.

I take it essentially no one else is experiencing these sorts of framedrops?

(As an aside, I just realized that my device manager thinks that my 8870m is an r9 m270x despite being on CCC 14.4 official. I wonder if that might be causing all this, lol. I'll hunt for different graphics drivers and see what's up)
Title: Re: My performance is ****.
Post by: AdmiralRalwood on August 16, 2014, 06:37:17 pm
I take it essentially no one else is experiencing these sorts of framedrops?
Obviously other people experience poor performance, but I'm not one of them, so I can only throw out random ideas and see what happens.

Speaking of, and just out of curiosity, does anything happen if you remove -no_vsync?
Title: Re: My performance is ****.
Post by: Kolgena on August 16, 2014, 10:01:41 pm
If I turn vsync back on, the performance doesn't get better. During firefights my max gets capped to 30 (interestingly), and my frame drops still push me into the 15-12 fps range. Overall, however, it does feel a bit smoother because the variance is much less between 30-12 and 60-12. Unfortunately, I can't stand vsync input lag.
Title: Re: My performance is ****.
Post by: Pacman110 on August 31, 2014, 12:35:47 pm
If you are running an nvidia GPU, here is what you can do to eliminate your framerate drops: (worked for me)
Go to your nvidia control panel and change the energy saving mode (found in 3d settings) to prefer maximum performance.
I hope this helps some nvidia users out there, maybe there is an amd equivalent for that specific setting as well.
Title: Re: My performance is ****.
Post by: Kolgena on October 28, 2014, 06:18:55 pm
So... on a whim I decided to use the no sound command flag. My frame drops disappeared.

wtf?

K, so details:

Running the Razer 5.1 virtual surround sound driver. Turning it off doesn't make a difference to performance.
OpenAL soft might be running a tad worse than Creative OpenAL. Both run worse than sound disabled.
I've got some sort of Realtek laptop sound card.
Precaching mission sounds doesn't improve performance.
Forcing 2D sound doesn't improve performance.
Worst freezes still happen when cluster flak explodes all at once.
Title: Re: My performance is ****.
Post by: chief1983 on October 29, 2014, 10:39:59 am
What version of OpenAL Soft/Creative OpenAL are you running?  There was a recent Soft release, as well as a Creative OpenAL 2.1.0.0 that is available from some DL sites which might be an improvement over the one on their website.  It was bundled with a sound card but never officially released for download.
Title: Re: My performance is ****.
Post by: Kolgena on October 30, 2014, 12:07:19 am
I used Openal soft 1.16.0.
I haven't tried (or heard of until now) 2.1, but I'll give it a shot and see what happens.
One some OEM drivers for a realtek card that I'd really really prefer not to upgrade. They come with speaker sound cancellation for the mic, which is pretty useful and seems to break if I use any other version of driver.
Title: Re: My performance is ****.
Post by: Grizzly on November 09, 2014, 09:57:56 am
I had poor performance as well. For some reason it happened when looking at Nebulae.

I am aware this doesn't make any sense.