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

Audio and Game being slow/stuttery #285

Closed
TheFacelessShadow opened this issue May 30, 2020 · 19 comments
Closed

Audio and Game being slow/stuttery #285

TheFacelessShadow opened this issue May 30, 2020 · 19 comments

Comments

@TheFacelessShadow
Copy link

I just downloaded the Enhanced Edition of this game (I mean, obviously) and downloaded all the files listed through the install page and when I tried to launch it today, The menu sat fine, being smooth and nothing out of the ordinary. Yet when the game starts the intro FMV was slowed down in a few portions and as James began to speak at the beginning, the audio was clipping loudly to a point where it was impossible to really hear him due to how much it was stuttering and how loudly it was clipping. I have an Nvidia 2080 Max-Q and 32GB of Ram, If I need to provide any other info then I will.
d3d8.log

@AeroWidescreen
Copy link
Collaborator

I could be wrong here, but it looks like it's using your onboard graphics rather than your graphics card:

20256 14:01:35.940 Starting Silent Hill 2 Enhancements! v1.5.1750.0
20256 14:01:35.940 "Intel(R) UHD Graphics 630"
20256 14:01:35.941 Windows 10 Home 64-bit (10.0.17763)

That would be the first thing I look into. I'm assuming you're using a laptop since there's no reason to have your onboard graphics enabled if you're using a desktop.

@TheFacelessShadow
Copy link
Author

I am using a laptop yes, How would I go about changing that? Sorry, I am not the best when it comes to knowing this kinda stuff!

@AeroWidescreen
Copy link
Collaborator

Unfortunately, I'm not very familiar with gaming laptops. This is what I found online:

https://www.techadvisor.co.uk/how-to/pc-components/how-set-default-graphics-card-3612668/

@Polymega
Copy link
Collaborator

Polymega commented May 30, 2020

Good catch, Aero_.

TheFacelessShadow: This has been an issue before with other people who have gaming-centric laptops. I'm not sure how to tell your PC to use your Nvidia card over your IGP for the game (I don't own a laptop that has a dedicated GPU).

But if you figure it out, would you mind letting us know in detail how you did it? It can help us guide people in the future who will inevitably run into the same problem.

PS - I can confirm IGP will suffer and stutter with the fog fix, high resolutions, and advanced filters. My Surface Pro 3 laptop also suffers from these things.

@TheFacelessShadow
Copy link
Author

Okay so I think I managed to get it, The intro doesn't lag at all, The audio doesn't glitch out and it looks nice. I followed the guide Aero listed, Basically go into Nvidia Control panel and click Manage 3D Settings, Then click Program settings and select a program or add it, find the exe for it, and then it will be added. You then select the High-performance Nvidia Processor and click Apply. You can also right click it, Hover over 'Run with graphics Processor' and select it from there, Though you'll have to do it each time. I also in the d3d8 log set SingleCoreAffinity to 0 and that seemed to be the main fix for me

@Polymega
Copy link
Collaborator

Great! Glad the guide reflected your own Nvidia control panel. This will help us advise people in the future. Thanks for following up.

If you'd also like to enable anti-aliasing through your Nvidia control panel, we offer the settings to enable here: http://enhanced.townofsilenthill.com/SH2/troubleshoot.htm#what-antialiasing-should-i-use-for-the-game

I also in the d3d8 log set SingleCoreAffinity to 0 and that seemed to be the main fix for me

You'll want to keep this enabled (setting it to 0 disables it). The game can't stable run on multiple cores and will eventually bug out the audio and freeze/crash the game. Try setting it to a value of 2 or 3; there may be too many other program processes running on your first core which could be why the game was still laggy for you.

More info here: http://enhanced.townofsilenthill.com/SH2/config.htm#SingleCoreAffinity

@TheFacelessShadow
Copy link
Author

I'll need to fiddle more with the core then because it only runs well without any bugged or looping or clipping audio and without any graphical slowdown when I have the core set to 0

@TheFacelessShadow
Copy link
Author

Okay so an update after cycling through my various cores. On some the game starts well, slight frame dropping or slow down, it's hard to gauge much from the intro FMV. But the audio was fine until I got outside when it started like it was starting and stopping, was ahead of the text, and seemed to repeat on itself, Like one voice would be going and then while it was it would restart in the background, causing them both to sound funny

@Polymega
Copy link
Collaborator

Just got home to properly look at your original log file. Did you obtain the game from somewhere online? No judgments if you did, but I noticed you have extra files and folders in your game's directory which shouldn't be there. Having these files in the directory might be conflicting with something.

These files/folders should not be in there:

20256 14:01:35.960 |- 05/29/2020  10:09 PM    <DIR>          Disc 1
20256 14:01:35.960 |- 09/26/2002  12:20 PM         2,997,549 data1.cab
20256 14:01:35.960 |- 09/26/2002  12:38 PM           365,647 data1.hdr
20256 14:01:35.960 |- 09/26/2002  12:22 PM        17,854,464 data2.cab
20256 14:01:35.960 |- 09/25/2002  07:33 PM       681,984,000 data3.cab
20256 14:01:35.960 |- 09/25/2002  07:38 PM       254,479,370 data4.cab

Your directory should look something like this.

Someone else had launch issues, and it stemmed from where they obtained the game online. Once they found a better copy, their issue was resolved. Might be a similar situation as what you're in?

If you're sure your copy of the game is good, also try removing the ReShade files to see if that fixes any performance issues. This would be d3d9.dll, d3d9.log, ReShade.ini, and ReShade_sh2pc.ini.

@TheFacelessShadow
Copy link
Author

I did get the game online, Those files are ones I had put in when testing it prior to installing the Enhanced Files but I have removed them to see how it will work, I also removed the ReShade. Cycling though all my cores and it still ran choppy and with audio bugs yet for some odd reason runs at a smooth 60 fps with no audio bugs when I disable the SingleCoreAffinity which I find off since logically it shouldn't run as good

@elishacloud
Copy link
Owner

@TheFacelessShadow, It sounds like the issue here has to do with performance.

First of all, since this is a laptop you probably want to make sure to leave d3d8to9 enabled. Most laptops will use a slower GPU with DirectX8 and older, so you want to make sure to use DirectX9 or newer for games if possible.

Since your computer has multiple cores, it obviously runs faster with SingleCoreAffinity disabled, allowing you to use all cores. However, there are sync issues with this game when using multiple cores, so we recommend enabling this and setting it to 2 or 3 and using some other method to improve performance.

Here are some things I recommend which should help improve the performance:

  1. Disable FixGPUAntiAliasing
  2. Rename or remove d3d9.dll (ReShade)
  3. Remove or rename dsound.dll (IndirectSound)
  4. Disable AnisotropicFiltering
  5. If your laptop is 4k or you are using a 4k monitor it is recommended that you set the resolution to 1920x1080 manually in the ini file.

I know some of these were mentioned above, but I wanted to make sure to be complete.

Note: If you are able to get it working with the changes above, you could try and put dsound.dll (IndirectSound) back, since this will improve the sound quality by removing some pops and clicks in the game.

@TheFacelessShadow
Copy link
Author

I noticed a weird sound that was like snapping that rose and lowered which made me feel like it was part of the game but I realized it wasn't when I went into the options and it kept up, It showed up after the first monster encounter.

@TheFacelessShadow
Copy link
Author

d3d8.log
I did a fix someone put here but seemed to delete unless my Github is bugged out but, It seemed to work, Game ran smooth, the audio wasn't fucky. I watched a couple of the cutscenes in the movie menu and they seemed to have no music, I don't know if that's what happens when you watch them through there or not. A small issue I have to also bring up is that, whenever I switch my audio in the options menu to use my Headphones as opposed to its default and I save and exit the menu, It resets itself. Also, I am unsure if this is known but my save through the pause menu as opposed to one of the note pads wasn't where my game loaded when I went in to try again, it loaded from my last notepad save, which isn't an issue at all since it makes the game more authentic to its PS2 counterpart.

@Polymega
Copy link
Collaborator

I watched a couple of the cutscenes in the movie menu and they seemed to have no music, I don't know if that's what happens when you watch them through there or not.

That's correct. For some FMVs, the BGM is made in-game and plays over the FMVs. For others, the BGM is part of the FMV audio track. It's like that on all versions of the game.

A small issue I have to also bring up is that, whenever I switch my audio in the options menu to use my Headphones as opposed to its default and I save and exit the menu, It resets itself.

We've had discussions about this with others in the past. EAX and hardware accelerated audio support was dropped after Windows XP. Since SH2 released and was intended to be played on WinXP, we think there was specific drivers/files that SH2 PC could detect to know how to switch to another audio mode.

Since Win7+ no longer supports these specialized audio APIs, we think that SH2 PC fails to detect them and there's code to inherently reset it back to "Stereo." Chances are, we'll likely lock this option to "Stereo" only (same as we've done for locking out the Screen Position option) since it won't matter to adjust this anyways once we drop IndirectSound and integrate DSOAL into our project.

Also, I am unsure if this is known but my save through the pause menu as opposed to one of the note pads wasn't where my game loaded when I went in to try again, it loaded from my last notepad save, which isn't an issue at all since it makes the game more authentic to its PS2 counterpart.

If you installed your game to an admin-protected directory, such as Program Files (x86) (as you've done), if you do not run the game as an administrator your save files and game setting files will be saved and called from a virtual directory. (More info here.)

Chances are, CheckForAdminAccess is automatically running the game as an administrator for you now. When ran as administrator, the game will properly read your save/setting files from the game's directory (C:\Program Files (x86)\Konami\Silent Hill 2\) instead of the virtual directory.

Long way of saying Windows 10 was storing save and setting files in two different places, depending on whether or not you run the game as admin in an admin-protected directory.

@Polymega
Copy link
Collaborator

I noticed a weird sound that was like snapping that rose and lowered which made me feel like it was part of the game but I realized it wasn't when I went into the options and it kept up, It showed up after the first monster encounter.

If you aren't running the game on a single core, this is likely the sound loop bug we were talking about. The game needs to run on a single core.

Depending on what online source you obtained the game from, you may have a bad copy. We've had other people experience installation, launch, and general performance issues because they obtained a bad copy online. For example, there's a copy available from a Russian site that just doesn't work at all with our project (because of modified files that make it incompatible).

@Badore90
Copy link

Badore90 commented Jun 1, 2020

Okay so I think I managed to get it, The intro doesn't lag at all, The audio doesn't glitch out and it looks nice. I followed the guide Aero listed, Basically go into Nvidia Control panel and click Manage 3D Settings, Then click Program settings and select a program or add it, find the exe for it, and then it will be added. You then select the High-performance Nvidia Processor and click Apply. You can also right click it, Hover over 'Run with graphics Processor' and select it from there, Though you'll have to do it each time. I also in the d3d8 log set SingleCoreAffinity to 0 and that seemed to be the main fix for me

In case you'd want to use "leave the application to decide" on Nvidia control panel, there's another way for setting the GPU preference.

image

image

image

image

image

@TheFacelessShadow
Copy link
Author

I was running the game yesterday and it went nicely, I noticed a few shadow related bugs but nothing serious or game-breaking, The bugs were caused by one of the settings I disabled I figured. It all seems to run well and work nicely now!

@Polymega
Copy link
Collaborator

Polymega commented Jun 1, 2020

I noticed a few shadow related bugs but nothing serious or game-breaking,

Keep in mind shadow logic in general has never been stellar for this game. It's a product of its time. The behavior you're seeing is likely normal behavior:

Also, keep in mind a lot of the ambient background tracks in this game loop in interesting ways. Assuming you're not experiencing the sound loop bug, someone not familiar with these ambient BGM arrangements might think they're incorrectly looping. I've seen a Twitch streamer mistakenly think this before.

@TheFacelessShadow
Copy link
Author

I figure a number of the odd stuff is typically the game trying to mess with your head before thinking it could be something going wrong anyway. But if I have any more problems I'll scour the other questions and, If I don't see it, Make another post. Thank you guys a TON for your help!

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

5 participants