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

Side effects playing the game at 60 FPS #28

Closed
21 tasks done
Polymega opened this issue Aug 28, 2018 · 154 comments
Closed
21 tasks done

Side effects playing the game at 60 FPS #28

Polymega opened this issue Aug 28, 2018 · 154 comments

Comments

@Polymega
Copy link
Collaborator

Polymega commented Aug 28, 2018

You can use this save folder to reference some of the framerate issues mentioned below. Go to <path-to-game>\data\save\ and make a backup of your Folder 01 folder within here. Then, completely replace your Folder 01 folder with this new one.


Important (noticeably affects audio, visuals, gameplay)

  • The fog speed moves twice as fast (too fast).
  • For the Eddie boss rooms, the fog that slowly pours out the holes/vents in the walls is affected by the 60fps fog speed fix (right above). It will create a near-motionless "blanket" of fog on the wall. This would need its own, special adjustment.
    • Solution found by Aero_. Implemented by mercury501.
  • The water animates/moves twice as fast.
    • Water areas: RPT Apartment boss fight, lake water while rowing, and water throughout the Labyrinth/Alternate Hotel.
    • Load save file Data 57, Data 58, Data 59, Data 60 to test. There are many water spots throughout the Labyrinth and Alternate Hotel areas.
    • Solution found by Polymega. Implemented by mercury501.
  • The physics of the bullet casings dropping from the handgun and shotgun become wrong. This causes the SFX of them hitting the ground to wig out. This affects the handgun and shotgun.
  • The "Ritual" prison monster's footsteps go crazy fast.
  • AudioClipDetection can crash the game when playing in 60 fps.
    • Solution found and implemented by Elisha.
  • The animation process whenever James transcribes notes onto his map is twice as fast (too fast).
    • Map transcription areas: Motorhome, BAR Neely's, Town West (at broken bridge), and Hospital Director's Room.
    • Load save file Data 62, Data 63, Data 64, Data 65 to test.
    • Solution found by Murugo. Implemented by Murugo.
  • The intensity/effectiveness of the motion blur is reduced by half.
    • Load save file Data 66, Data 67 to test. These are just two motion blur example spots.
    • Solution found by Aero_. Implemented by mercury501.
  • PS2CameraSpeed moves twice as fast (too fast).
    • Solution found and implemented by Aero_.
  • The visual range of the Lying Figure's spray attack is twice as long. The spray can look like it's hitting James when it actually isn't.
  • The visual range of the Hyper Spray's spray is twice as long. The spray can look like it's hitting enemies when it actually isn't.
  • Enemies that hold you in place for attacks do twice as much damage. This is due to damage being accrued per frame. This can make the final boss unbeatable in certain situations.
    • Enemies that hold you in place: Flesh Lips, Abstract Daddies, Final Boss (tentacle choke and moth attack [?]).
    • Load save file Data 1 to test Flesh Lips. Load save file Data 2 to test Abstract Daddies. Load save file Data 3 to test Final Boss.
    • Solution found by Murugo. Would need to be implemented.

Other

  • The flashlight's light turns on and off twice as fast.
  • The flashlight dies out twice as fast in the prison bug room.
  • The low health indicator flashes twice as fast.
  • The flames in Angela's staircase move twice as fast, and the "animated lights" in this room (such as seen on James/Angela) move twice as fast.
  • The water drains twice as fast at the end of the RPT Apartment boss fight.
  • The water rises twice as fast when the Alternate Hotel elevator door opens.
    • Load save file Data 4 to test. Go in the elevator and go to the Basement (B) Floor.
    • Solution found by Polymega. Implemented by mercury501.
  • The time in which the game shows the pre-cutscene death animation of Eddie is cut in half.
  • For the Eddie boss room, the physics of when the hanging meat is hit moves the meat twice as much/far.
    • Solution found by Aero_. Implemented by mercury501.

