Skip to content

Upstream asset loading solutions #14368

Open

Description

What problem does this solve or what need does it fill?

Loading a list of assets in a loading screen is a very common pattern that is needed for a wide array for games and applications. Beginners run into this fairly quickly. In fact, you basically need to do this if you want to support audio on web per @alice-i-cecile.
Bevy should provide some easy way of implementing this.

What solution would you like?

Upstream some or all of the following well-known, battle-tested and widely used crates. In order of increasing controversy according to my intuition:

Of course, we have to get the authors' permissions first.

What alternative(s) have you considered?

  • Create our own solution
  • Leave the API as-is and invest in heavy documentation and examples for how to build this functionality on your own with little boilerplate
  • Leave the API as-is and directly point users to the crates listed above
  • Do nothing and leave it at https://github.com/bevyengine/bevy/blob/main/examples/asset/multi_asset_sync.rs
    • While the code itself is not overly complex or anything, I think something so common should probably have a solution that requires less boilerplate

Additional information

These methods tend to work better on native than on Wasm since the latter famously does not allow deallocating memory. If you load all of your assets in one go, your RAM will be exhausted since there is only 4 GiB available on Wasm.

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

Metadata

Assignees

No one assigned

    Labels

    A-AssetsLoad files from disk to use for things like images, models, and soundsLoad files from disk to use for things like images, models, and soundsC-FeatureA new feature, making something new possibleA new feature, making something new possibleX-ControversialThere is active debate or serious implications around merging this PRThere is active debate or serious implications around merging this PR

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions