d2dx icon indicating copy to clipboard operation
d2dx copied to clipboard

Fps drop after 20-30 mins of play

Open skylight102 opened this issue 2 years ago • 28 comments

Hi, I’m using plugy and pd2 on season 4 with d2dx, and everything works great for the first 20 mins, and then the game seems to revert to 30 fps, and feels really jittery / choppy. I then restart the game and it works for 20 mins smooth as a whistle. I’m using windows 10 / and a 3080 card. I’ve tried all kinds of different configurations and it always ends with fps lag after 20 mins. It's like the background, effects, weather etc all continues running at 60fps, but the minions/AI and skill effects starts to run at 30fps. So I'm thinking this is something to do with predicted movements becoming out of sync. Is there anything else I could try? Is this a known problem with Pd2? Thanks so much, I’ll have to buy you a coffee.

skylight102 avatar Mar 26 '22 23:03 skylight102

Anyone, Please? I'd donate to someone who can help me fix this, thank you.

skylight102 avatar Mar 28 '22 10:03 skylight102

The project hasn't seen any updates for ~9 months or so, so I doubt there will be any quick fix soon, but I can only say that I've personally experienced similar issues. I don't think it's bound to any specific time of play though. Sometimes, the game runs perfectly smoothly for hours. Other times, everything just starts to suddenly slow down as if the animations were taking place in slow motion. One thing to note is that the external FPS counter that I use still shows the game running at high FPS, even though in reality it doesn't feel smooth at all.

Unfortunately, the only solution I've found to this particular issue is to restart the game.

Edit: This issue is likely a duplicate of https://github.com/bolrog/d2dx/issues/141 and https://github.com/bolrog/d2dx/issues/146 though 😉.

tomasz1986 avatar Mar 28 '22 10:03 tomasz1986

Doesn't look like they've received much activity and I wouldn't say this is subtle. On mine, you can really tell the difference all of sudden. The drop is 60 to 25 fps.

Is there some way to reload Diablo2/D2DX, without leaving a game?

skylight102 avatar Mar 29 '22 10:03 skylight102

Is there some way to reload Diablo2/D2DX, without leaving a game?

I've just experienced the problem today right after opening D2 from a minimised state after several hours. Unfortunately, I still don't think there is anything that can be done other than restarting the game. I've tried playing around with graphics settings, changing the resolution, etc., but nothing made any difference.

tomasz1986 avatar Apr 03 '22 12:04 tomasz1986

