34736384 / genshin-fps-unlock

unlocks the 60 fps cap
MIT License
2.71k stars 211 forks source link

Arlecchino’s Attacks Massively Slow down when going above 60 fps #392

Closed rjtennismaster closed 3 months ago

rjtennismaster commented 5 months ago

Crazy right? You’d expect the opposite. Anytime the fps is set to above 60 fps, Arle’s first 3 normal attacks become very sluggish, and button/mouse mashing no longer works to get them to execute quickly like they should. It’s unfortunately ruined her playability for me, so I had no choice but to stop using the tool and go back to 60 fps🥲

elbadcode commented 5 months ago

lol its not the tool its your PC or game settings. Try setting "SFX" setting in game to low. This controls the visual effects from using character skills and whatnot. Medium and up is poorly coded and causes extreme fps loss even on a high end GPU. Putting to low looks slightly worse but eliminates such issues

rjtennismaster commented 5 months ago

@elbadcode Setting SFX to low didn’t do anything for me, and I already wasn’t getting fps drops. Her attack combo is just slower. Also I have the same settings at 60 in game as I do for 120fps with the tool. Have you tested this out for yourself (Arlecchino)? This is only when hitting enemies by the way.

elbadcode commented 5 months ago

I spent like 20 minutes playing with her in the test mode because her animations are so satisfying. No issues whatsoever at 200 fps. I can even send a clip if you want

rjtennismaster commented 5 months ago

@elbadcode I’d mostly like to get some advice on what you think the core issue might be? Lowering the settings to lowest possible doesn’t do anything either, it’s very strange. I hope it’s not my mouse or something (g pro superlight 4k polling). I’m also running a 3080 just for reference. But sure if you could send a clip of you hitting enemies that’d be great

elbadcode commented 5 months ago

https://github.com/34736384/genshin-fps-unlock/assets/10409982/3c96a0a2-e0de-41b4-8763-0a7fcfb510c6

Looks completely normal to me. On a 4070 so slightly better but not a big difference. Could definitely be related to your mouse. what CPU do you have?

rjtennismaster commented 5 months ago

@elbadcode Thanks for sending, I have a Ryzen 7 5800X. I'm also running a 1080p 240HZ monitor if that matters. I tested a different mouse and I'm still having the same problem though. I'm also going to try on my gaming laptop and see if I get the same issue. Here's a demo of what I'm dealing with just so you have a better idea

https://github.com/34736384/genshin-fps-unlock/assets/57196808/62ac70f3-d516-42cf-8f52-a4e2744d4ecd

https://github.com/34736384/genshin-fps-unlock/assets/57196808/2911f162-91e0-4102-a792-c22438f57be5

I see there's a graphic driver update that was available since the 16th but I'm not too optimistic about that. If it's still happening I'll try reinstalling the game, don't know what else to do 😂

rjtennismaster commented 5 months ago

@elbadcode yeah I just checked on my gaming laptop and the same thing is happening. Tried with 2 different mice too. Is there anyting notable about your Nvidea or in-game settings?

elbadcode commented 5 months ago

Its pretty hard to see what you mean honestly. I'm guessing its more like an input latency issue or frame pacing rather than an actual slowdown. Comparing the videos side by side shows no real differences in nvidia ICAT but I didn't sync them perfectly. I'm also on 240 hz so I'm aware that there can be issues that are felt but not necessarily seen in a video. First thing to consider is DWM vysnc adding input lag. If you're not on windows 11, please upgrade to latest windows 11 and use these settings. The bottom one in particular fixes issues with non-exclusive fullscreen apps. at high refresh rate image

Also consider your fps unlocker settings. I use the borderless option. For nvidia settings I recommend using ultra low latency mode and high power performance with vsync disabled globally. Most other settings should be left alone.

If the issue is truly only with arlecchino and not present on other characters you can try deleting your nvidia shader cache for genshin. To do this you can either use nvidia inspector and set it off specifically for genshin or you can disable it globally. In either case make sure to restart your PC. You may also consider reinstalling the game.

Additionally you can try using RTSS with a keybind to enable a 60 fps cap ingame on the fly. The injector only interacts with the game at launch so if there is a problem its with the game itself and would need to be examined using this method for comparison. There was a similar but far more drastic issue with kokomi a year ago where her normal attacks caused extreme stutters and slowdown above 60 fps. I had to use the keybind to avoid the issue for a full patch but luckily due to 120 fps IOS users having the issue it was fixed.

As for my setup it is worth noting I'm using my own fork of this launcher that automates injection of reshade and 3dmigoto for shader modification. Those mods were not active in the video I sent and there shouldn't be any major differences in the launcher from what I can recall, but you can download the binary from my profile if you'd like to try. Reshade and 3dmigoto are not necessary to use it but can be found by perusing my profile if you wish to use them. I personally play with minimal mods at 240 fps for domains/abyss but otherwise I use RTGI and other heavy shader mods alongside lossless scaling frame generation for visually smooth but higher latency 120-150 fps gameplay

rjtennismaster commented 5 months ago

@elbadcode Thanks so much for making an effort to help me look into this - you really didn't have to so I appreciate it! I disabled v-sync, adjusted the windows setting you mentioned, enabled ultra low latency, and set image settings to performance (was quality). I also started using RTSS to limit the fps to 200, and I've noticed a significant decrease in input lag as well as better frame times.

Regarding Arlec, it seems we're actually dealing with a different problem entirely. The subject is the speed of the first 3 attacks in her combo. After testing this a bunch, I realize that you actually have to time your attack (add a small delay between your first and second clicks) when on >60 frames to reach the same attack speed you get mashing on 60 frames.

In the first combo of the vid with the unlocker (it also happens in one of the later combos too), Arlec stalls after the first hit for a bit, then goes onto the second and the third. But in the vid where I was playing on 60 frames, that stalling after the first hit is not there, and she instantly follows up with a second hit. For optimal play, the stalling after the first hit is detrimental since the player wants to get to the third hit as soon as possible so that they can dash cancel out of it. Even if not dash cancelling, you will get your elemental skill back faster the faster you normal attack - so you want to fit as many of these in as possible. She reaches this third hit at a later time if the combo isn't executed quickly as it should be, causing a dps loss.

I think the stalling happens because with the unlocker, the game is able to receive your input on an earlier frame than it is at 60fps. Example: say Arlec's N1 happens frame 2, and her N2 happens frame 6. This means game will not consider any mouse inputs for the N2 until frame 6. Let's say you're on 60fps mashing; because of the lower frames, the game isn't receiving your mouse input for the N2 until frame 6, but with the unlocker (higher frames), it receives it at frame 4. This means that even though the game gets your input at frame 4, it isn't allowing you to act until frame 6, so your input gets ignored and isn't considered until you click your mouse again during or after frame 6. But unfortunatley, you click at frame 9 instead since it takes time to click a mouse. And BOOM, now you're attacking slower.

In other words genshin lacks a buffer system for inputs. If you act before you're allowed to, your action gets dismissed, and you need to perform it at an "allowed" time for it to be considered. Some other games like smash bros will save your "too early" input, then fire it off as soon as an input is allowed, making for seamless attacking. The big downside to this is that you can't cancel your buffered input - this is probably why hoyo decided not to include a buffer system. But thanks again for helping me experiment and figure this out!

elbadcode commented 5 months ago

Yeah smash is probably the most egregious case of input buffering. This game seems to have a small amount but they may have written frame dependent code for some stuff. I did practice and learn kokomi n2 cancels and diluc/beidou plunge combos on 240 fps but that was no problem after having learned supergliding in apex so I couldn't say for sure if my window was smaller.

Another thing to consider is that this is an online game with similar simulation netcode to an fps or a fighting game with rollback and fps could have an effect on networking. If the send/receive rates are faster than 60 fps, I'd assume they are bc of 120 fps iOS, then as a rule increasing framerate increases bandwidth usage which can increase ping and latency. This isn't always a stable and consistent change so it could throw off game feel