flame-engine / flame-engine/flame
Implement "Loader" component
- Dominant language
- Dart
- Stars
- 10.8k
- Forks
- 1k
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 21
Description
# Problem to solve
Often, a game needs some time to load its resources/assets. In this case some kind of a loading screen is necessary.
Currently, the only support from Flame for this functionality comes from the `loadingBuilder` parameter of the `GameWidget`. However, this solution may be insufficient for the following reasons:
- it is non-trivial to pass the loading progress from the game to the loading widget;
- since the loading page is inherently dynamic, one may want to use Flame's rendering for it instead of relying on Flutter animations or custom painters;
- it is unclear how to use the loadingBuilder (or whether it is even possible) to show loading progress when loading internal components, such as a particular level within the game.
# Proposal
How exactly to solve this is TBD. Should this be a specialized `Route` within the Navigator? Or a mixin to a page? Or a page wrapper? Or a child?
I'd be interested to hear how people solve this problem right now.
Contributor guide
Assessment
This issue has not been assessed yet.