FMVs

  • FMV playback is affected if FMVs are saved as 60 fps. We only want one version of the FMV Enhancement Pack to maintain, so if we make the FMVs 60 fps we need to ensure 60 fps FMVs can also playback correctly if the game is set to 30 fps, for those that want to play at its original framerate.
    • Here is a test FMV at 60 fps. Go to <path-to-game>\sh2e\movie\, make a backup of toilet.bik, then replace it with this test 60 fps version. You can easily test this FMV by starting a new game or by watching "James in the Restroom" through the game's "MOVIE" menu found on the title screen.
    • Solution found by Aero_. Implemented by mercury501.

To help visualize the to-do list a bit easier:

Issue 1.0 Fixed? 1.1 Fixed? DC Fixed?
The fog speed moves twice as fast (too fast). ✔️ ✔️ ✔️
For the Eddie boss rooms, the fog that slowly pours out the holes/vents in the walls is affected by the 60fps fog speed fix (right above). It will create a near-motionless "blanket" of fog on the wall. This would need its own, special adjustment. ✔️ ✔️ ✔️
The water animates/moves twice as fast. ✔️ ✔️ ✔️
The physics of the bullet casings dropping from the handgun and shotgun wig out. ✔️ ✔️ ✔️
The "Ritual" prison monster's footsteps go crazy fast. ✔️ ✔️ ✔️
AudioClipDetection can crash the game when playing in 60 fps. ✔️ ✔️ ✔️
The animation process whenever James transcribes notes onto his map is twice as fast (too fast). ✔️ ✔️ ✔️
The intensity/effectiveness of the motion blur is reduced by half. ✔️ ✔️ ✔️
PS2CameraSpeed moves twice as fast (too fast). ✔️ ✔️ ✔️
The visual range of the Lying Figure's spray attack is twice as long. ✔️ ✔️ ✔️
The visual range of the Hyper Spray's spray is twice as long. ✔️ ✔️ ✔️
Enemies that hold you in place for attacks do twice as much damage. ✔️ ✔️ ✔️
The flashlight's light turns on and off twice as fast. ✔️ ✔️ ✔️
The flashlight dies out twice as fast in the prison bug room. ✔️ ✔️ ✔️
The low health indicator flashes twice as fast. ✔️ ✔️ ✔️
The flames in Angela's staircase move twice as fast, and the "animated lights" in this room (such as seen on James/Angela) move twice as fast. ✔️ ✔️ ✔️
The water drains twice as fast at the end of the RPT Apartment boss fight. ✔️ ✔️ ✔️
The water rises twice as fast when the Alternate Hotel elevator door opens. ✔️ ✔️ ✔️
The time in which the game shows the pre-cutscene death animation of Eddie is cut in half. ✔️ ✔️ ✔️
For the Eddie boss room, the physics of when the hanging meat is hit moves the meat twice as much/far. ✔️ ✔️ ✔️
FMV playback is affected if FMVs are saved as 60 fps. ✔️ ✔️ ✔️
@AeroWidescreen
Copy link
Collaborator

Honestly, this is going to require a lot of patching and research and I'm not sure I can fix everything either. If I were to attempt this I would need help.

PS2CameraSpeed doesn't work, as you already know, but gosh it'd be nice to have a functioning version for 60 FPS, as well. It's almost unbearable to go back to the PC version's vanilla camera speeds after being spoiled by this mod.

The bullet casing SFX wigs out, as you already know. This affects the handgun and shotgun.

The flashlight dies out very quickly in the prison bug room.

I've fixed these during my own private testing.

The "Ritual" prison monster's footsteps go crazy fast.

I know for a fact I can't fix this. I spent all day trying and found nothing. I thought maybe this was the only problem remaining, but with the other things you've listed I'm afraid I'm going to have trouble fixing those as well.

There's a framerate variable the game uses to determine the speed of many, many things, but apparently the ritual monster isn't one of them.

@Polymega
Copy link
Collaborator Author

Oh, for sure. I didn't mean to overwhelm you with this but wrote this all down for posterity for you or anyone else curious to know how 60 FPS affects things. TBH work on this ought to be lower on the list anyways.

@filipinowhiteboy
Copy link