That’s a shame, I’ve also tried 100’s of things. :(

Currently testing season 3 to see if it still happens there, but don’t really want to start a new character.

For some reason, my season 4 character works, but can’t teleport 😆

On 3 Apr 2022, at 13:13, tomasz1986 @.***> wrote:



Is there some way to reload Diablo2/D2DX, without leaving a game?

I've just experienced the problem today having opened D2 after being in a minimised state for a long time. Unfortunately, I don't think there's a way to do anything other than restart the game. I've tried playing around with graphics settings, changing the resolution, etc., but nothing of that made any difference.

— Reply to this email directly, view it on GitHubhttps://github.com/bolrog/d2dx/issues/166#issuecomment-1086854132, or unsubscribehttps://github.com/notifications/unsubscribe-auth/APZRWP3CDVVBEL3F2JHRCZ3VDGDP7ANCNFSM5RX2XPOA. You are receiving this because you authored the thread.Message ID: @.***>

skylight102 avatar Apr 03 '22 13:04 skylight102

This happens when the game loses focus, such as when you alt-tab away and come back. Exiting the game to menu will return FPS, but going back into a game it will drop again. The only way to fix it is to completely close and reopen the game. I don't have this problem on my Windows machine, but I do have it when running D2DX over Wine on my Linux machine.

whipowill avatar Apr 20 '22 13:04 whipowill

Strangely i have this problem on windows : ( I love D2DX so much but sadly it is not the complete solution as described. There needs to be a way of resyncing diablo in-game, without having to relaunch it. Because sometimes I can be in a game for 2-3 hours...

skylight102 avatar May 01 '22 08:05 skylight102

Any saviour out there been able to figure out the cause to this? <3

skylight102 avatar May 11 '22 12:05 skylight102

This is a motion prediction issue. After an unspecific time of playing motion prediction gets turned off for whatever reasons. I played a lot of 1.09d lately and the issue there is a lot less severe. In 1.09d only the motion prediction for cast effects turns off after some time of playing everything else like movement is still smooth. Must be an issue in it's implementation which works better for 1.09d as for 1.13d as of now...

jaydee2k avatar Jun 01 '22 16:06 jaydee2k

As someone above told you, the problem is that the game loses focus after a period of time, I think it might be because there was a code on the original client that send, in reality spam a string, just to check if the game lost focus but the downside was that it made your CPU 0 to run as it maximum clock and consume like 35% of your total CPU power if you had a multicore threaded CPU...

Bolrog added a so called FPS fix but the side effect is this bug, I think reverting this code to its original state can fix the problem...

Marcelo20XX avatar Jul 23 '22 07:07 Marcelo20XX

That’s just speculation sadly, we need Bolrog to come back.

I have tried many of the older versions, and none of them fix the problem.

On 23 Jul 2022, at 08:45, Marcelo20XX @.***> wrote:



As someone above told you, the problem is that the game loses focus after a period of time, I think it might be because there was a code on the original client that send, in reality spam a string, just to check if the game lost focus but the downside was that it will make your CPU 0 to run as it maximum clock and consume like 35% of your total CPU power if you had a multicore threaded CPU...

Bolrog added a so called FPS fix but the side effect is this bug, I think reverting this code to its original state can fix the problem...

— Reply to this email directly, view it on GitHubhttps://github.com/bolrog/d2dx/issues/166#issuecomment-1193081060, or unsubscribehttps://github.com/notifications/unsubscribe-auth/APZRWP3KDCB5HL7TA5RDNMTVVOPKLANCNFSM5RX2XPOA. You are receiving this because you authored the thread.Message ID: @.***>

skylight102 avatar Jul 23 '22 08:07 skylight102

I think I found a solution, I tested it doing a full playthrough from Act I to Baal and haven't found the FPS drops...

For this test I used a 1.09d Bowazon build on Nightmare Difficulty, constantly tested with Multishot since that skill is the easiest to see if the missile is animating smoothly, also I kept an eye for any AI, special effect or weather lagging and didn't found a single instance until ending the game after killing Baal...

Total time of the playthrough was about 5 hours so I gave the game plenty of time to display any wrong behavior and as expected it didn't happen. This test was made on Windows 10 using an Asus Nvidia 1660 GTX Super on the client 1.09d LoD and with PlugY 11.02 installed...

So I will attach the fix for anyone to test it too, there is a png which explains the change I did to the D2Client.dll too inside the zip... D2 FPS hotfix 1.09d.zip

Marcelo20XX avatar Jul 24 '22 00:07 Marcelo20XX

Great work, but I was playing PD2. I found the bug too irritating to continue playing though.

Anyway this fix could be implemented on 1.13c?

Cheers for your efforts!

On 24 Jul 2022, at 01:33, Marcelo20XX @.***> wrote:



I think I found a solution, I tested it doing a full playthrough from Act I to Baal and haven't found the FPS drops...

For this test I used a 1.09d Bowazon build on Nightmare Difficulty, constantly tested with Multishot since that skill is the easiest to see if the missile is animating smoothly, also I gave an eye for any AI, special effect or weather lagging and didn't found a single instance until ending the game after killing Baal...

Total time of the playthrough was about 5 hours so I gave the game plenty of time to show any FPS drop and as expected it didn't happen. This test was made on Windows 10 using an Asus Nvidia 1660 GTX Super and with PlugY 11.02 installed...

So I will attach the fix for anyone to confirm the bug is fixed, there is a png which explains the change I did to the D2Client.dll too inside the zip.. D2 FPS hotfix 1.09d.ziphttps://github.com/bolrog/d2dx/files/9174885/D2.FPS.hotfix.1.09d.zip .

— Reply to this email directly, view it on GitHubhttps://github.com/bolrog/d2dx/issues/166#issuecomment-1193216704, or unsubscribehttps://github.com/notifications/unsubscribe-auth/APZRWPYR6KS5767OKBJGO6LVVSFNHANCNFSM5RX2XPOA. You are receiving this because you authored the thread.Message ID: @.***>

skylight102 avatar Jul 24 '22 07:07 skylight102

Never mind, run a test again and this time I played until Act III, I was about 4 hours by then, let my char idle for another 3 hours and continued to Act IV, was killing some random Knights and the bug triggered again, the AI and missiles just turned off its movement prediction and were updating at 25 FPS, sigh!

One thing to note though, when I did the first test I never alt tabbed or minimized the game, I played at fullscreen, not even used the volume keys as they are known to cause desyncs in Windows 10 due to the volume overlay creates an additional window. On the second test I used the volume control so maybe that's why the test failed I don't know, its very difficult on my end to test this bug since it appears after quite a long time...

Marcelo20XX avatar Jul 24 '22 07:07 Marcelo20XX

To be fair 3 hours isn’t bad, but I think in PD2, when you are doing maps and there’s a lot more AI, it reduces the time until problem occurs. For me it was always every 20-30 mins.

Bolrog, we need you!

On 24 Jul 2022, at 08:59, Marcelo20XX @.***> wrote:



Never mind, run a test again and this time I played until Act III, I was about 3 hours by then, let my char idle for another 3 hours and continued to Act IV, was killing some random Knights and the bug triggered again, the AI and missiles just turned off Movement Prediction and where updating at 25 FPS, sigh!

— Reply to this email directly, view it on GitHubhttps://github.com/bolrog/d2dx/issues/166#issuecomment-1193267657, or unsubscribehttps://github.com/notifications/unsubscribe-auth/APZRWP63QKO2K3C6QZYP55DVVTZWNANCNFSM5RX2XPOA. You are receiving this because you authored the thread.Message ID: @.***>

skylight102 avatar Jul 24 '22 09:07 skylight102

Just a quick tip for those, who experience the issue after having the game minimised for a long time. Once you decide to stop playing and minimise the game, you can suspend the game process, and then resume it later once you decide to play again. This way the game doesn't run in background when minimised, and as such, after resuming it still runs at the desired FPS for me.

There're multiple methods to do the whole suspend/resume operation, but the most basic is to use the built-in Resource Monitor. You can open it by typing resmon.exe in the Start Menu, then find Game.exe, right-click it and select "Suspend Process". There's also "Resume Process" in the very same menu, which you can use later to bring the game back to life.

tomasz1986 avatar Aug 04 '22 17:08 tomasz1986

Sadly the issue for me appears even if I am actively playing the game, fastest character to trigger this bug seems to be the sorceress as she creates a bunch of missiles and effects I am able to reproduce this bug in about 15 mins of playing...

Marcelo20XX avatar Aug 04 '22 18:08 Marcelo20XX

fastest character to trigger this bug seems to be the sorceress as she creates a bunch of missiles and effects I am able to reproduce this bug in about 15 mins of playing...

Another way to quickly reproduce it for me seems to go to Lut Gholein with summons (e.g. Necro or Druid) in a new game. I can immediately notice their movement being extremely choppy and jittery. However, the issue affects only the summons and not the main character, and it does seem to go away after some time once you go out of the city.

tomasz1986 avatar Aug 11 '22 06:08 tomasz1986

On the contrary, if you want to have a stutter free experience, play as any 1.09d melee build i.e. Fendazon, Zealadin or WW Barb on Single Player...

That make me think that is the code that deals with the player driven pets or missile AI that is causing the bug, as I had my char pretty much idle on Frozen Tundra and let the imps fire their bolts at me for like 3 hours and never triggering the bug...

Did someone look at the code and could debug the dll to see why is reverting the Motion Prediction? normally I can attach Visual Studio debugger at a compiled exe but I don't know how to do that do a dll...

Marcelo20XX avatar Aug 11 '22 18:08 Marcelo20XX

This bug is driven me insane, it prevents D2DX to be the complete solution, can we organize a bounty to make it fixed? I am willing to pay money to the person who can came with a fix...

PD: I had Diablo 2 Resurrected but for some reason I prefer to play with the old graphics with PlugY and on the 1.09d patch...

Marcelo20XX avatar Aug 13 '22 18:08 Marcelo20XX

The original commit that added motion prediction is https://github.com/bolrog/d2dx/commit/11cd4a6e9e986b6e33c301471c3511cc678c401c. I've tried to skim through it, but with my very rudimentary C skills, I couldn't see anything obvious. It seems quite complex though, so you'd likely need an actual C/C++ programmer who also knows a bit about the D2 code base to be able to work on this one…

PD: I had Diablo 2 Resurrected but for some reason I prefer to play with the old graphics with PlugY and on the 1.09d patch...

It would be great if D2 Resurrected had this kind of motion prediction in its "legacy mode" 🙂. As it is right now, it looks and plays awful when compared to D2DX. The "modern mode" in D2 Resurrected of course is great, but my PC is way too slow for it, so D2DX is all I play.

tomasz1986 avatar Aug 21 '22 08:08 tomasz1986

I agree, I stopped playing because of that bug. So annoying. I guess the creator, Bolrog has gotten caught up on other things, I tried to reach out to him, unsuccessfully. But really, unless some knight in shining armour comes along…

On 21 Aug 2022, at 09:04, tomasz1986 @.***> wrote:



The original commit that added motion prediction is 11cd4a6https://github.com/bolrog/d2dx/commit/11cd4a6e9e986b6e33c301471c3511cc678c401c. I've tried to skim through it, but with my very rudimentary C skills, I couldn't see anything obvious. It seems quite complex though, so you'd likely need an actual C/C++ programmer who also knows a bit about the D2 code base to be able to work on this one…

PD: I had Diablo 2 Resurrected but for some reason I prefer to play with the old graphics with PlugY and on the 1.09d patch...

It would be great if D2 Resurrected had this kind of motion prediction in its "legacy mode" 🙂. As it is right now, it looks and plays awful when compared to D2DX.

— Reply to this email directly, view it on GitHubhttps://github.com/bolrog/d2dx/issues/166#issuecomment-1221494334, or unsubscribehttps://github.com/notifications/unsubscribe-auth/APZRWPZGBAFJOV7UBDGY2RTV2HPIHANCNFSM5RX2XPOA. You are receiving this because you authored the thread.Message ID: @.***>

skylight102 avatar Aug 21 '22 08:08 skylight102

I had some experience with both, C++ and the Diablo II code, I will see if I can do something but I will give it a try, if only I can attach the VS debugger to the dll like I can with a recompiled exe if would be faster to find why it deactivates. At this time I can only speculate that either somehow the entities list gets corrupted or some other thing like the sprite cache is making the MoP shutting off...

Still it would be ideal to reach and convince Bolrog or one of the other two collaborators to make a final fix for this bug, that's why I was willing to pay if they somehow made a commit that fixes the bug but I suspect money for them is not really important...

Marcelo20XX avatar Aug 23 '22 00:08 Marcelo20XX

Hi guys! I returned with some good news!!! I have a conversation with the user Jarcho and he might have fixed this issue, currently it needs more testing before we can claim is fixed for good. I already ran a LoD 1.09d test on the entire Act V with my Sorceress without triggering the bug, as my comment above states, this class was previously triggering the bug on average after 15-20 mins played. So I will give you a link to his repository for you to try it: https://github.com/Jarcho/d2dx/releases

I am excited to know about your results, so post them here if it is fixed on your end too...

Marcelo20XX avatar Sep 23 '22 23:09 Marcelo20XX

Great news, has anyone been able to get this to work for 1.13c? I'd really like to start playing again but can't seem to get it to work! Thanks : )

skylight102 avatar Sep 27 '22 19:09 skylight102

It must be something on your end, I suggest you reinstall the game. I already tested Jarcho's fork and is running well on 1.13c, here is a compiled glide3x.dll plus SGD2FreeRes updated to version 3.0.2.5: MoP_1.13c.zip

Just unzip it on the root dir of the game, its preconfigured to Widescreen and Motion Prediction ON

I strongly recommend you to update to the most recent version of SGD2FreeRes which is 3.0.2.6 though once you got this up and running...

Marcelo20XX avatar Sep 27 '22 21:09 Marcelo20XX

Thanks bud, really appreciated. I seem to have got it working but the resolution doesn’t seem quite as HD as it should be. Will give this a go tomorrow. Thanks again :) ❤️

