Skip to content

Tomb Raider Anniversary and Tomb Raider Legend strange framerate drop #7677

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

Open
Nephilim91 opened this issue Apr 12, 2015 · 46 comments
Open
Labels
Performance Unexpected slow performance issues
Milestone

Comments

@Nephilim91
Copy link

I've been trying those two games and both run smoothly at 60FPS either on my PC and Android phone. However certain game actions (or keypresses?) make the framerate drop to about 30FPS and 50% speed, making the games almost unplayable even with a high frameskip. Everytime I roll or everytime I grab onto a ledge AND then try to move laterally this happens (in both games and platforms). Might happen with other actions too. Jumping, shooting and using grappling hook seemed ok.
The strange thing is that no matter what you do, the game will run at 50% speed even after rolling or climbing action is finished. However I noticed that triggering an ingame cutscene solves the issue until one of the actions above is done again. Graphics and other settings doesn't seem to solve or mitigate the problem at all, the game runs approximately at the same speed and FPS with both "low" or "high" settings.
I would have attached a log but it seems no errors or warnings are generated when the issue araises. The errors reported were logged way before or after the mentioned events, so I'm not sure this would be useful

@daniel229
Copy link
Collaborator

Rolling looks fine,did you change any setting other than default.
01

@nfjorgebueno
Copy link

I'm casually playing tomb raider legend ppsspp official version 1.0.1 and it works well, I clarified that my pc is old,I did not try the tomb raider anniversary

@nfjorgebueno
Copy link

Tomb Raider Anniversary probe in the latest builds and fps drop is disastrous, the game also has serious sound problems, I hope to focus on a good game and it fixed some day, greetings, merry christmas

@unknownbrackets
Copy link
Collaborator

If the current FPS is low, the sound will be scratchy, because it's not playing it fast enough. Your only option to improve sound quality is to reduce settings / increase frameskip so that you're not running slow. This doesn't mean there are bugs in sound; it means you're running slow.

I don't have this game, so I can't reproduce. It's possible it is influenced by texture scaling or other options. Try the defaults.

-[Unknown]

@nfjorgebueno
Copy link

thank you very much for your quick reply. will try your suggestion
a greeting

@nfjorgebueno
Copy link

the same problems in the latest versions of ppsspp 1.2.2. I try everything

@LunaMoo
Copy link
Collaborator

LunaMoo commented Aug 27, 2016

As far as I know TR Legend has an actual bug with it's built-in framelimiter which happens on real hardware as well.
Pretty much whenever frameskip kicks in and framelimit changes the speed of the game is affected with a delay causing slowdowns. Workaround(yes on real psp as well) is to force PSP cpu clock to much higher value to keep constant 60fps avoiding the problem.

Either way game bug, not a PPSSPP issue, so this could be closed, not sure about the other game through.
Anniversary does not have this problem on PSP, but does use same engine, since daniel229 did not had that problem in that game if it really does happen it could be caused by some broken settings like multithreading or other hacks.

That or this is another performance issue with trying to run heavy 60fps games on weak devices which is not exactly anything that can be fixed and to make things worse workaround for the game bug makes it even heavier.

@nfjorgebueno
Copy link

my pc strip the dark souls 2 pc the most good. that weak PC is talking to me, the game goes wrong in windows 64bit

@piau9000
Copy link

Yeah. It's a "problem" that happens on real PSP too.
Some games (just like in PC) don't run at full speed on consoles. When this happen they use some sort of frameskip.
To circunvent this you have to overclock the console (a bit tricky and risky).
In PPSSPP you have to go to "settings/system" and in "change emulated PSP's CPU clock" change the value to something higher than 333.
When I played TR Legends I remember that I changed it to "1000" or something. It never caused any glitches so I think that it's safe.
But remember to change it back when playing other games. Some games don't like overclock.

@Leopard20
Copy link
Contributor

Leopard20 commented Jun 22, 2018

@hrydgard @unknownbrackets
I realized that if you turn on Software Skinning the game constantly slows down and its speed never recovers no matter what. But you have to do certain actions for the slow downs to happen. For example, in Croft Manor if you jump on the crates to your right at start you will get a severe slow down.
With it off the game lags every now and then (occasional 0.5 second hiccups) , but on the plus side the speed fully recovers when you get to a smaller area.

@unknownbrackets
Copy link
Collaborator

