Closed Polymega closed 1 year ago
@matheusvb3 you can test my build here, where are implemented the fixes listed in the first post with my name on!
Would be useful if you could test with other versions of the game exe, maybe @Polymega can hit you up with those.
I'm doing quick tests for compatibility as things are added, but I'd probably recommend waiting until we get everything implemented into one build then doing serious tests.
It not only kills 20 birds with one stone, but will also test to ensure none of these FPS fixes are interfering with each other once they're all implemented (they shouldn't, but you never know).
You can see status of this in the table a few posts up. Mercury and Murugo are adding to this as they have time.
Ok, I'll wait until everything is sorted out. Though I really wanted an excuse to do another playthrough. :)
By the way Polymega, I asked you something in the mouse controls ticket, I'm not sure if you saw it.
Hi all, our great @Murugo pushed a PR and I merged it into my branch. I don't have time to test it, but here's the build: d3d8.zip Cheers!
Murugo, you sexy person, you! Thank you so much!
Oh, also @Murugo
However...... In regards to the fade-in/-out speeds between entering new rooms, I also noticed at 60 fps you can sometimes see Maria "spawn in" to the next room you enter. The fade-in is just quick enough to catch this if you know what you're looking for.
I looked into this some more and it doesn't appear to be an issue of Maria spawning in. It's actually an animation thing. If Maria was walking or running in the previous room/area, she will load into the next room with that animation still active. So what I was seeing are the few frames of Maria's body "resetting" from her walking/running pose to her standing/idle pose.
I believe this is never really noticed on console because those versions have slower fade-in times than our FastTransitions
fix. And having fast, snappy fade speeds is definitely more important to keep. Also, upon further testing, I could see this at both 30 and 60 fps with FastTransitions
. So, this is not the issue I thought it was.
This is a long way to say, "Nevermind... don't worry about it!"
@elishacloud Do you remember how you "froze" a frame of the game image and held it in place for a few extra frames during camera changes to fix post-processing and environmental "flickering" during certain cutscenes? It looks like we may need to do this very thing for certain cutscenes while playing in 60 fps.
There will likely be others we may need to "hand adjust" but, for the moment, I've tested the most obvious/worst cutscene offender in 60 fps.
I tried to remember how you did this back in the day, and found this code as reference. If I'm reading the code correctly, unless special addresses are needed, all you need is the Cutscene ID and the current cutscene camera pos to hold? If that's correct:
These adjustments could possibly be added to the RemoveEnvironmentFlicker
fix.
0x0E
Mercury sent a PR for general tweaks/fixes to improve issues with this cutscene when played at 60 fps. To start, may I ask you to merge his PR? Then...
Hold the end of Camera 4 (GetCutscenePos() == -22134.50391f
) for four (4) frames:
Hold the end of Camera 5 (GetCutscenePos() == -21376.56445f
) for two (2) frames:
^ Note: Mercury's PR fixes the issue of the closet bars turning light gray on the last frame before this camera change. But we still need to hold the last frame of this camera angle due to the issue of the closet bars staying in front of James' face for a few frames after the camera change.
0x16
You've actually already adjusted this cutscene (and the camera cut mentioned below) as part of the RemoveEnvironmentFlicker
fix. It's just that this particular camera cut would need to have its last frame held a little longer.
Hold the end of Camera 1 (GetCutscenePos() == 5242.379883f
) for four (4) additional frames to what you're already holding it for:
0x44
Whenever cutscene 0x44 ends (regardless of whatever camera cut was last), hold that last cutscene frame for six (6) frames:
Perhaps the length the these frames are held on to should be halved when played in regular 30 FPS? I'm not sure how best you'd like to approach that...
Thank you!
@elishacloud Do you remember how you "froze" a frame of the game image and held it in place for a few extra frames during camera changes to fix post-processing and environmental "flickering" during certain cutscenes? It looks like we may need to do this very thing for certain cutscenes while playing in 60 fps.
Yes, I all I did was skip the Present()
function. You can see the code here. I also used this for shaders when changing brightness settings, see here. But I don't think this is the best idea unless there are frames that have garbage data on them or frames that you don't want the user to see.
or frames that you don't want the user to see.
It would be for this reason, similar to what you did to resolve the environment "flickering" in another fix (by holding the last "good" frame for a few extra frames).
Check out the video clips I included in the post above to see why this is requested; as otherwise you'll see some visual jank during camera cuts at 60 fps.
We may need to do this for a few other cutscenes at 60 fps. I'm not sure yet as I need to test them all. But I wanted to see if this already-established method can resolve this one cutscene well before moving on to the other ones.
Hi all, I've implemented the motion blur fix, fmv fix and the bug room flashlight fix, here's a build for those interested: d3d8.zip
New additions look/work great with 1.0! Thank you!
@elishacloud
Good news! I only found three cutscenes that need adjustment, which could maybe be added to the RemoveEnvironmentFlicker
fix? Please see my post further up for details.
@AeroWidescreen I did find one other 60 FPS issue that might deserve some special attention. The moment you kill Eddie, you see him do a brief death animation before the actual cutscene of his death takes places. At 60 FPS, the time in which the game shows this pre-cutscene death animation is reduced by half.
It might be worth preserving the original time the game stays on this pre-cutscene animation of Eddie's death, as it's a pretty important/pivotal moment in the game for James/the player. May I ask if you'd be willing to look into this?
I wanted to ask @Murugo some help with your solution from https://github.com/elishacloud/Silent-Hill-2-Enhancements/issues/28#issuecomment-1306880038, since I'm not that experienced with x86 asm, and the editor is throwing me errors on that snippet.
@mercury501 The code snippet I shared is missing a couple addresses required for the __asm
block. I think I have a working solution using the delta time factor mentioned here. I'll create a follow-up PR soon.
@Murugo that's great, that should be the last piece missing! Feel free to modify the last commit from the 60 fps branch
18 tasks done good job team, You really did a good job. A job that Konami never did in the SH HDC.
Does this mean that the 60 FPS mode is almost ready for release?
I did find one other 60 FPS issue that might deserve some special attention. The moment you kill Eddie, you see him do a brief death animation before the actual cutscene of his death takes places. At 60 FPS, the time in which the game shows this pre-cutscene death animation is reduced by half.
@mercury501 @Murugo
This issue can be solved by doubling the time limit from 0x28 (40 int) to 0x50 (80 int) when 60fps is used. This likely works because the timer is increasing at twice the speed at 60fps. I'm not sure if I like this solution though, as I would rather keep the time limit the same, but it's possible that's just the way it works. If you guys think this solution is acceptable then feel free to implement it, otherwise I'll continue searching for a different solution.
Here's a build with @Murugo's latest work on grab double damage: d3d8.zip
@AeroWidescreen I'd have to see what that value's used for, I don't really know off the top of my head, maybe @Polymega can help
@mercury501 Favor to ask: Can the FMV fix you've implemented be moved out and turned into its own, dedicated fix?
We should have the FMVs playback correctly, regardless of their framerate, independent of the game's framerate. This will cover our backs if we ever make the FMVs 60 FPS and someone decides to play the game in its original 30 FPS framerate.
@AeroWidescreen I'd have to see what that value's used for, I don't really know off the top of my head, maybe @Polymega can help
I believe this instruction is only used for this part of the game, but Aero would be the man to know about this. I'm going to assume Aero's already done his research on whether or not this instruction is used elsewhere?
@Polymega sure thing, do you want to put it in a setting or should I leave it hidden, default true?
I'm not sure... What do you think?
On the off chance it might break something for someone, if we make it an adjustable setting, we could then tell them to disable the feature to see if it fixes their issue.
I agree, I'll put it under game fixes.
I've implemented the fix @AeroWidescreen suggested, didn't test it tho: d3d8.zip
There's also the separate setting for the fmvs!
Timing looks correct! Thank you Aero_ and Mercury.
I'd have to see what that value's used for, I don't really know off the top of my head, maybe Polymega can help
Yeah, that value is responsible for how long the camera remains focused on Eddie after you defeat him. It's his slow motion death sequence that lasts for about 2 seconds before the actual cutscene begins. It's completely safe to change this value; I was just interested in seeing if there was a different way to fix it. Anyway, I couldn't find another way of doing it so it doesn't matter now.
I've implemented the fix @AeroWidescreen suggested, didn't test it tho.
Working well on my end. Assembly code looks good. Thanks.
@mercury501 Thank you so much for fixing these outstanding 60 FPS issues! And with that...
THANK YOU Aero_, Murugo, and Mercury for your hard and outstanding work on this! This one is going in the books, right up there with dynamic resolution, soft shadows, and HD assets. 😁 😁
It's DONE!? Holy smokes! I can't wait to play this!
60 FPS work is done!!! 🥳 🎆 🍻
THANK YOU Aero_, Murugo, and Mercury for your hard and outstanding work on this! This one is going in the books, right up there with dynamic resolution, soft shadows, and HD assets. 😁 😁
@mercury501 May I ask for a redo for one of the fixes? This is in refence to this post, specifically this cutscene:
I'm going to type out an explanation for this request. It's gonna be a little long, so skip down to "solution" if you'd like.
To hide the fog distances adjusting out of sync with the camera changes, the solution I originally asked of you was to hold the last good frame of the previous camera cut until these visual bugs pass. When not using the noise grain, this is totally passable. However, when using the noise grain it's very noticeably that we're holding this frame for quite some time. This is because the constant jitter of the noise grain comes to a dead stop when holding the last good frame.
This isn't as noticeable in other areas, mostly because we're a) holding the frames in other cutscenes for less time and b) there's more textural detail in the background of other cutscenes to hide the fact the noise grain has come to a stop. For this cutscene, the stopped noise is really noticeable due to the smooth/"pillowy" fog that blankets most of the scene.
I looked into it and found the issue. The cutscene counter value in which the fog adjusts itself is set at a different value from when the camera changes. So, for a new fix, we should change the counter value for when the fog changes. This will sync the fog change with the camera change.
Here's the relevant addresses I found. (I will add the "cutscene counter" address to SHDatabase.):
Which led me to the following addresses which are the solution winners:
(LastCutsceneID == 0x16 && SkipSceneCounter < 4 && (SkipSceneCounter || (GetCutscenePos() != LastCameraPos && GetCutscenePos() == *(float*)"\x40\xA1\xA8\x45")) && GetCutsceneID() == 0x16) ||
965.5f
(default was 968f
)1460f
(default was 1463f
)Here's a test build with your latest suggestion @Polymega: d3d8.zip It's enabled with the other fog fixes
@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.
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
@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 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
.
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...
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.
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.
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
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!
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?
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.
Right on then, I'll make a pr in a bit then!
So the skipping result screen. wasn't because of my controller but a bug interesting.
@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).
Huh, would you look at that. Left is 30 FPS, right is 60 FPS.
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.
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.
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:
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.
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.
🤔 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.
Here I'm clicking only once and pausing between clicks, yet the number wheel will quickly jump two numbers sometimes.
@Polymega Not sure if you saw these messages above? 😬
For the double input:
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 yourFolder 01
folder within here. Then, completely replace yourFolder 01
folder with this new one.Important (noticeably affects audio, visuals, gameplay)
Data 57
,Data 58
,Data 59
,Data 60
to test. There are many water spots throughout the Labyrinth and Alternate Hotel areas.Data 61
to test.AudioClipDetection
can crash the game when playing in 60 fps.Data 62
,Data 63
,Data 64
,Data 65
to test.Data 66
,Data 67
to test. These are just two motion blur example spots.PS2CameraSpeed
moves twice as fast (too fast).Data 70
to test.Data 70
to test.Data 1
to test Flesh Lips. Load save fileData 2
to test Abstract Daddies. Load save fileData 3
to test Final Boss.Other
Data 68
to test.Data 69
to test.Data 57
to test. Defeat Pyramid Head to make water drain.Data 4
to test. Go in the elevator and go to the Basement (B) Floor.FMVs
<path-to-game>\sh2e\movie\
, make a backup oftoilet.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.To help visualize the to-do list a bit easier:
AudioClipDetection
can crash the game when playing in 60 fps.PS2CameraSpeed
moves twice as fast (too fast).