Do you know of a way to remove the shell casing sound effect? For me, it's the only offender when playing that 60 fps.
I've tried editing the sddata.bin file myself and I found the shell casing sfx in question (It is sddata349.wav which not noted in the audio mapping so here you go).
I tried deleting the file first before merging the rest into a new sddata file. But the sfx trigger for the shell casing was moved to the next available file, (sddata350.wav) which is a chainsaw sound effect.
I tried deleting the contents of sddata349.wav while leaving the file to be merged but the problem still persists. Any idea what to do?

@Polymega
Copy link
Collaborator Author

Polymega commented Aug 28, 2018

Yes, if you delete the file all other sounds are moved over to fill the space. So sddata350 then becomes sddata349 in the game, sddata351 becomes sddata350, etc.

You simply need to create a silent .WAV file and save it out as sddata349.wav. Be sure you save it as a mono (not stereo) wave file. The length of the silent audio file shouldn't matter here.

Then, repeat the process of re-packaging the sound files to a new sddata.bin and you're good to go.

@filipinowhiteboy
Copy link

filipinowhiteboy commented Aug 28, 2018

I see. I thought deleting the content in sddata349.wav and saving it as a blank wav file would be enough though. Am I doing something wrong?

@Polymega
Copy link
Collaborator Author

Polymega commented Aug 28, 2018

I thought [...] saving it as a blank wav file would be enough though

Are you just renaming a blank .txt to .wav or something? That would be the problem why, then. You'll need an actual, legit silent audio .wav file for it to work.

You can open a short .wav file in Audacity, select the track image, click the "silence" button image, and save it out as sddata349.wav. Just be sure to save it as mono and not stereo.

Edit: Here's a roughly 1-second silent .wav file for you to use: sddata349.zip

@Polymega
Copy link
Collaborator Author

Polymega commented Aug 28, 2018

I thought [...] saving it as a blank wav file would be enough though

Oh, I think I understand now. You deleted the entire track of sddata349.wav and saved it out as-is? If so, there's no track for the game to play then, so it won't work. There needs to be a track for sddata349. So make it a second or two of silence. When you open the track in Audacity, you need to see some sort of track, if that makes sense.

Edit: Here's a roughly 1-second silent .wav file for you to use: sddata349.zip

@filipinowhiteboy
Copy link

filipinowhiteboy commented Aug 28, 2018

I see. Thank you for specifying....and for the instruction on how to create a silent wav file. ^_^

EDIT: Works like a charm! thanks for telling me what to do.
Like I said, I find the shell casing sound effect to be the only problem. The other issues you described seem rather negligible. The game is quite playable at 60 fps after the sfx is removed

@kartur
Copy link

kartur commented Aug 31, 2018

This is to be expected due to my aging GeForce GTX 670 FTW

I have a GTX 1060 and expierience framedrops when playing with 60fps, also in SH3. I don't think it's really our hardware not able to keep up with a 15 years old PC game. :)

@Polymega
Copy link
Collaborator Author

True. :) I can't speak for SH3, but I know forcing SH2 PC to run on a single core doesn't take advantage of multi-core processing to help with performance. But we must run the game on a single core to alleviate the severe sound loop bug.

@Keith94
Copy link

Keith94 commented Aug 31, 2018

I'm curious to see the fixes Aero has planned for us. 60 FPS is the only way to play :)

@Polymega
Copy link
Collaborator Author

There's potential for some more really nice fixes down the line thanks to Aero, Elisha, Bigmanjapan, and others. :)

@kartur
Copy link

kartur commented Aug 31, 2018

Actually I think I have to revoke what I said earlier. Last time I tried playing with 60fps was one or two years ago, now (perhaps due to the opengl-wrapper?) it actually runs pretty smooth (tested for about 10min).

CPU-Load on Core 0 is always 100%, it doesn't matter if 30 or 60 FPS
GPU-Load is 10-25%

desktop 2018 08 31 - 23 56 14 01 mp4_snapshot_00 41_ 2018 09 01_00 13 49
desktop 2018 08 31 - 23 56 14 01 mp4_snapshot_02 27_ 2018 09 01_00 14 18
desktop 2018 08 31 - 23 56 14 01 mp4_snapshot_04 16_ 2018 09 01_00 14 53

@filipinowhiteboy
Copy link

I've been getting fairly consistent FPS myself. The streets are the only areas where the the fps....doesn't drop but hitch for a fraction of a second and it doesn't happen often.

@OregonPacifist
Copy link

OregonPacifist commented Sep 1, 2018

Can anyone link the edited sound file (replacing the bullet casing sound with silence) on here for easy access? I’d love to be able to play either 30 or 60 fps with as little trouble as possible.

@filipinowhiteboy
Copy link

OregonPacifist, Polymega posted a link to the edited sddata file a few comments up. Just remember to back up your original sddata file before using it.

@OregonPacifist
Copy link

@filipinowhiteboy thanks for the reply. I was looking for an already edited version of sddata.bin. The only file I saw that was posted is a silent sddata349.wav file.

@filipinowhiteboy
Copy link

filipinowhiteboy commented Sep 1, 2018

@OregonPacifist Oh! I see. Give me a second, I'll link mine.

EDIT: Here you go
https://drive.google.com/drive/folders/10NfcCB73bsNDkchRLHAY8B7_myTcBIwd?usp=sharing

Now remember, You want to backup your old sddata file in case you change your mind and want to keep the sfx and play at 30fps. Also, the sddata file I sent you, must be placed in the sh2e/sound folder. This file will NOT work with the main sound from the data folder.

@OregonPacifist
Copy link

@filipinowhiteboy Thanks for the link. I haven't used any audio editing software before and don't have enough time to learn it lol. I will be sure to save the two different versions of the file separately in case I want to play 30 or 60 FPS. You've just made my day!

@filipinowhiteboy
Copy link

@OregonPacifist You're welcome. Let me know if there's a problem.

@DonelBueno
Copy link

Are all these issues still present in the latest release when playing at 60 fps?

@filipinowhiteboy
Copy link

@DonelBueno Yes, it is. I think they might have updated the enhanced sound file recently. I might have to make a new version of the sdata file if they did.

@Polymega
Copy link
Collaborator Author

Besides any issues checked off, they are still present in the game, yes.

@illusion0001
Copy link

illusion0001 commented Oct 21, 2021

I would like to have some sort of a starting point to improve and try to fix the various issues that is caused by high framerates, @AeroWidescreen would you be able give me some help with that? Also in need of save files to diagnose the various issues.
As a sidenote, is there a way to boot the game with a breakpoint set on a specific instructions on startup?

@Polymega
Copy link
Collaborator Author

Polymega commented Mar 21, 2023

@Murugo
I've been doing some final tests to prepare for our project's hotfix and found a new 60 FPS issue. Sorry to ask, but could we get your help on this?

The issue: When played at 60 FPS, if you skip the PC credits FMV it'll also skip over the Game Results stats screen and take you directly to the "Save clear data" screen. If you let the PC credits video play out, it'll correctly take you to the Game Results screen.

Pro-tip: If needed for testing, make a backup of your credits.bik video, then copy toilet.bik and rename it to credits.bik for testing.

@Polymega Polymega reopened this Mar 21, 2023
@Polymega
Copy link
Collaborator Author

I think I understand what's happening: After the PC credits FMV three other screens then happen: Game Results screen > "Save clear data" > Save screen.

If you keep the Esc/Pause button held down after skipping the PC credits FMV it'll also skip over the next two screens, taking you to the last screen (Save Screen). What's happening is when you press Esc/Pause to skip the PC credits FMV, if the button is held down for even a fraction too long it'll skip over the Game Results screen. Hold it down a bit longer than that? It'll skip the next two screens, bringing you to the final Save Screen.

I think because fade times are a smidge quicker at 60 FPS, it reduces the "tolerance time" in pressing the Esc/Pause button on the PC credits FMV.

Here is a save folder with all the endings. The DOG ending is the quickest way to constantly test this:
http://www.igotaletter.com/temp/sh2pc/TranslationGuide/SH2PC_Translation-Guide_Save-Files.zip

@mercury501
Copy link
Contributor

mercury501 commented Mar 21, 2023

@Polymega do you think it could be a solution to this to hide the SKIP input from the game when holding the key? With the InputTweaks feature it could be done easily

