Skip to content
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

Max Payne 1: can't limit FPS with WidescreenFixes #871

Open
Hexaae opened this issue Sep 18, 2020 · 21 comments
Open

Max Payne 1: can't limit FPS with WidescreenFixes #871

Hexaae opened this issue Sep 18, 2020 · 21 comments

Comments

@Hexaae
Copy link

Hexaae commented Sep 18, 2020

Without WSF I can use NVidiaProfileInspector or a https://github.com/ThirteenAG/d3d8-wrapper/releases/tag/d3d8-wrapper-v1.16 to cap the game at 60fps (REQUIRED to avoid scripts timing bug like the infamous Vinnie Gognitti stairs bug).

With WSF installed instead I can correct widescreen (1920x1080) proportions but can't cap fps anymore! :(
This patch needs an FPSLimit option.

Gaming Laptop ASUS GL703GS (BIOS 310)
CPU i7-8750H (iGPU unavailable)
GTX 1070 8GB (non-Max-Q, 10DE 1BE1 - 1043 1011, GP104 A1, vbios 86.04.7c.00.24, Samsung VRAM)
Windows 10 Pro 2004
Desktop res: 1080p (1920x1080)
Screen: 144Hz g-sync AUO B173HAN03.2 [AUO329D]
NVidia driver: 456.38 WHQL
Audio: Realtek HD Audio (ALC295 chipset)
Hard disks: NVMe Samsung, SSD Crucial
USB Blu-Ray 4K drive: Archgon Star MD-8102P-U3YC-UHDB (Pioneer BDR-UD04)

@DonelBueno
Copy link

I have the same issue and request.

The same can be said for Max Payne 2, since it also uses the same engine.

@Hexaae
Copy link
Author

Hexaae commented Oct 13, 2021

I've found a temporary workaround, while waiting for an update including both widescreen fix + fps cap option:
https://steamcommunity.com/sharedfiles/filedetails/?id=1934864423

EDIT: seems to work with Max Payne 1 only...

@DonelBueno
Copy link

DonelBueno commented Oct 13, 2021

@Hexaae Thanks for the link, it worked here.

The strange thing is, I had already tried this solution myself, but it didn't work, I don't know if the version in the link you provided is different.

EDIT: It doesn't work for Max Payne 2 =/
Would you also have a link for MP2?

@Hexaae
Copy link
Author

Hexaae commented Oct 13, 2021

From my archive on Steam, try just the dx9 dll + its ini file with Max Payne 2: it should lock DX9 games to 60fps (see inside INI)...
and the https://thirteenag.github.io/wfp#mp2 of course.

@DonelBueno
Copy link

1
2
3
4
5

Do you see any mistake? It doesn't work =/

@AeroWidescreen
Copy link
Collaborator

You should be able to use RivaTuner to the cap framerate of any game, which is arguably the best way to do it. Both AMD and NVIDIA should have options to cap the framerate on a per-game basis as well.

@DonelBueno
Copy link

DonelBueno commented Oct 13, 2021

@AeroWidescreen I know, but it doesn't work in these games. It used to work on older drivers through Nvidia inspector or Nvidia control panel, but the frame limiter logic has apparently changed recently.

RivaTuner works fine, thanks for the tip.

@Hexaae
Copy link
Author

Hexaae commented Oct 13, 2021

Do you see any mistake? It doesn't work =/

Be sure you didn't overwrite MP2's scripts and my archive DLLs with those from MP1, for example I see a d3d8.dll and settings UseD3D8to9=1 that shouldn't be there (isn't DX9 MP2?)...
Remove everything, just apply the MP2 Widescreen fix + put the D3D9.dll+ini (ONLY) from my MP1 archive with the 60fps lock.

EDIT:
Ok. I bought MP2 on Steam and indeed fps cap doesn't seem to work even after copying d3d9.dll+ini from MP1's workaround...

@DonelBueno
Copy link

Yes, the only thing that worked for MP2 is RivaTuner.

@Hexaae
Copy link
Author

Hexaae commented Oct 13, 2021

Will MP2 break scripted scenes like MP1 in case FPS are too high?

@DonelBueno
Copy link

Yes. From my experience, both can go as high as 180-200 fps, so I limit them to 144 fps and have no issues.

@Hexaae
Copy link
Author

Hexaae commented Oct 13, 2021

You can cap it to your display Hz (144, just like mine) just using UseD3D8to9=1: it runs 144 FPS stable here instead of 300-1200fps
So the game is playable and won't break scripts?
MP1 suffered many script issues if FPS >60... that's why I created that workaround fix including 60fps cap. But it's not clear to me if MP2 also has to be capped to 60fps (I never played it before ;))

@DonelBueno
Copy link

DonelBueno commented Oct 13, 2021

Really? I'm going to play both in the coming days and confirm in this thread, but I remember only having issues when going above 200 fps or something like that.

@Hexaae
Copy link
Author

Hexaae commented Oct 13, 2021

No, MP1 absolutely needs 60fps cap (or maybe just vsync?) or some scripted scenes will break 90% of times. E.g. the infamous Vinnie Gognitti stairs bug: https://www.youtube.com/watch?v=rwt4GYKUSAs
If MP2 is ok at 144Hz vsynced we're fine with UseD3D8to9=1. For the future (when HW will be even faster and those with 200+ Hz screen) we'll need a working FPS lock implemented in the WSF patch though...

@Hexaae
Copy link
Author

Hexaae commented Oct 14, 2021

Just found https://github.com/ThirteenAG/d3d8-wrapper/releases/latest which has a working FPSLimit=60 from the same author @ThirteenAG but unfortunately will disable widescreen fix :(
Hope the author will add to MaxPayne2.WidescreenFix.ini:

[MAIN]
FPSLimit=<n> 

one day :( (also for Max Payne 1). I'm not a coder myself to try merging sources to include FPSLimit and recompile...

@DonelBueno
Copy link

I've finished MP1 yesterday playing at 144 fps with no issues at all, not even in Vinnie Gognitti's part. So yes, you can finish both games playing at 144 fps.

@Hexaae
Copy link
Author

Hexaae commented Oct 18, 2021

Good. So the important thing is vsync on for both games. The day we'll have very fast screens could be a problem though without a fps limiter implemented directly in the widescreen fix

@DonelBueno
Copy link

I didn't enable vsync, so it's optional.

@DonelBueno
Copy link

DonelBueno commented Oct 19, 2021

maxpayne2_2021_10_19_03_24_50_763

I've finished MP2 and this is the only part that gave me trouble. He couldn't get past this door at 144 fps, so I capped the framerate to 60 fps and went back to 144 fps after this part.

@Hexaae
Copy link
Author

Hexaae commented Oct 19, 2021

Try with vsync AND 144, but you'll have to restart level to be sure (with mp1 reloading savegame was not enough after 60fps cap fix...)
These games to be 100% safe need a vsync+60fps lock integrated in the widescreen fix anyway, definitely...
P.S. in the Steam discussion thread I also posted a fix for mirrors bug etc. BTW

@Hexaae
Copy link
Author

Hexaae commented Oct 19, 2021

Another test you can do is with half-vsync + adaptive sync (Nvidia Profile Inspector). This will make the game run capped at 144/2=72fps vysnced (very smooth in-game). Maybe 72fps capped + vsync is enough to avoid also that issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants