Posts: 20
|
Post by emoose on May 22, 2022 3:51:31 GMT 10
Hi all, so I started looking into the issue with HD Project causing framerate to drop to ~30FPS when Saddler cutscene was playing, this led me down a rabbit hole of writing optimized replacements for the games math functions, learning about SSE intrinsics to optimize them even further, installing VS2010 so I could compare my new code with the original compiler they used... The end result is that I've got all the games math functions running about twice as fast , the square-root function they use was also made maybe 5x faster too, which is what ended up fixing the Saddler cutscene issue. I don't know if this might cause issues anywhere else though, or even if it helps that much outside of the problematic Saddler cutscene (it was a pretty unique issue with a bunch of tight loops causing a huge CPU bottleneck, don't know if that is likely to happen anywhere else in the game) The optimized code also has very slightly less precision compared to the games original x87 code, no idea if that might actually affect anything though, but I'd really appreciate if anyone could help test these changes! If you've used any mods that caused slowdown in the game this might also help with those too, the games animation/cloth/weights related code made heavy use of these math functions, so hopefully it might help a lot there. A build with these changes can be found at re4_tweaks github, there's more info there about the Saddler cutscene issue for anyone interested too. (it might be caused by some invalid cloth data in HD Project, but this performance increase seems to fix it, so eh)
|
|
✫Advanced Coder✫
gridning hard working on a fan game - Resident Evil Remix
Posts: 2,991
|
Post by Mr.Curious on May 22, 2022 6:55:20 GMT 10
Can I use my old config with this, or are there new parameters in the .ini that affect the math stuff?
EDIT - I'd love to test this, but my game crashes instantly and wont load. I assumed it had something to do with Raz0r's dll, but after removing his DLL, the issue persists. Game simply wont load. (I tried it with the vanilla patched 1.06 bio4.exe)
CHeers
|
|
Posts: 20
|
Post by emoose on May 22, 2022 7:51:01 GMT 10
Can I use my old config with this, or are there new parameters in the .ini that affect the math stuff? EDIT - I'd love to test this, but my game crashes instantly and wont load. I assumed it had something to do with Raz0r's dll, but after removing his DLL, the issue persists. Game simply wont load. (I tried it with the vanilla patched 1.06 bio4.exe) CHeers Huh strange, seems to work fine on my vanilla 1.06 copy, but this is why I need testers heh The included INI does add two new options to [FRAME RATE] section, are you using that? Could you try toggling those two EnableFastMath / EnableReimplementedCloth settings and see which one is causing it? If you can get a crash dump like github.com/nipkownix/re4_tweaks/issues/new?assignees=&labels=bug&template=bug_report.yaml explains that should be helpful as well. E: ohh I might know what it is, I had the build set for AVX512 mode, which almost no CPUs besides servers actually have, sorry about that! Will upload a new build in a minute. E2: new build at github.com/nipkownix/re4_tweaks/pull/192#issuecomment-1132472849, hopefully will have better luck with that one.
|
|
|
Post by qingsheng on May 23, 2022 12:53:56 GMT 10
When a stage spawning is many enemies, the game speed is slow. Is there a solution?
|
|
Posts: 20
|
Post by emoose on May 23, 2022 21:02:01 GMT 10
When a stage spawning is many enemies, the game speed is slow. Is there a solution? Did you test with the FastMath DLL? If that didn't work, I guess maybe issue could either be something to do with memory allocations, or the code that first loads in data for the enemy. If you have mod files I can test with I could try finding where the performance is bad, got a good method for finding that.
|
|
Posts: 20
|
Post by emoose on May 25, 2022 19:58:17 GMT 10
|
|
|
Post by qingsheng on May 26, 2022 2:07:07 GMT 10
Great work
|
|