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

Below The Surface - Fix audio errors with attack / turning valve (turnpipe) #185

Closed

Conversation

MHLoppy
Copy link
Contributor

@MHLoppy MHLoppy commented Apr 16, 2024

Description

The game logs audio errors in its console output:
image

After a lot of testing to find the cause, it appears that the errors were caused by two player interactions (a generic attack and turning a valve (turnpipe), which share the same input control) sharing the same SFX, which I guess SplashKit can't handle. Secondarily to this, the sounds for the two actions probably shouldn't be the same as they have significantly different gameplay effects - so making them distinct is informative to the player.

This fix:

  • Changes the default attack sound to use the already-included attack SFX, instead of the valve (pipe) turning SFX.
  • Moves the call for attack SFX to be next to the call for valve (pipe) turning SFX, allowing them to be mutually exclusive without significant re-factoring (though this is not an ideal solution - I think future refactoring would benefit from changing how this is currently set up).

Note: #183 is also incidentally included because of the hassle of disabling file auto-generation.

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

In addition to troubleshooting / debugging prior to implementing the resolution, the first three levels of the game were played in 1P mode with these changes applied, and no console errors were observed. Level 2 was also loaded in 2P mode in order to test the attack and valve-turning for both players, and no console errors were observed there either.

Testing Checklist

N/A

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code in hard-to-understand areas
  • I have made corresponding changes to the documentation (N/A)
  • My changes generate no new warnings
  • I have requested a review from my team on the Pull Request Teams

@MHLoppy MHLoppy marked this pull request as ready for review April 16, 2024 16:14
@MHLoppy
Copy link
Contributor Author

MHLoppy commented Apr 16, 2024

@github-actions github-actions bot added the compiled the source code has been successfully compiled label Apr 16, 2024
Copy link
Contributor

@Bullet-Not-Proof Bullet-Not-Proof left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems good no real issues

@MHLoppy MHLoppy changed the title Fix audio errors with attack / turning valve (turnpipe) Below The Surface - Fix audio errors with attack / turning valve (turnpipe) May 25, 2024
@AmberPotion
Copy link
Contributor

Looks like we got merge conflicts that'll need to be reviewed 👀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiled the source code has been successfully compiled
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants