narzoul / DDrawCompat

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

0.5.2 DDrawCompat breaks windowed mode for The Sims 1 + stuttering in fullscreen #298

Open mrpenguinb opened 2 months ago

mrpenguinb commented 2 months ago

Not sure what change affected windowed mode and created stuttering in the game. 0.5.1 has none of these issues.

narzoul commented 2 months ago

Can you provide more information on these issues? I haven't encountered any stuttering, and windowed mode works mostly fine, except the screen freezes on the loading screen initially, but it's fixable by moving the window or clicking outside of it. That's an odd issue, I'll look at it later.

What OS? GPU? DDrawCompat settings? In-game settings? 3rd party mods/patches? Do these issues happen without them?

mrpenguinb commented 2 months ago

Windows 10 22H2, RTX 3060 Ti No settings specified for DDrawCompat. The neighborhood screen in windowed mode is just black, and I have to Alt+Tab for each time I exit to the neighborhood screen from a lot/house, but otherwise everything else "works". No third party mods or modification to the .exe, only DDrawCompat is installed.

Also, the stuttering only occurs when DisplayResolution = app is set. DDrawCompat 0.5.1 doesn't stutter when this is set for The Sims 1.

narzoul commented 2 months ago

Windows 11 23H2, RTX 3060 Ti also here, but no stuttering even with DisplayResolution=app setting. Is there a particular area or action in the game that stutters? What does the stats overlay show? Does it also stutter with the default DisplayResolution=desktop setting? Have you tried setting CpuAffinity=all?

mrpenguinb commented 2 months ago

Windows 11 23H2, RTX 3060 Ti also here, but no stuttering even with DisplayResolution=app setting. Is there a particular area or action in the game that stutters? What does the stats overlay show? Does it also stutter with the default DisplayResolution=desktop setting? Have you tried setting CpuAffinity=all?

How do I get the stats overlay window to show? What am I meant to be looking for in the stats overlay, performance statistics?

Looking closer, with DDrawCompat, DisplayResolution=app set on v0.5.1, the stuttering is reduced compared to when it's set to DisplayResolution=desktop, with v0.5.1. Wonder why.... 0.5.2 changed something and stutters with DisplayResolution=app (all of this testing is in fullscreen of course since windowed mode with the game is glitched like stated before). Sorry if this is confusing and hard to follow, and nitpicky.

narzoul commented 2 months ago

How do I get the stats overlay window to show?

https://github.com/narzoul/DDrawCompat/wiki/Configuration#statshotkey

What am I meant to be looking for in the stats overlay, performance statistics?

Yes, mostly the current and average present and flip rates. I think the min/max values are not very reliable, but I never had time to look into it. Note that the stats overlay is not yet optimized so displaying it may itself decrease frame rate a bit. But you can compare the results against v0.5.1.

I added 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

Could you please figure out which was the first one that introduced the stuttering?

mrpenguinb commented 2 months ago

With Shift + F12 (performance stats) showing, the stutter goes away. As soon as it's disabled it's back to stuttering (microstutter more specifically I think).

Also the commit that last works is 15-gc344ec34, 16-gd5a89cad and above exhibit stuttering (with windowed mode breaking at the same commit).

narzoul commented 1 month ago

This should fix windowed mode: ddraw.zip (diff.txt compared to v0.5.2)

I still don't understand the fullscreen stuttering issue, nor can I reproduce it. Could you record a video showing the issue, and how enabling the stats overlay fixes it?

mrpenguinb commented 1 month ago

Windowed mode is fixed now, but it's still not as performant as it could be (been an issue before 0.5.1).

Here's a video showcasing the stutter: TS1 stutter in DDrawCompat unless overlay is used The stuttering is visible when right-click dragging the mouse slowly (moving the camera) across a Sims house/lot.