Upstream asset loading solutions
- Dominant language
- Rust
- Stars
- 48.2k
- Forks
- 4.8k
- Avg merge
- 3d 16h
- Merged PRs (30d)
- 171
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:
- https://github.com/NiklasEi/bevy_common_assets by @NiklasEi
- https://github.com/NiklasEi/bevy_asset_loader by @NiklasEi
- https://github.com/IyesGames/iyes_progress by @inodentry
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.
Contributor guide
Research direction
Start by reading examples/asset/multi_asset_sync.rs and comparing it with the three listed crates: bevy_common_assets, bevy_asset_loader, and iyes_progress. Check whether the crate authors grant permission and whether maintainers favor upstreaming, documentation, or another approach. Done requires an agreed scope and an accepted asset-loading solution.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- game-dev
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100