emoose / OutRun2006Tweaks

Turning and spinning and spinning and turning, woah!
MIT License
316 stars 0 forks source link

Game doesn't really run above 60fps #31

Open Tasosgemah opened 3 months ago

Tasosgemah commented 3 months ago

... At least not for me.

I have a 240hz screen and i play a lot of games at 240fps. The biggest difference this frame rate makes is that it makes the motion look very sharp, almost like a CRT, while at 60fps the motion is noticeably blurry.

With this patch, the game still runs at 60fps since i can see the same blurriness as i usually see at 60fps. There is no difference between 60/120/240 and i should know because that difference is striking in other games where they do run at 120 or 240fps.

I tested this with RTSS and it does report 240fps, strangely enough. But the actual frame rate is 60fps, maybe internally it just repeats the same frames 4 times and RTSS doesn't notice this. Maybe this has something to do with the 60fps tick rate?

I tested with framelimiter to "0" and "240", tried to lock with RSS instead, tried vsync on/off. Game is always locked at 60fps no matter what.

chanunnaki commented 3 months ago

I'm noticing this too on my 240hz monitor. I think some UI elements like the speech bubbles with mission instructions that pop up at the beginning of a Coast 2 Coast mission run do indeed update a little smoother than 60, but the world and scenery is very much the same whether at 60fps or 240fps.

DonelBueno commented 3 months ago

Try to record the gameplay at 240 FPS and look if there are repeated frames. I've noticed that the reflections run at a higher framerate at 120 FPS, updating at 60 Hz instead of the original 30 Hz, but I also have the impression that the game itself is not smoother at 120 FPS than when playing at 60 FPS (144 Hz monitor).

chanunnaki commented 3 months ago

I just tried recording both gameplay at 240hz and 60hz at 240fps on an iPhone and they do indeed look remarkably similar. Essentially the same.

emoose commented 3 months ago

Yeah sadly it's not a true framerate unlock, majority of the game code will still run at 60fps other than a couple effects like UI sprites / animated textures / shadowing / reflections.

Don't really think a true unlock would be that possible since most of the game loop is expecting to run every 16ms, and there's a lot of code counting time passed using raw frame counts rather than seconds, would be pretty difficult to retime those :/

The partial unlock does help a bit with load times & the reflection update rate, but not really sure if those are worth the extra power use, maybe should downplay the framerate stuff really.

chanunnaki commented 3 months ago

Oh well, that's a bit of a bummer that it's not a true framerate unlock, but it makes a lot of sense.

I guess the wait continues for a true framerate unlock. Perhaps a full decompilation for this game is in order someday.

Much appreciated regardless on the stellar work so far emoose. It's very much appreciated and I absolutely love it.

s-ilent commented 3 months ago

Perhaps it'd be possible to add some interpolation between frames without touching the game logic? The decompilation projects seem to accomplish it through storing the state of the renderer and interpolating towards it from the previous frame. At least from my uninformed perspective, if the game already has enough separation between the game logic and renderer that it can continue rendering new frames while nothing onscreen has changed, maybe it's possible without needing to completely disassemble things?

Tenome commented 2 months ago

Water animation speed seems particularly affected by this. The webm shows 240FPS in the beginning before swapping to 60FPS (second half of the video). Perhaps certain troublesome animations can have an FPS cap on them?

OR2006C2C.EXE - Shortcut_2024.08.07-19.46.webm

emoose commented 2 months ago

Yeah noticed that too, guess these could probably be fixed the same way as the beach wave/flashing light textures were in 3da0df3c810aeb91f1a3ed303b67ea6d68b56734, but haven't been able to find the code that actually animates them yet (it's weird, even when game is paused water anim still plays, guess it might not get handled in the main OR2 code...)

emoose commented 2 months ago

Water anims should be fixed in cf47585e17145718ace8e92a08f97d312ffbb871 / https://github.com/emoose/OutRun2006Tweaks/actions/runs/10371196213, the stuff that changes does get used by some tire smoke/tire mark related code though, hopefully nothing is broken there...

Sonic-TV commented 2 weeks ago

https://www.bilibili.com/video/BV17xtDeKEak/?share_source=copy_web&vd_source=a8652477047eeb35754fa2bf44e49b0d&t=275

the yellow "total time" should have a scrolling effect here but it's gone when i set unlimited framerate