narzoul / DDrawCompat

DirectDraw and Direct3D 1-7 compatibility, performance and visual enhancements for Windows Vista, 7, 8, 10 and 11
BSD Zero Clause License
890 stars 67 forks source link

Lego Loco interface glitches #179

Open RingtailRaider opened 1 year ago

RingtailRaider commented 1 year ago

I'm trying to run Lego Loco on Windows 10 but it has a lot of graphical issues. I installed DDrawCompat v0.4.0 and that's fixed most of them, but it still has a few issues where the interface flashes whatever it was displaying previously after changing. It also does not render text boxes correctly. I did try the debug version and older versions, but it ran way slower with the former and had more graphical issues with previous releases.

Example images: issue The background from the main world stuck behind the tutorial box for a few frames after entering a building. When moving between buildings it also flashes between the current and previous backgrounds for a few frames.

issue Tutorial text boxes display all text in each section on one page briefly before moving excess text to another page. Normally it should immediately look like the bottom image.

Here is a short video showing these issues in motion, though some of them you have to pause and use frame advancing to see well. There are also cursor trails sometimes, but I was not able to capture them.

narzoul commented 1 year ago

Are you using D3D9On12? I can't reproduce these issues without it. Please share your DDrawCompat logs.

RingtailRaider commented 1 year ago

DDrawCompat-Loco[2].log

Here's a log file it left in the folder I put ddraw.dll in, LEGO LOCO\Exe. PCGamingWiki did say to put the dll in just the LEGO LOCO folder, but it didn't recognize it when I did that. All the log files it left are identical aside from timestamps.

I have no idea if I have D3D9On12. If it's something I have to download then no. I'm using Windows 10 if that affects things.

RingtailRaider commented 1 year ago

Was the log file useful at all? I can try some more testing if needed, I don't know how to change any settings or what D3D9On12 is though - there's apparently DLLs for it in my Windows folder but I've never seen them before, and can't find how to disable it if it is the issue. Sorry I forgot about this for a while and if what I posted wasn't helpful enough.

narzoul commented 1 year ago

No, you're not using D3D9On12 according to your logs. It's only used by default with recent Intel GPUs, as a substitute for a D3D9 driver.

I didn't get very far with investigating the issues. The dialog boxes are of course not manipulated by DDrawCompat, the text wrapping changes because the game renders it multiple times and changes the wrapping itself.

I don't know about the other glitches, it may be some issue with DDrawCompat, but I didn't have good enough tools for debugging it yet and it was getting way too time consuming, so I put the investigation on hold to deal with simpler cases. I will try to return to it before the next release, but for now I still have many other issues to focus on that are less troublesome to debug.

narzoul commented 8 months ago

Can you try it again with v0.5.0? I think I was able to fix most of the cursor trails, and I can not reproduce any of the other glitches either, although I always had a hard time reproducing most of them.

RingtailRaider commented 2 months ago

Can you try it again with v0.5.0? I think I was able to fix most of the cursor trails, and I can not reproduce any of the other glitches either, although I always had a hard time reproducing most of them.

Yeah, I tried it and it seems like the cursor trails and the background showing through textures, as well as the help box text sometimes not wrapping correctly, has been fixed in 0.5.0. The only issue I'm having now is that sometimes when moving between rooms (like going into and out of the post office or paint shop) the desktop and any windows behind the game flashes through for like one frame. Tabbing out of and into the game causes this too. No idea how it shows up on video because OBS just shows a second-long delay when moving between rooms.

The exit window (pressing escape) also seems to have some lag issues where one part of it appears and disappears a quarter second slower than the other. I forget if either of these happened in the old version though. Sorry I didn't see this at first!

RingtailRaider commented 2 months ago

Well since there's a 0.5.2 now too I tried that, and now the tutorial window isn't displaying at all unless I tab out of the game, it just covers the whole thing with whatever graphics were displayed there last. The framerate is also really bad. idk what changed since 0.5.0 worked pretty well but it's even more unplayable now than before

bugs1

narzoul commented 2 months ago

v0.5.2 has way bigger display issues with this game for me, so I'll look into that separately.

In the meantime, could you please help figure out which commit between v0.5.1 and v0.5.2 introduced the performance issues? I assume v0.5.1 is still fine, since it has only minimal changes compared to v0.5.0. I have a build of all commits between v0.5.1 and v0.5.2 here: https://github.com/narzoul/DDrawCompat/releases/download/v0.5.2/DDrawCompat-v0.5.2-debug-previous-builds.7z

RingtailRaider commented 2 months ago

Sure, I'll go through them and see if I can find when it breaks. I tried 0.5.1 real quick and yeah it works the same as 0.5.0 with only the exit popup and brief flicker issues.

RingtailRaider commented 2 months ago

v0.5.1-16-gd5a89cad is the version where it apparently first breaks.

v0.5.1-17-gec9cf32e is actually even worse, it breaks really bad to the point everything is black. v0.5.1-18-gd6fa1274 onward goes back to just breaking once you load a world but then later versions still sometimes just load the game with no graphics at all, including the last one v0.5.1-31-ge0048a1b.

Let me know if I should do further testing.

narzoul commented 1 week ago

I fixed the more critical issues in v0.5.3. There is still the matter of an occasional 1-frame graphical glitch when dialog boxes pop up. The problem is caused by ShowWindow forcing the dialogs to the top of the Z-order, and it takes a little time for the fullscreen presentation window to reestablish it's topmost status. I tried various hacks to fix it, and while some of them worked, they caused other, worse problems. I don't have any more ideas to try at the moment, I'll get back to this when I do...