bevyengine / bevy

A refreshingly simple data-driven game engine built in Rust
https://bevyengine.org
Apache License 2.0
34.88k stars 3.41k forks source link

Add a splash screen example #14089

Open king0952 opened 1 month ago

king0952 commented 1 month ago

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

I would like to make a desktop app with a splash screen to show some basic information (a logo, current version, etc.) of my software.

What solution would you like?

Something like this:

pub struct WindowPlugin {
    pub primary_window: Option<Window>,
    pub splash_window: Option<Window>,
    pub exit_condition: ExitCondition,
    pub close_when_requested: bool,
}

What alternative(s) have you considered?

Tauri Splashscreen

Bcompartment commented 1 month ago

Maybe this will help:

  1. Basic splash screen is trivial with current states and systems.
  2. IMO it will bloat WindowPlugin struct.
  3. splash_window, loading_window, exit_window, game_over_window ... application can have many ....
  4. You need to hide it by yourself anyway, so loading tracking system is required.
  5. Better way is to add UI example.
  6. Is Splash screen is FUNCTIONAL or AESTHETICS element?
  7. What about animations?
  8. Adding struct field solves nothing, architecture required for app loading is 99% of work, and showing image to hide it is 1%.
  9. What if application loading takes multiple stages? splash_window_0 ... splash_window_N
alice-i-cecile commented 1 month ago

Borrowing from https://github.com/TheBevyFlock/bevy_quickstart would make a great example.