Jester. Screen Manager

Defold have few screen managers. All contains prons and cons. But there is no ideal scene manager. So i try to write ideal scene manager by myself. It my 3 attempt and i think this scene manager is near ideal :grinning:

Let’s think about ideal screen manager. What features it must have.:thinking:

  • Scenes should be in stack.I can change current scene, show new scene, go back to prev scene, replace current scene.Go back to any scene in stack. Maybe some more complicated manipulation with stack.
  • Popups. Show popups. The previous scene can be paused, or still working
  • Save/Restore state. When i show next scene,i can save state of current scene.Then when i returned to it, i will restore it. State can have links to tables. So serializations is not good. I use module with table to save states.
  • Data to scene. I should have a way to send data to next scene.
  • Unload vs disable proxy. When i show next screen.Current scene should be unloaded or disabled. I should have a way to choose unload or disable scene.
  • Transitions. Transition is awesome.
  • Input. Scene manager should acquire and release input.Only top scene should receive input.

Current scenes managers for defold have that feature.Some more of them some less. Now i will tell you some cool features.:sunglasses:

  • Scene is not collection proxy. Collection proxy is the best way to organize scene. But for some use-cases go or gui nodes will be better. You can write your own type of scenes. OOP power :mage:
  • More than one stack. You can create as many as your need.
  • Scene with stack. What if scene have new stack inside it. I show new scene then when i returned to that scene, that stack will be restored.(not implemented now, but will try to implemet it)

I am still working on it.It is a prototype.So don’t use it=)
https://github.com/d954mas/Jester/tree/master - sources
https://d954mas.github.io/Jester/ -html prototype

How do you imagine ideal scene manager? What other features an ideal scene manager should have? Any requests are welcome.

6 Likes