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.
Why?
Asset loading is a complex matter. Because it happens async via bevy assert server, we need to have good control over the availability of the loaded assets. bevy_asset_loader simplifies that for us, providing multiple features when it comes to asset loading: dynamic loading, folder loading, macros, etc.
What?
Currently we have a few types of assets being used in Compass:
While the first three are trivial and can be easily ported to assets loader crate, the images are a bit more convoluted. To reduce the costs of dealing with thousand of sprites, we use sprite atlases. Although asset loader deals well with atlases, it does increase the loading time and the overall memory usage.
To balance that, we are adding sprites pre-loading as optional behind a feature, while keeping our lazy-loaded sprites as the default.