flame icon indicating copy to clipboard operation
flame copied to clipboard

Create Navigator component

Open st-pasha opened this issue 3 years ago • 1 comments

A NavigatorComponent would fulfill the similar role that Flutter's Navigator widget does: it would facilitate switching between multiple independent screens.

A typical game is comprised of multiple UI screens: the start page, the settings page, the level selector page, the world page, the character inventory page, the help page, etc. The NavigatorComponent's job will be to help move from one such page to another.

This is a common functionality that is needed in pretty much every game. So how do games solve this right now?

  • Some games simply remove the old page and mount the new one. This works if the page loading times are negligible, otherwise there will be a gap with no top-level component present.
  • Use Flutter's Navigator and have different GameWidgets for each game page. This works, but it's not very efficient as it requires that each page is loaded anew on every page switch.

st-pasha avatar Feb 16 '22 00:02 st-pasha

Haven't heard anyone that have had a problem with the two current options you presented, but I think this will make it a nicer experience for the user none the less!

spydon avatar Feb 16 '22 06:02 spydon