-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Extend motion prediction support #177
base: main
Are you sure you want to change the base?
Conversation
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. |
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 |
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 |
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. |
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 |
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 |
I did get this to work but it seems to ignore my |
@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 |
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've just tried the new build out. It does feel smoother than the last one. However, the terrain still feels unstable when the character is moving, resulting in it looking blurry. I can observe this, e.g. when looking straight at the terrain in front of the moving character. For the record, the last version that doesn't display this kind of effect is https://github.com/Jarcho/d2dx/releases/tag/2022-11-02 (and, of course, the official releases from this repository). There, I can look at the terrain in the same situation and it remains stable all the time, even when the character is running quickly. |
New build. I don't know if this will fix blurriness or not. The change to the motion prediction is pretty small this time. |
I've tried out the new build but I can't really feel any difference between it and the last one. |
Were you using the new upscale method? It would be the default without a config file. |
This doesn't fully fix the jiggling text labels, but it should be pretty close. |
This only really has an effect at lower frame rates. |
Unfortunately, the situation seems to have got even worse now 🙁. The same blurry/unstable background when running is still present, and on top of that the game has started to visibly stutter every few seconds (even though the FPS remains at stable 162 all the time). I've tested both with my old config file and without any (i.e. using the default settings) but there was no difference. Here is the log file, although it appears extremely small compared to the previous ones. |
Just added the profiled version. Can you run that post the log? |
Here you go, although for some reason the game started in 640x480 resolution, which I then changed to 800x600. Also, I haven't observed the stuttering this time… No difference regarding background still being blurry while running. Just a side question, as this isn't strictly related just to the PR itself, but I'd like to try doing some testing myself to find out which exact change is responsible for the difference/regression regarding terrain blurriness. What is the easiest way to compile the whole thing? Unfortunately, there don't seem to exist specific instructions anywhere. I'm more comfortable with building from the command line if that's of any significance. |
Hello, I just tested the latest build (d2dx-2022-12-24) and I too can see some slight blurriness on the BG when moving (with Scaling Mode 3) but it's so slight it doesn't bother me at all, but it looks as if the area close to the character shows some pixelation as if "unstable" when moving though, not sure how to describe it. On another note, would be cool if you (Jarcho) could fix the high CPU usage when window is minimised / tabbed-out from. Edit : Tabbing out during startup cinematics seems to affect the predictor in a weird way (Log Included) :
|
The easiest way to compile the project is using Visual Studio and just choose release mode... |
This partially reverts back to the older frame time tracking and removes the motion prediction. Hopefully this one ends up smooth. |
Very cool! I'd love to merge this, is it stable? I noted you had continued working on your branch. I just don't have the time to work on this project anymore, so I'd be happy if someone carried it on. |
The branch currently is not. I was working under the assumption you weren't coming back to this. I can roll it back to something stable some time this weekend. |
@bolrog Split off a few of the changes into different PR's. This was done mostly by cherry picking, but I haven't tested them. Hopefully they all compile and work. |
Unlike the last few build this uses the old motion prediction code. This still includes all the other bug fixes and improvements. |
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.