Are there any log messages at these times?

-[Unknown]

@Leopard20
Copy link
Contributor

Leopard20 commented Jun 28, 2018

@unknownbrackets
There are some errors:
untitled1

The console was constantly spamming the first group of messages when I was using Auto CPU clock speed, after setting it to 333 MHz they stopped (this game needs it to use 60 FPS, but only on PC cuz Android runs ok, which is still weird)

This is how the console looks like after using 333MHz from the start:
untitled2

The other errors appeared when I skipped the intro cutscenes.

No errors in-game though.

I should mention that what I said in the comment above was correct on Android. In my tests on the PC version, the speed fully recovered regardless of Software skinning setting. When it's off, the only difference it makes is that the game lags for just a fraction of a second (like a tiny "freeze") but becomes smooth later. When it's on, the game stutters (frame drop) much longer, but it never "freezes".

If it helps, here are the Vulkan features of my driver:
untitled1
untitled1
untitled1
untitled1

The Vulkan features of my phone are in this issue: #11227

@unknownbrackets
Copy link
Collaborator

static int sceAtracSetDataAndGetID(u32 buffer, int bufferSize) {

The buffer size can't be 0, so that's weird. I wonder if it actually happens on a console, or if it's a symptom of something else.

-[Unknown]

@davewuk
Copy link

davewuk commented Sep 26, 2019

This issue is still very much apparent in the latest build (1.9.0 at the time of writing). It's masked to a certain extent on strong hardware (especially PC) - on my Oneplus 5 the framerate will drop in half and frameskipping=1 is enough to rescue it but on my old Oneplus One it makes the game unplayable.

@hrydgard hrydgard added this to the v1.10.0 milestone Sep 26, 2019
@hrydgard hrydgard modified the milestones: v1.10.0, v1.11.0 May 24, 2020
@hrydgard hrydgard modified the milestones: v1.11.0, v1.12.0 Dec 7, 2020
@hrydgard hrydgard added the Performance Unexpected slow performance issues label Jul 12, 2021
@hrydgard hrydgard modified the milestones: v1.12.0, v1.13.0 Jul 12, 2021
@ghost
Copy link

ghost commented Sep 27, 2022

Still slow...
Screenshot_2022-09-27-09-05-39-61
ULUS10253.ppdmp.zip

@IrfanH495
Copy link

Still slow.
Screenshot_20221011-000720_PPSSPP
but if set cpu 100 i get 30fps
Screenshot_20221011-001029_PPSSPP

@makedir
Copy link

makedir commented May 24, 2023

Same issue, why is there no fix for this so far? The game runs smooth 60fps but then after some random time it slows down to 80% of normal speed until reloading game.

@LunaMoo
Copy link
Collaborator

LunaMoo commented May 24, 2023

AFAIR TR games were an awful ports on PSP platform and they had framerate issues even on real hardware with a workaround in overclocking PSP cpu(which in case of emulation would increase requirements).
Slowdown over time on android could be just throttling to conserve power and have nothing to do with emulation through. Mobiles just aren't designed to run at their advertised speed outside benchmarks and popular games used for marketing reasons.

@hrydgard
Copy link
Owner

Well, that the ports are bad doesn't exclude the possibility of an emulation bug. Or could be both.

@makedir
Copy link

makedir commented May 24, 2023

I dont think this is a throttle issue of the device, the firetv 4k max stick is really cold or just a little bit warm, if running this game. This is also not a FPS issue, the game isnt stuttering as if low FPS, it just "slows down" as a slow motion effect. I dont know what this triggers, it seems random. The game runs smooth in menu, and also first intro loading and when in the starting area standing still. Turning around for a while and jumping around suddenly triggers this problem or not.

@LunaMoo
Copy link
Collaborator

LunaMoo commented May 24, 2023

The game has those slow downs on PSP, it basically has a broken variable framerate that doesn't always compensate speed, the only way to fix it is to ensure it's running at max FPS all the time which can only happen when PSP cpu is overclocked high enough, but that again will increase requirements.

I don't think I'd call an amazon firestick a gaming device, I bought the latest one for my parents to replace their laggy smart TV interface and it doesn't get warm exactly because it doesn't really clock high, perfect device for an older couple, not soo much as a gaming rig.

@davewuk
Copy link

davewuk commented Jun 3, 2023

Well it's nice to see this issue get attention after so long. I tested again today with my Oneplus 7T and windows PC (i7 12700k, 2060 super) and can't reproduce the bug any more. Slower hardware is still very much affected I should imagine as per my comment from 2019. I still have the Oneplus 5 around here somewhere and can test again in the current build if neeeded.

@LunaMoo
Copy link
Collaborator

LunaMoo commented Jun 3, 2023

Problem A: If your problem is a "slowdown", that get's reflected in emulation speed it simply means the hardware you're using is not fast enough, it's usually not caused by any bug and rarely anything can be done to work around it and still have the game emulated correctly.

Problem B: Those TR games have their own issue which can cause slowdown even when emulation speed stays 100% due to real hardware not being fast enough and the fact that it's variable fps is buggy and doesn't always change the speed with framerate correctly on change. It's possible you didn't encounter that issue on different hardware simply because it doesn't happen in the place you tried, but it's there, it's a known issue affecting real hardware which was never fixed by the company who took the money for it, but mostly solved by overclocking PSP CPU(and probably completely solved on PPSSPP due to much stronger OC).

On weak mobile hardware both A and B should be affecting people that try to play it, but enforcing a workaround for the "B" problem would just make "A" problem worse for them so there's not that much point in doing so imo.

@davewuk
Copy link

davewuk commented Jun 3, 2023

It's possible you didn't encounter that issue on different hardware simply because it doesn't happen in the place you tried, but it's there

I know exactly how to reproduce the bug based on my earlier testing. The slowdown occurs happens when Lara hangs from an object and it only resets to full speed if a cutscene plays. This is easily tested in Croft Manor - in the first room, go to the boxes in the corner and jump and hang. On weak hardware the FPS will drop right at this point. Now drop down and stand on the button to trigger the fireplace cutscene. After it plays, the FPS will return to normal.

@IrfanH495
Copy link

still slow on latest build version
@LunaMoo do you have cheat 30fps.
I tried the Japanese version, set the fps using the cpu clock, there is still a drop in fps, if without cheat speed.
_C0 Speed Mod: Quicker
_L 0x216CC8BC 0x3FC00000
https://youtu.be/QzqjolIBdGo
i changed 3FC to 3FA is it safe.?

@IrfanH495
Copy link

Tomb Raider Legend he just has a drop in fps but his speed stays at 100.
Screenshot_20230703-232147_PPSSPP
Screenshot_20230703-232247_PPSSPP

@LunaMoo
Copy link
Collaborator

LunaMoo commented Jul 3, 2023

If you need a cheat to limit FPS because overclocking PSP CPU doesn't help it simply means your hardware is not fast enough, it's no longer just about game issue.
Also exactly why I'm not a fan of activating na PSP CPU OC by default for everyone as a workaround for game bug as it makes it even harder to emulate at least in those moments which are affected by poor port problems.

@matheuswillder
Copy link

I was testing both these games on both my current devices, an old PC desktop and on a low-end Android, and as described by the OP I can see this occur on both devices, but for me the desktop can recover the speed shortly after the problem is triggered but Android cannot, there only after some ingame cutscene.

I've already given up on trying to get these more demanding titles to run well on my current devices other than through more drastic means like underclocking the emulated CPU or using cheats to limit the FPS, but I wonder why the emulation speed can recovers on my desktop but not on Android, I even came here thinking it was an Android-only issue (I was testing with default settings and without using underclocking or any cheat, of course).

@LunaMoo
Copy link
Collaborator

LunaMoo commented Dec 2, 2023

Different hardware has different limitations, you quite likely will hit different bottlenecks between weak android device and outdated/weak pc and also mobiles aren't designed to run at high clocks for a long time. Mobile operating systems will not allow to continuosly use full performance of the device.

Also again, Tomb Raider for PSP is a really bad port which was released in a state that's buggy even on real hardware. Whenever FPS limit changes internally in the game it might not handle it correctly and run at incorrect speed. When underclocking emulated PSP cpu you can only make those internal game problems more common and sewere.

@matheuswillder
Copy link

Different hardware has different limitations, you quite likely will hit different bottlenecks between weak android device and outdated/weak pc and also mobiles aren't designed to run at high clocks for a long time. Mobile operating systems will not allow to continuosly use full performance of the device.

Thanks for the clarification.

Also again, Tomb Raider for PSP is a really bad port which was released in a state that's buggy even on real hardware. Whenever FPS limit changes internally in the game it might not handle it correctly and run at incorrect speed. When underclocking emulated PSP cpu you can only make those internal game problems more common and sewere.

Yeah but not using underclock or cheats also will means not being able run these and also other games, so I am aware of the possible problems and/or downsides this can cause but it is the only solution for me at the moment.

I'll never going to report any problems caused by any configuration other than the default, I just commented that above because I was surprised that this also occurs on the desktop, I came here thinking it was an Android-only issue.

And, as I said, I tested it on default settings just to be sure.

@IrfanH495
Copy link

why didn't I realize it before?.
because I doubt my device can't run 60/60 fps and tried locking fps to 30 using CPU Clock ,the results disappointed me in several maps.
This time I tried locking the Cpu Clock to 200
the results are very good for me.

try it on samasung m20
tomb raider anniversary
https://youtu.be/N2heRXq8a4s?si=BpaVbFa6Rg-kPN6F
most places get 60/60 sometimes down but only 30/30,5?/5? for a while.
if without CPU clock, Just 1xpsp feels heavy

@IrfanH495
Copy link

IrfanH495 commented Dec 7, 2023

sorry for my comment above,.
try it on ppsspp-v1.16.6-423-g7bf8023dc-android
Samsung m20
OS: Android 8.1 (Oreo), upgradable to Android 10, One UI 2
Chipset: Exynos 7904 (14 nm)
CPU: Octa-core (2x1.8 GHz Cortex-A73 & 6x1.6 GHz Cortex-A53)
GPU: Mali-G71 MP2
Can character costumes make fps drop?
I tried comparing character costumes and found a drop in fps in the default costume
all setting default
no compat no cpu clock.
costume Anniversary in the first minute
Costume Croft Manor Sport 3:44
https://youtu.be/u4wP4xj3yXI?si=R5f8xQrBkK-GNubQ

Edit :
It turns out there are quite a lot of costumes that make the fps drop, even though I've used CPU clock to lock the fps.
for more details, try it in the room place to change costumes

@IrfanH495
Copy link

here is a list of costumes that make the game slow.
Anniversary
Legend
Wetsuit
Catsuit
Antarctica 😱😱😱 (PSP exclusive outfits)
Winter Camo 😱😱😱 (PSP exclusive outfits)

if wear this costume, the game runs very smoothly without a drop in fps All default setting.
Camouflage
Doppelganger
Golden
Croft Manor Sport
Scorched Natla
Classic
Camo Shorts (PSP exclusive outfits)

I just tried in the first place.

@IrfanH495
Copy link

Sorry I want to ask.
which graphic is correct?,
I want to report it but don't know which one is correct, I don't have a real psp to view it.

OpenGL looks pretty bright
Screenshot_20231209-222349_PPSSPP

Vulkan looks a bit dark
Screenshot_20231209-222326_PPSSPP

software rendering
Screenshot_20231209-222412_PPSSPP

Frame dump
ULJS00133_0001.zip

@hrydgard
Copy link
Owner

hrydgard commented Dec 9, 2023

Seems likeliest that software and GL have it right here, hm.

@matheuswillder
Copy link

Can character costumes make fps drop?
I tried comparing character costumes and found a drop in fps in the default costume

I also can confirm this in Anniversary, I haven't tested Legend yet. I tested it on my Android device with default settings.

It's quite simple to test, I downloaded a complete save here, opened the game, entered Croft Manor and went to the bedroom (up the main staircase on the left, second door). There you can change the unlocked outfits/costumes. With the default outfit, pressing Circle (to rolling) will triggers the issue. Just change the outfit to one of the mentioned above that doesn't triggers the issue, the FPS will recover, and pressing Circle, even repeatedly, the issue will not be triggered. If you go back and change again to an outfit that triggers the issue, right when you press Circle once again the issue is triggered again.

I've also played around Croft Manor with an outfit that doesn't triggers the issue and the game is quite stable. My device is weak, but just some areas cause some slowdowns and the speed recovers as soon as you leave them. With an outfit that triggers this issue, the game is unplayable.

@IrfanH495 congratulations on discovering and to patiently testing all of this. I think it's enough information to if some dev will look at this issue someday.

@IrfanH495
Copy link

@matheuswillder I also made a video today, so that other people can see what makes the fps drop, playing one stage in the default settings
https://youtu.be/ZfYGRgmerY8?si=khvPvkyi9XV5Zgvb

@hrydgard
Copy link
Owner

Hm, that's really quite interesting!

Also, the sound is really bad for you in that video... it sound worse than it should. I think we really need some time-stretched audio to cover the gaps when it's this close to full framerate...

@IrfanH495
Copy link

I think it's just my device is weak,
I tried changing the texture size of the shirt until it was x3 smaller 32x32, so I can play the anniversary costume, but the result is the same, the fps is still down.
Is there a possibility that it will run smoothly in the future?

@IrfanH495
Copy link

I gave up, the only clue I found was this but it didn't work
Screenshot_20231213-205131_YouTube
maybe I should ask someone to test it
I hope my friend still has it.

@matheuswillder
Copy link

matheuswillder commented Dec 13, 2023

I think it's just my device is weak, I tried changing the texture size of the shirt until it was x3 smaller 32x32, so I can play the anniversary costume, but the result is the same, the fps is still down. Is there a possibility that it will run smoothly in the future?

I gave up, the only clue I found was this but it didn't work

Well if this is caused in some devices because the device is weak, there is nothing that can be done other than the user buying a more powerful device.

However it could also be a bug, and what you discovered about the outfits/costumes "solving" the problem makes it seem like that, but we'll have to wait for a developer to look at this, if they have the game and time to test. As I said above what you've already discovered is enough information in case any developer has time to look at it someday.

This issue is over 8 years old, so I recommend you just go play other games that work on weak devices. I also can't buy any device more powerful than what I have so I'll just playing games that work.

Edit: typo.

@LunaMoo
Copy link
Collaborator

LunaMoo commented Dec 13, 2023

Well, if changing character model(as that's what different costumes essentialy are) causes heavier emulation, it still doesn't mean a bug, it's probably rendered in a different way, possibly using some additional effect.

@IrfanH495
Copy link

IrfanH495 commented Dec 14, 2023

try on ppsspp v1.16.6-539-g0795f6b9e and last build.
turning off the software skinning can solve it
As far as I remember, I've tried it many times but this time it worked.
my device is not powerful enough to record it
Edit 1

Screenshot_20231214-121520_PPSSPP
Sorry, I can only take screenshots for proof.

Edit 2
it seems like some of the costumes are still slow
55fps it was clear the problem was with my device

@sharpliang1980
Copy link

Can character costumes make fps drop?
I tried comparing character costumes and found a drop in fps in the default costume

I also can confirm this in Anniversary, I haven't tested Legend yet. I tested it on my Android device with default settings.

It's quite simple to test, I downloaded a complete save here, opened the game, entered Croft Manor and went to the bedroom (up the main staircase on the left, second door). There you can change the unlocked outfits/costumes. With the default outfit, pressing Circle (to rolling) will triggers the issue. Just change the outfit to one of the mentioned above that doesn't triggers the issue, the FPS will recover, and pressing Circle, even repeatedly, the issue will not be triggered. If you go back and change again to an outfit that triggers the issue, right when you press Circle once again the issue is triggered again.

I've also played around Croft Manor with an outfit that doesn't triggers the issue and the game is quite stable. My device is weak, but just some areas cause some slowdowns and the speed recovers as soon as you leave them. With an outfit that triggers this issue, the game is unplayable.

@IrfanH495 congratulations on discovering and to patiently testing all of this. I think it's enough information to if some dev will look at this issue someday.

Thank you bro! U really solved the problem that has troubled me for many years!

@hrydgard hrydgard modified the milestones: Future-Prio, v1.19.0 Jul 17, 2024
@IrfanH495
Copy link

sorry, i want to ask.
If I play using a gamepad, directing the analog slant to the top right, the character won't run.
if playing without gamepad all controls are fine no problem.
Did I buy the wrong gamepad?

@hrydgard
Copy link
Owner

You might have to adjust sensitivity in "Calibrate Analog Stick" to reach into the corners properly

@IrfanH495
Copy link

Thank you, the analog is now working normally.

@hrydgard hrydgard modified the milestones: v1.19.0, v1.20 Apr 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Performance Unexpected slow performance issues
Projects
None yet
Development

No branches or pull requests