JACoders / OpenJK

Community effort to maintain and improve Jedi Academy (SP & MP) + Jedi Outcast (SP only) released by Raven Software
GNU General Public License v2.0
2.03k stars 614 forks source link

Sparks from saber slows fps hard while hit #614

Closed sudge closed 9 years ago

sudge commented 9 years ago

Operating System: Windows 7, Windows 8.1 (expecting the same problem on any *linux)

SP/MP: MP, probably same with SP

What the problem is: Sparks from saber while hit opponent/npc body slows fps hard, about 70% down or something like that. For example if it is usually 125 fps, it was slow down to ~40-60 while sparks on the screen. Tested on core2quad q8200 + gf9600gt and laptop celeron b830+intelHD. There is no the same problem in original JKA, I mean fps slows,but about 5-10% maybe (compairing with ~50-100% on openjk), no more. Demo is available (t3home2 map needed): https://www.dropbox.com/s/3shxwq4osvkm16y/demo2015-01-25_13-35-28.dm_26?dl=0 Video is also available: https://www.dropbox.com/s/m7lwlvho5xunmh9/openjk%202015-01-25%2013-36-44-47.mkv?dl=0 It is well seen on the video how fps slows hard.

What I expected to happen: Almost no fps slows with saving some visual effect, but not that much as it IS now.

Razish commented 9 years ago

It's either due to the FX allocator changes, or you're running a debug build.

ensiform commented 9 years ago

More than likely MP only because the fx allocator changes are only in MP.

sudge commented 9 years ago

Is this http://builds.openjk.org/ the debug builds?

ensiform commented 9 years ago

No those are always release.

xycaleth commented 9 years ago

I seem to be able to reproduce the problem on my PC so I'll take a look at what's happening.

Razish commented 9 years ago

Also, make sure you have sv_fps 20 if you're using SP damages to test

sudge commented 9 years ago

It seems depends on sv_fps, right. You said about 20, but it is 40 by default, and also 20 is quite old. I set sv_fps to 125 and it slows fps harder than by default, yes, and it's almost no slows with sv_fps 10. But the thing that I notice: higher sv_fps gives you much better hitboxes on the player/npc body. So it was perfect hitboxes (and very high damage, even overpowered I would say, but who knows) with sv_fps equal to fps count of client by default - 125, and it was almost no hitboxes with sv_fps 10. Isn't this a thing for more attention? Better hitboxes it is straight gameplay quality. //using always release version, not a debug btw

xycaleth commented 9 years ago

I ran the demo in retail JA and didn't experience any FPS drops so it must be something to do with the EFX allocator I wrote and/or something related to that.

Razish commented 9 years ago

It seems depends on sv_fps, right. You said about 20, but it is 40 by default

40 is only default in OpenJK. If you were used to 20, that would explain why you're noticing a difference in FPS now. But Xycaleth already confirmed there is a separate issue in OpenJK.

As a side note, sv_fps 40 or 50 are probably the highest you'll need to go to remove hitbox inconsistencies. Avoid using anything that isn't 1, 2, 5, 10, 20, 25, 40, 50, 100, 125, 250, 500, 1000

ensiform commented 9 years ago

sv_fps doesn't seem to have that much effect on it. Still gets pretty low with sv_fps 20.

xycaleth commented 9 years ago

A preliminary look into this problem shows that the saber efx don't use the efx allocator at all, so that isn't the issue. I've tested using the retail cgame dll as well, and I still experience the FPS drop there so that rules out any changes made to cgame in OpenJK. Not sure where else to look except in the engine itself now...

xycaleth commented 9 years ago

Was a simple fix in the end =] I'd accidentally caused all physics-affected EFX particles to use expensive physics a while back when I was removing RMG code. Adding back in the check to see if the EFX really does want to use expensive physics fixes the problem, so you get solid FPS again :)