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

[Help Wanted] Introduce Content.Load<SoundEffect>() fallback to load from file when no .xnb exists #8482

Open
SimonDarksideJ opened this issue Sep 11, 2024 · 0 comments

Comments

@SimonDarksideJ
Copy link
Contributor

SimonDarksideJ commented Sep 11, 2024

Intent

Content.Load should have the ability to "fall back" At Runtime and load sound files when no corresponding .xnb exists.

This will enable a single path for developers to load sounds whether they choose to use the content pipeline or not and greatly simplify the documented process for loading content.

This is not for the MGCB tool as that is used to build .xnbs already, this is about runtime!

The "Fallback" would need to handle:

  • Locating the specific file in question based on the file name (including handling for naming casing) - e.g. (Background.wav vs background.wav or BackGround.wav from "background" as a name.
  • Handling sub-paths / folders (e.g. "Audio/Menu/background.wav")
  • Determining the correct filetype being loaded (based on what MonoGame supports at runtime), wav, etc
  • Handling the correct functionality to use to load the file and return the SoundEffect definition

Support is preferred by the community to help to make this happen and unify the path for all developers.

Motivation

In order to simplify the loading of manual content, rather than having separate code to identify, load, and manage files, the existing Content.Load methods should be enhanced with a fallback measure to engage with content of the specified time.

This ensures a simple path for all MonoGame developers regardless of which path they choose and also reduces the impact should the developer need to switch path and cut out unnecessary code changes.fallback

See ALso

Shaders and Models are excluded for the moment as they have additional dependencies

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

No branches or pull requests

1 participant