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

Camera angle can tank performace #1137

Open
Triticum0 opened this issue Jun 30, 2022 · 9 comments
Open

Camera angle can tank performace #1137

Triticum0 opened this issue Jun 30, 2022 · 9 comments
Labels
bug Something isn't working

Comments

@Triticum0
Copy link

Triticum0 commented Jun 30, 2022

Bug Description

Some games with variable camera angles can lose lots of performance depending on where the camera is pointing, This mostly affects sports games and some other outliers.

Games Affected
https://xemu.app/titles/54540091/#College-Hoops-2K6
https://xemu.app/titles/545400af/#College-Hoops-2K7
https://xemu.app/titles/4b4f0002/#Crimson-Sea
https://xemu.app/titles/53450031/#ESPN-NBA-2K5
https://xemu.app/titles/53450030/#ESPN-NFL-2K5
https://xemu.app/titles/53450037/#Major-League-Baseball-2K5
https://xemu.app/titles/54540096/#Major-League-Baseball-2K5-World-Series-Edition
https://xemu.app/titles/54540092/#Major-League-Baseball-2K6
https://xemu.app/titles/545400b1/#Major-League-Baseball-2K7
https://xemu.app/titles/5454008d/#NHL-2K6
https://xemu.app/titles/545400ad/#NHL-2K7
https://xemu.app/titles/434d0021/#Club-Football
https://xemu.app/titles/434d003f/#Club-Football-2005
https://xemu.app/titles/4541009f/#Madden-NFL-07
https://xemu.app/titles/454100ac/#Madden-NFL-08
https://xemu.app/titles/4541023b/#Madden-NFL-09
https://xemu.app/titles/544d0007/#Knights-of-the-Temple-Infernal-Crusade

Expected Behavior

Should be stable performance no mater where the camera pointing

xemu Version

Version: 0.7.55
Branch: master
Commit: db389b1
Date: Sun Jun 26 05:58:57 UTC 2022

System Information

Field Value
OS Windows 10
CPU AMD Ryzen 5 2600 Six-Core Processo
Graphics Device NVIDIA GeForce RTX 3060 Ti/PCIe/SSE2
Graphics Driver 4.0.0 NVIDIA 512.95

Additional Context

No response

@Triticum0 Triticum0 added the bug Something isn't working label Jun 30, 2022
@RetroPCYT
Copy link

One game more affected for this 'issue": GTA Vice City.

@MaouYumisu1
Copy link

Used debug build for 06-07 to showcase the camera issue. 07's debug matches retail build. FPS gets worse the further you get from White Tees.
https://user-images.githubusercontent.com/56532164/177433870-e360ddab-1b06-43f3-8f2b-cd307485c1a2.mp4
https://youtu.be/8fkrYXTLp4Y
Affects https://xemu.app/titles/45410021/#Tiger-Woods-PGA-Tour-2003 in specific spots as shown in clip.
https://xemu.app/titles/4541007e/#Tiger-Woods-PGA-Tour-06 06 is very obvious https://youtu.be/55DY0mQF6-c.
https://xemu.app/titles/454100a4/#Tiger-Woods-PGA-Tour-07 Same issue like with 06. https://youtu.be/XstLSi_JFsM
I presume the issues aren't there in 04 and 05. I know they aren't for these two on 0.7.2 for these two games. I'll most likely need to test more on 03 to find more fps drops due to the camera on the latest build.

@SolusGrimwelder
Copy link

SolusGrimwelder commented Mar 19, 2024

In Crimson Sea which I just tried in latest stable build I noticed what seemed to be a double buffering issue when rotating camera. Framerate dropped straight to 30 when it couldn’t maintain 60. Not sure if this is the issue being described in all of these cases, but I noted it occurred most often when panning the camera. Never played the game on original hardware so I can’t say if this is an emulation issue or if the game was double buffered from the start, but if the latter than the game is in fact performing correctly. Would need a triple buffer patch to address. Will do some more experimenting.

On phone so couldn’t watch linked videos above. Will update post later with any new info.

@PeruvianPanda
Copy link

PeruvianPanda commented Jun 26, 2024

I tried out Crimson Sea and here's what I see: some areas / camera angles run at half speed. An easy way to see it is the first level, you spawn in at half speed (30 fps), run forward and around the corner, now you're at full speed (60 fps). Next corner you're back at 30 then around the corner after that you're up to 60 again. Turn around and you can run through this area backwards at 60 but will be at 30 again when you turn back around. The whole first level is similar to this.

I thought it might always be when looking "north" but it's not, it seems to be when you're looking toward your next objective. Going from let's plays on youtube, original hardware doesn't have the slowdown and runs at 60 fps for the whole level.

@OrganicOstrich
Copy link
Collaborator

World Series Baseball 2K3 can be removed as have tested and no performance issues.

@riccardobellitto
Copy link

riccardobellitto commented Jul 17, 2024

Would need a triple buffer patch to address.

I can confirm that enabling the Triple Buffer on the Nvidia Control Panel does improve things, yet sometimes if there's too many enemies or depending on the angle you're facing the boss, the performance drops. I've registered a clip just to show that, hoping will help the devs to fix this issue.

Crimson.Sea.footage.with.triple.buffer.enabled.mp4

@SolusGrimwelder
Copy link

So let me clarify for the commenters what is happening here and why. What you are seeing is a form of V-Sync designed to eliminate screen tearing. It is not a bug in Xemu but the intended behavior one would expect in a double buffered v-sync. Basically if the engine is unable to render the frame in time it simply drops the frame and begins rendering the next one, hence why the frame rate halves. By comparison a triple buffered v-sync will drop the sync if the frame rate drops below a certain threshold, in this case 60 fps. This introduces tearing but allows for potentially higher average frame rates.

Long story short, this is not a bug nor something that needs to be addressed by the Xemu team as it is correctly emulated behavior. The issue is that the computer the emulator is running on is not powerful enough. Every time the frame rate drops in a triple buffered game is where you would see that drop to 30 fps in a double buffered game. An option in Xemu to force triple buffering might potentially make things easier but there is no emulation bug occurring here.

@riccardobellitto
Copy link

So let me clarify for the commenters what is happening here and why. What you are seeing is a form of V-Sync designed to eliminate screen tearing. It is not a bug in Xemu but the intended behavior one would expect in a double buffered v-sync. Basically if the engine is unable to render the frame in time it simply drops the frame and begins rendering the next one, hence why the frame rate halves. By comparison a triple buffered v-sync will drop the sync if the frame rate drops below a certain threshold, in this case 60 fps. This introduces tearing but allows for potentially higher average frame rates.

Long story short, this is not a bug nor something that needs to be addressed by the Xemu team as it is correctly emulated behavior. The issue is that the computer the emulator is running on is not powerful enough. Every time the frame rate drops in a triple buffered game is where you would see that drop to 30 fps in a double buffered game. An option in Xemu to force triple buffering might potentially make things easier but there is no emulation bug occurring here.

I'm sorry, I'm running xemu on a Ryzen 5 5600x with a Rog Strix 3060 12gb and 32gb of RAM @ 3600mhz. Is this build not powerful enough?

Maybe I need to change some settings inside the nvidia control panel or the xemu app, but I don't think the issue is caused by the hardware not being powerful enough.

@PeruvianPanda
Copy link

So let me clarify ...
Ok, I see what you mean, it drop to 30 fps right as it gets to 17ms per frame and if the game is hard coded around running at 60 fps then forcing 30 fps also halves the game speed.

I also thought the specifics of when it happens might point to some inefficiency or whatever causing the performance hit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

7 participants