d2dx
d2dx copied to clipboard
Extend motion prediction support
Fixes #172 Fixes #166 Fixes #167 Fixes #165 Fixes #159 Fixes #155 Fixes #141 Fixes #99 Fixes #95 Fixes #38
Mostly fixes #105
Adds motion prediction to 1.10 and ports the motion prediction for text to all versions.
I didn't test it on 1.09d yet but if the text works it will be amazing! Congratulations for a job well done @Jarcho ...
Now, since this project is mostly abandoned by its original author, could you please perhaps fix the bug with MoP disabling after playing for some time, its the only thing ruining the experience for everyone else right now and thanks again!!!
I haven't had that happen to me yet, so it's going to be a pain to debug. I know the motion prediction code has some n^2 parts to it which cause the frame rate to drop below 25fps on busy scenes which might be related.
Unit ID's are shortened to u16's instead of u32's which might also be the cause of the issue. Could try using the full u32 id and see if that ends up fixing it.
I'm working slowly on writing a different glide wrapper in my spare time. No idea when I'll have that done though.
Can you try this and see if it works? Note the builtin res mod is removed on this build. You'll need to provide your own version.
I was back from work and I immediately saw you updated your repo, thanks my man!!! the belt and floating text issues are fixed. I am currently testing LoD 1.09d but I can be your beta tester for other patches too. Regarding the long session error, that's my main interest, I tried myself a couple of times to fix it but my knowledge of the D2 code isn't enough for it so I am finger crossing for a chance at a fix...
EDIT: I ran a test with the Sorceress on the entire ActV which was my previous field for testing the MoP issue and after having complete the entire act without the bug triggering I think its safe to assume the bug is fixed. The entire run took me 2 hours, where previously I triggered the bug after 20-30 mins playing this act...
That would mean the unit id's exceeding 16 bits was the issue. That doesn't fix the issue with frames dropping on busy scenes, but that needs a rewrite of the motion prediction code. Not something that will happen for a while.
If it ends up happening you can post back and I'll look into it some more.
Exactly, I was having the FPS reverted back to 25FPS on busy scenes i.e. when fighting against Crushing Beast with an Imp mounted casting Inferno on Act V...
Thanks again for the fix and be sure I will report back if I have the issue happening again...
Btw, do you accept reporting other bug issues?
I can at least look in to things.
Can you try this and see if it works? Note the builtin res mod is removed on this build. You'll need to provide your own version.
Thanks a ton! Amazing work. Only thing your pre release build isn't working but when I compile from your source everything works perfectly with newest version of SGD2Freeres.
Your pre release build doesn't seem to recognize d2dx.cfg somehow...
The pre-release isn't quite the same as the source here. The source still uses the integrated res mod whereas the prerelease has it stripped out. You'd need to provide your own copy of SGD2FreeRes.dll
alongside it.
Yeah I know, I'm already using an external version of SGD2Freeres. Strangely only the compiled source is working for me. Works like a charm.
Pre release one ignores my d2dx.cfg and isn't using motion prediction. I have no idea why...
Strange. Ignoring d2dx.cfg
would result in both being enabled so that's not the problem.
Can you try this and see if it works? Note the builtin res mod is removed on this build. You'll need to provide your own version.
I tried to compile your d2dx-test-motion-prediction source in vs 2022 but got an error as followed:
Any idea?
Just ignore that error, only thing it does is to copy the file glide3x.dll after compilation to a certain folder, the compiled file will be inside the Release folder. Also compile the source on "Release" mode not Debug...
Thanks for your reply. I added float-point scaling factor from #133 and recompiled and it just works!
I found a bug left with motion prediction for text in 1.09d. When you are walking and selecting npcs or containers like chests there will be still no motion prediction for these texts. Just a little annoyance. In 1.13d theres motion prediction for these texts too.
There is some polish needed for the hovering text MoP to work properly, it still has this bug: https://github.com/bolrog/d2dx/issues/105
The text sometimes jumps randomly in all versions and there is no MoP for Shrines too. Can you take a look at this @Jarcho thank you in advance...
Can you guys provide a compiled download of glide3dx.dll for us? Or give us instructions? The file I found here does not work in that it doesn't give me widescreen resolutions.
You'll need a copy of SGD2FreeRes for that version. This is the latest: https://github.com/mir-diablo-ii-tools/SlashGaming-Diablo-II-Free-Resolution/releases/tag/3.0.2.6. Both SGD2FreeRes.dll
and SGD2FreeRes.mpq
need to be placed alongside glide3x.dll
.
Also @Jarcho , I know this is not a bug but more of a feature, but since it can be a quick change to the source... Could you perhaps fix the Cinematics videos showing with letter boxes on both the horizontal and vertical axis? I mean since they are close to 16:9 shouldn't be full screen for people that plays on widescreen resolutions?
Is the compiled glide3x.dll
limited to a particular patch? I've tried using it with 1.13c/d and 1.14d and the game does launch with it, but it runs without any motion prediction at all. This is with or without SGD2FreeRes.dll
and SGD2FreeRes.mpq
. For the record, I only play using the default 800x600 resolution.
Can you guys provide a compiled download of glide3dx.dll for us? Or give us instructions? The file I found here does not work in that it doesn't give me widescreen resolutions.
You can try my build which updates built-in SGD2FreeRes to the latest version and includes changes from #177 and #133.
You'll need a copy of SGD2FreeRes for that version. This is the latest: https://github.com/mir-diablo-ii-tools/SlashGaming-Diablo-II-Free-Resolution/releases/tag/3.0.2.6. Both
SGD2FreeRes.dll
andSGD2FreeRes.mpq
need to be placed alongsideglide3x.dll
.
I did get this to work but it seems to ignore my d2dx.cfg
file? So I'm getting widescreen resolutions but not smooth FPS.
@whipowill You can unzip this to your root folder: https://github.com/bolrog/d2dx/files/9659733/MoP_1.13c.zip or try @CaptainRay1993 fork repository release until Jarcho gets a release. Either way the zip is preconfigured to Widescreen and Motion Prediction enabled...
The @CaptainRay1993's fork works great for me, and it does respect d2dx.cfg
too. It basically seems to behave exactly the same as the official glide3x.dll
. I haven't played the game enough yet to test whether the fps drop bug has been fixed though.
Also @Jarcho , I know this is not a bug but more of a feature, but since it can be a quick change to the source... Could you perhaps fix the Cinematics videos showing with letter boxes on both the horizontal and vertical axis? I mean since they are close to 16:9 shouldn't be full screen for people that plays on widescreen resolutions?
This is a small pain. The videos are displayed via screen-blitting and the two intro videos are 4x3.
Can we change it so it crops the letterboxes, I did this for the Diablo 1 Source on the Devilution X project, but I didn't find where to do that here...
Also we can leave alone the two intro videos as they can be easily skipped via a simple modification on the D2Launch.dll (if anyone wants to know how, you can ask me)
Another possibility could be, show them as stretched and then overscan the top and bottom part of the image?
I think you misunderstood something. What d2dx gets for display is a 640x480 buffer per video frame with no direct way to distinguish which video is playing. This is for the intro videos and cinematics. Both intro videos are actually 640x480 videos. The cinematics are 640x292. Removing the black border on the cinematics itself is easy, but it requires a way to distinguish which video is currently playing
Assume the video played is a cinematic, it could be implemented as a toggle if the user wants the vanilla behavior, because there is a way to disable the intro videos by patching the D2Launch.dll file...
Could you show me how to do this as a proof of concept? And thank you for addressing this issue...
Here the video and the main screen are stretched d2dx.zip Taken from ZYEL452-beta1-public
@madbmax Thanks for the file but it is not what I was asking for, there is still letterboxes at the bottom and at the top, but surely is a step on the right direction, I think @Jarcho has a solution for this issue but he doesn't want to apply it to the intro videos too...