Hi community,
I was wondering if there is a way to push a scene on top of the Scene_Map without blocking it.
The most obvious example is the Scene_Menu: it still lets you see the map behind it, however the Scene_Map gets frozen (someone here said it's essentially a screenshot), frames are not updated, and the onMapLoaded event gets triggered once the menu is closed.
I guess this is a more general thing about frames and scenes. Any suggestions?
Thank you in advance 🙂
Scenes are exclusive: the SceneManager has only one scene loaded at a time. I think the easiest way to do what you're asking would be to add the menu stuff (windows etc) to Scene_Map.
theoreticaly yes, but practically it is a lot more work than you think because you would have to recreate the entire menu and screen structure.
ninja'd
The PIXI renderer is capable of rendering only one scene at a time, if you try to render another scene, it will not render it on top of the first one, but it will only render that scene. So it's completely impossible to render a scene on top of a scene.
Not to mention, having a scene on top of a scene is usually quite impractical. For example even if you have a menu scene, having it on top of your normal map scene means you need to stop updating all these characters etc. otherwise they'd be allowed to roam freely, which could result in game overs. Not to mention they'd be able to disrupt common events or other events based on precision quite easily. So unless you have a particular reason why two different scenes HAVE to be active at the same time, it's pointless to try to change this system.
that is why I said you have to re-create the entire menu and scene structure. you can't extend the existing structure, you have to build your own.
and besides that, the ony reason why the map should continue in the menu is if you want to rob the player of the ability to pause the game.
And in RPGs, the option to pause or not usually doesn't matter (which is why no one bothered to program a paralel structure in default).
Perhaps we can help you if you tell us WHY you want that option, because sometimes there are easier solutions than rewriting the entire engine...
Well, you can either make a fullscreen menu with no background or try to apply the menu onto Scene_Map. I don't think it would be that difficult. But may be tedious.
What is supposed to get "updated"? on that level of programming, you should usually write the update method in such a way that the menu can handle those things like data and timer updates. It would ony cause probems if you want the map itself be updated - and in that case see my point about pauses above.
Because you didn't answer my question at all: My question was from the ingame POV or what the player sees, not what you as the developer think.
This is one of the most important lessons on development of a game: a lot of game mechanics only pretend what they do but handle things differenty than they tell the player.