edit:
we already do something similar for a quick save bug https://github.com/mercury501/Silent-Hill-2-Enhancements/blob/d2b7d0968842673b7c695b7491083940a0d744d2/Patches/InputTweaks.cpp#L290

@Polymega
Copy link
Collaborator Author

Polymega commented Mar 21, 2023

@Polymega do you think it could be a solution to this to hide the SKIP input from the game when holding the key?

Certainly worth a shot! I'm not sure how to word/describe this right, but can you whip something up that does the following?

If a user presses KEY_SKIP/KEY_CANCEL during an in-game FMV (EventIndex == 15 /*In-game FMV*/), you would want to initially register the input but then "ignore" the state for as long as the input is held down. Once let go, the whole thing is either reset if EventIndex still equals 15 (for whatever reason) or this fix is disabled when EventIndex does not equal 15.

@elishacloud
Copy link
Owner

elishacloud commented Mar 21, 2023

My only concern with that is how often the game picks up key inputs. It looks like there are two threads picking up key inputs, so inputs are checked twice a frame. I recommend keeping the input for at least one frame and then dropping the other inputs if the key press continues longer than a frame.

Hopefully, the game is able to pick up key presses every frame and does not skip picking up inputs for a frame if the system is too busy. Would be nice if we could control how many frames the input can remain before we skip the input. Just a thought...

@mercury501
Copy link
Contributor

Right Elisha.
Here is a build:
d3d8.zip
Basically I save the Event Index every frame, counting how many frames it has lasted if it's EVENT_FMV.
Then Escape and Cancel are checked, and if they're held down and the EVENT_FMV has lasted a configurable amount of X frames, it clears both inputs.

@Polymega
Copy link
Collaborator Author

Unfortunately it's still skipping over the Game Results screen. Make a backup of your .\data\save\Folder 01\ folder then place this Folder 01 folder in its place: http://www.igotaletter.com/temp/sh2pc/TranslationGuide/SH2PC_Translation-Guide_Save-Files.zip

Open the "ReadMe" in that folder to know which save is for which ending. Launch the game and it's easiest to test with the DOG ending. Trigger the ending, get to the PC credits FMV and press/hold Esc/Pause on the FMV. You'll see it jumps over the Game Results screen and takes you straight to the Save screen.

@mercury501
Copy link
Contributor

Ok my bad, I was testing with that save but tested only the FMV for some reason...
Here's another build, seems to work fine to me:
d3d8.zip

@Polymega
Copy link
Collaborator Author

Nice one, mercury! Quick tests and things seem to be great. So I think the next question is: Should this belong only in the 60 FPS feature, or should it be included into a different feature or made into its own thing? Because technically this issue can happen at any framerate.

Once we get that decided, if you can please send Elisha a PR he'll then get everything together into one test build and I'll get to testing everything. Thanks for chiming in and helping out with this, friend!

@mercury501
Copy link
Contributor

mercury501 commented Mar 21, 2023

Anytime, the InputTweaks framework has become quite useful, I'm happy about that.
Right now it's going to be enabled when InputTweaks is enabled, so then:
EnableInputTweaks = (EnableToggleSprint || EnableEnhancedMouse || EnableMouseWheelSwap || MemoScreenFix)

Don't know if it's worth to make a setting just for this. Should we maybe transform MemoScreenFix in some more generic, QOL input changes setting?

@Polymega
Copy link
Collaborator Author

Right now it's going to be enabled when InputTweaks is enabled

Sounds great to me!

Don't know if it's worth to make a setting just for this. Should we maybe transform MemoScreenFix in some more generic, QOL input changes setting?

Ahh... I don't think so. Unless anyone objects, I'd say not to worry about breaking up or renaming things.

@mercury501
Copy link
Contributor

Right on then, I'll make a pr in a bit then!

@MasterDarkseid
Copy link

So the skipping result screen. wasn't because of my controller but a bug interesting.

@Polymega
Copy link
Collaborator Author

Polymega commented Jul 6, 2023

you-guys-are-the-best-javi-garcia

@Polymega Polymega closed this as completed Jul 6, 2023
@matheusvb3
Copy link

matheusvb3 commented Sep 9, 2023

