Add stack-type functions for scene management #79
Replies: 1 comment 1 reply
-
Umm, one of the core tenets of Noble Engine is that there's only one scene active at any time. A lot of the design, and a lot of how users are meant to understand using it, is dependent on that. It's a restriction, but deliberately so. That said, even the projects I've worked on could benefit from examples like the ones you cited. So I'm going to close this but convert it to a discussion. Perhaps an alternative to this might be a "scene-ish" overlay screen type that lives outside the scene management system, with it's own update loop, etc. This would perhaps help clarify these use-cases, and could hold unique functions (passing data to and from the scene that calls it, pausing/suspending scene functions as needed, getting disposed when the scene changes), on top of shedding some of the callbacks that it wouldn't need, etc. Could be called |
Beta Was this translation helpful? Give feedback.
-
Describe the feature
Noble.handoff(...)
to add to the stack, and aNoble.return()
to pop it.Describe alternatives you've considered
Noble.transition(...)
could push every time, then return would be automatic. But that would add a ton of overhead compared to the current system since it wouldn't be a blind upgrade. A "scene_stack_size" setting defaulted to 0 might help.Alternately, a
Noble.swap(...)
that has a return function and it only ever goes 1 deep.What problems would this solve or help prevent, if any
This would be useful for inventory screens, hub worlds, areas with lots of enterable buildings.
This might require a
NobleScene:reenter
callback too, a noopAdditional context
[This area intentionally left blank]
Beta Was this translation helpful? Give feedback.
All reactions