PARTYMANX / partymod-thps4

MIT License
23 stars 0 forks source link

Micro stuttering #6

Open ZT-1 opened 9 months ago

ZT-1 commented 9 months ago

I get micro stuttering quite frequently with partymod. This is likely due to the framerate limiter. It seems like this was also an issue with THPS3, but it was fixed in version 1.1.2?

PARTYMANX commented 9 months ago

The limiter is implemented exactly the same as partymod THPS3 (minus turning on vsync, which i've been meaning to do). just to be sure, are you sure you're not seeing actual dropped frames? This game is pretty infamously difficult to run even today due to its absurd number of vertex buffer changes and draw calls in certain scenes (Kona spawn is a big one). that fact might also make frame pacing a lot more out of wack since the delay is at the start of a frame to prevent additional latency.

ZT-1 commented 9 months ago

It's definitely not dropping frames in any way (monitored with MSI Afterburner, always a stable 60). It seems to be actual micro stuttering. Looking back again, it seems to happen quite often when I first start the game after booting up my machine, then happens every once in a while after that.

ZT-1 commented 9 months ago

Also wanted to add that it doesn’t seem to happen with disableframecap enabled.

PARTYMANX commented 8 months ago

I keep trying to chip away at this, but I think the renderer is just way too busted to effectively be able to be reined in (at least with d3d8. but i'm no expert), even delaying before present is wildly inconsistent. it's kind of baffling

PARTYMANX commented 2 months ago

while doing prep for SGDQ, i realized that on steam deck with the frame limiter off to decrease latency, the game stutters way more than expected (THPS3 as well, so it's not just that this game is slow). I might've made a connection here: when the game missed its frame target, i was calculating a next frame time based on the evaluation time of the frame time. instead I'm testing calculating it to the next 16.6ms-aligned frame. on my dev pc it looks fine but I'll try the deck soon.

PARTYMANX commented 2 months ago

no, that definitely didn't work. I did find something related though, looks like it's a relatively known d3d8 behavior. https://github.com/GM82Project/gm82vpatch/blob/main/dll/gm82vpatch.c