@Polymega I think I might have found another side effect of playing the game at 60FPS that went unnoticed: when you do the "swing sideways" attack with the steel pipe and hit an enemy, James' "recoil" animation plays at a higher speed, allowing you to attack in EXTREMELY quick succession. It's really, really funny to see, I highly recommend you try it out. You can even make the animation of the enemy you're attacking glitch out with how fast James batters them (which is what clued me that something may have been wrong in the first place).

Edit: actually, I was incorrect about the animation thing, it's the nurse's animation when hit with a melee weapon on their left side that is glitchy, 60FPS just makes it more apparent! It can also happen when you hit them with the wooden plank.

ETA 2: also there's a problem with padlocks in puzzle screens when playing in 60FPS, but I believe you might already know that since it's very easy to notice (mouse clicks get registered twice, thus you rotate two numbers in the number wheels when clicking).

@Polymega
Copy link
Collaborator Author

Polymega commented Sep 9, 2023

Huh, would you look at that. Left is 30 FPS, right is 60 FPS.

2023-09-09.14-48-39000-1.mp4

I personally feel this isn't an issue worrying about. I say this for two reasons: 1) Most people don't even know about this attack and 2) even at 30 FPS, it still swings pretty darn fast, so what's a little faster at that point? 😏

I'll ping @Murugo about this so he's aware and leave it in his hands over whether or not it's worth addressing. I personally don't think it's that big of a deal, but Murugo should be the one to decide.

Edit: actually, I was incorrect about the animation thing, it's the nurse's animation when hit with a melee weapon on their left side that is glitchy, 60FPS just makes it more apparent! It can also happen when you hit them with the wooden plank.

Do you mean how it appears as if their spines are breaking (as their torso "falls back") after being hit like that? If so, I think that's intentional.

ETA 2: also there's a problem with padlocks in puzzle screens when playing in 60FPS, but I believe you might already know that since it's very easy to notice (mouse clicks get registered twice, thus you rotate two numbers in the number wheels when clicking).

Hmm... I don't experience this problem. And from other people I've watched stream the project with the 60 FPS feature, I haven't seen them experience this issue, either.

@matheusvb3
Copy link

matheusvb3 commented Sep 9, 2023

Do you mean how it appears as if their spines are breaking (as their torso "falls back") after being hit like that? If so, I think that's intentional.

No, it's not that. Their head "glitches out" and almost becomes disjointed from their body, it's very easy to notice. I'll try to capture it with OBS to show you.

Edit: well I can't get the game to stay at 60 when recording. I'll see if I can do a hack job with my cellphone.

Hmm... I don't experience this problem. And from other people I've watched stream the project with the 60 FPS feature, I haven't seen them experience this issue, either.

🤔 Well that's weird. I'll also try to capture this to show you. I noticed it happening in the "Louise" box, but I'll see if it also happens in the hotel briefcase as well.

@Polymega
Copy link
Collaborator Author

Polymega commented Sep 9, 2023

No, it's not that. Their head "glitches out" and almost becomes disjointed from their body, it's very easy to notice. I'll try to capture it with OBS to show you.

Gotcha. I was hitting them with a light melee using the plank. You meant with hard melee. I checked against PS2 version and it's an intentional animation:

2023-09-09.15-32-22.mp4

@matheusvb3
Copy link

matheusvb3 commented Sep 9, 2023

Gotcha. I was hitting them with a light melee using the plank. You meant with hard melee.

😬 Welp I'll be damned, sorry, but you were right, I was indeed referring to the "spine breaking" animation, I just thought of it less as a "spine break" and more as a "head gets sent flying to the stratosphere" animation which is why I thought you were referring to something else. I'm very sorry for the confusion.

2023-09-09-17-03-12.mp4

You can see it in this video right at the beginning, her head and back get sent flying back at ludicrous speed, which I thought could've been a glitch. Pay attention specially to the third blow I deal to her.

It's even more noticeable when you're battering them at Mach 5 speed with the pipe. In 30FPS I can't remember it being this apparent. (Also I managed to get OBS to record at 60 without the framerate dropping, woohoo! But I had to reduce the game's resolution...)