On 27 Sep 2022, at 22:35, Marcelo20XX @.***> wrote:



It must be something on your end, I suggest you reinstall the game. I already tested Jarcho's fork and is running well on 1.13c, here is a compiled glide3x.dll plus SGD2FreeRes updated to version 3.0.2.5: MoP_1.13c.ziphttps://github.com/bolrog/d2dx/files/9659733/MoP_1.13c.zip

Just unzip it on the root dir of the game, its preconfigured to Widescreen and Motion Prediction ON

I strongly recommend you to update to the most recent version of SGD2FreeRes which is 3.0.2.6 though once you got this up and running...

— Reply to this email directly, view it on GitHubhttps://github.com/bolrog/d2dx/issues/166#issuecomment-1260079250, or unsubscribehttps://github.com/notifications/unsubscribe-auth/APZRWP7SSP5B4CAXHOQYYZDWANSAVANCNFSM5RX2XPOA. You are receiving this because you authored the thread.Message ID: @.***>

skylight102 avatar Sep 27 '22 21:09 skylight102

Loving the fork by Jarcho! Legend!

I have been testing it on PD2, mostly great but I do find that there is some slight lagging when there are large groups of enemies, mainly when you get hit by melee, and when things die, the models seem to be a little jittery when they die. Has anyone else experienced this and possibly have a fix?

skylight102 avatar Sep 28 '22 18:09 skylight102