forked from tobspr-games/shapez.io
-
Notifications
You must be signed in to change notification settings - Fork 34
Sound rework #76
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
Closed
Closed
Sound rework #76
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* Fix tsconfig scopes affecting html.js Since it's quite hard to use a DOM library type there, remove the type entirely. * Remove environment variables check Nothing is using them anymore. It can be added back if needed later. * Refactor Texture Packer downloading Refactor local-config.js tasks file into a generic "environment" category consisting of checking if Java is installed, downloading the runnable Texture Packer if it's not yet downloaded and copying the local configuration template; update README accordingly. * Prepare environment only at postinstall Remove environment.prepare task from default build pipelines, add a postinstall script that calls the task, using environment.js as the gulpfile to speed it up. * Remove "docs" tasks and types generation script Remove tasks from docs.js as they are unlikely to do anything meaningful nowadays. Also remove the buildTypes script as it doesn't work anymore. A better solution will be provided in the future. * Simplify some globs Use additional gulp.src options instead of specifying more or complex globs. * Extract built-temp location to a variable Add the src/js/built-temp directory as a new variable in config.js, replace all existing references to built-temp with this variable.
Remove the behavior of automatically opening developer tools when launched with --dev command line switch. As --hide-devtools switch is now unused, remove it as well.
Remove the canvas context loss handling as it was incorrect, simplify the error conditions in makeOffscreenBuffer and remove commented out code.
These files do not describe existing JS types and instead define their own. Usage of .d.ts extension prevents these types from being emitted when using emitDeclarationOnly, which affects generation of typings for mod development.
Remove the check of URL beginning with data:image. This is an old API, so leave other quirks as-is.
Remove globalConfig properties that are not used anywhere, simplify mobile device detection (mostly unused for normal builds) and merge or inline config constants where it makes sense.
Unlikely to be used and can be replicated with mods in a much better way.
Remove lastCanvas/lastContext cache for reusing canvas as creating a new canvas does not cause performance issue. Additionaly, remove smoothing classes and buffer registration as they are not used anywhere. Finally, remove redundant stageDestroyed calls in the InGameState.
Remove some unused classes, mixins and variables, then inline ones that have just a few usages. Also remove a few redundant properties and replace align-items: center + justify-items: center with place-items: center.
Replace --ui-scale inline style on the <html> element with font-size set to UI scale * 10px and modify SCSS D(...) mixin to use the rem unit instead of multiplying by var(--ui-scale). This makes it possible to get rid of mixin hell and makes following UI scale in external stylesheets (mods) much easier.
Replace all instances of D() and S() mixins with rem units. Also, replace deprecated slash division with math.div as suggested by dart-sass. Finally, remove the mixins as they are no longer used.
shapez used to have a nice error handler, but later it was removed. To help debug game in both development and release cases, add a simple error handler/screen that displays the error stack trace, lists the installed mods and shows some build information. It also allows copying this information to the system clipboard. Having such an error screen should make mod development easier once the local mod error handling is removed.
Remove try/catch wrappers that just log and/or rethrow the error, use the cause chain for rethrows with descriptions. Remove inner try/catch for mod loading to make errors more obvious.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Almost completely rewrites the sound system to use the Web Audio API instead Howler.js. Also adds the following features (from #53):
Not much but definitely is something