Edit: about that one with the strong hard you posted above, yeah I figured that one was intentionally made like so as a homage to that gurney scene in Jacob's Ladder. In all Team Silent games they have enemies with that sort of crazy twitchy movement going on.

@matheusvb3
Copy link

🤔 Well that's weird. I'll also try to capture this to show you. I noticed it happening in the "Louise" box, but I'll see if it also happens in the hotel briefcase as well.

2023-09-09-23-04-08.mp4

Here I'm clicking only once and pausing between clicks, yet the number wheel will quickly jump two numbers sometimes.

@matheusvb3
Copy link

@Polymega Not sure if you saw these messages above? 😬

@Polymega
Copy link
Collaborator Author

For the double input:

  • If you play the game at a much lower resolution and don't have things like OBS running in the background, does it still happen?
  • Does it happen with a controller?
  • Does it happen with keyboard?
  • Would it happen with a different mouse?

@matheusvb3
Copy link

matheusvb3 commented Sep 11, 2023

If you play the game at a much lower resolution and don't have things like OBS running in the background, does it still happen?

Yes, even at the lowest resolution with no other programs open.

Does it happen with a controller?

Well, unfortunately I can't test this because I still haven't solved this issue... Sorry.

Does it happen with keyboard?

No.

Would it happen with a different mouse?

It does.

Also I just tested it and it does happen at 30FPS, for some reason I just cannot remember ever facing this issue before. Really, I think this must be something new. And no, it does not happen when using the mouse to skip dialogue or interact, it only happens in the puzzle screens (so far I've had this happen at the Louise box and the keypad to the hospital 3rd floor patient wing, I still haven't gotten to the hotel briefcase edit it does happen with the hotel briefcase too).

I can make a new issue if you want since this isn't 60FPS-related.

Edit: or rather, since this is just such a freak incident that hasn't affected anyone else, we can maybe just forget about it and attribute it to SH2 PC being weird. It's just a very minor inconvenience really.

@Murugo
Copy link
Contributor

Murugo commented Nov 6, 2023

I personally feel this isn't an issue worrying about. I say this for two reasons: 1) Most people don't even know about this attack and 2) even at 30 FPS, it still swings pretty darn fast, so what's a little faster at that point? 😏

I'll ping @Murugo about this so he's aware and leave it in his hands over whether or not it's worth addressing. I personally don't think it's that big of a deal, but Murugo should be the one to decide.

From what I can tell, every melee attack is slightly faster in 60 FPS (at least with the wooden plank and steel pipe, possibly others). This is more apparent with the steel pipe since the rebound from the swing animation is very fast. There are a few reasons for this:

  1. Depending on where the player or enemy is standing, the hit can occur 1 frame earlier in 60 FPS. This is a side effect of checking collisions twice as often.
  2. There is a 2-frame delay between when the hit is detected and when the rebound animation starts playing due to state changes specific to melee weapons. In 60 FPS, this transition effectively happens 2 frames faster.
  3. The follow-up attack when holding down the button might also happen 1 frame earlier in 60 FPS.

Solving this fully would be difficult due to the sheer number of corner cases.

This isn't a solution per se, but there is a way to compensate for the time difference by delaying the rebound animation by a number of frames. To test this out: sh2pc-1.0-delay-melee-rebound.zip

I'm not too happy with this approach right now because:

  • It is still prone to desync comparing 30 vs. 60 FPS.
  • There is a bug where holding up or down while performing an overhead or jab will cause James to be stuck in the animation indefinitely.
  • The swing might look like it is phasing through the target. This can be seen at 30 FPS, but it is much more apparent at 60 FPS with the cheat enabled.
PatchComparison.mp4

@Polymega
Copy link
Collaborator Author

Polymega commented Nov 10, 2023

We talked about the pipe swinging thing more behind-the-scenes and have decided, at this time, to not change anything about it. There's no obvious "elegant" way to handle this and we don't feel great about the solutions presented to us for this. The silver lining to this is that very, very few people know about this attack and it can only be used in one Action Mode, so we're not overly worried about leaving it as-is.

@matheusvb3
Copy link

Very interesting breakdown, I hadn't actually noticed all other melee attacks are faster too. Thanks for all the info.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests