How to create amodal to allow the user to return to the main screen

Hello everyone.

I am starting creating 2D platform game and at the moment I am starting to create the menu inside the main game that allows the user to change the configs of the game (enable/disable music and sound as well as return to the main menu).

I would like to check if anyone else has gone thorugh this and could recommend the best practice (should I create this modal structure inside the scene where the game is happening, should I create one scene just for this modal, …)?

Thank you a lot for your help.
By the way, I found one example about creating this new window here: Phaser 3 Examples, but I would like to check if you would follow the same approach.

I, myself, use a parallel scene for my pause menu, where the user can save/load and return to the main menu, which is also a scene for itself. I like this approach because the code is separated from the actual game (scene) code.

1 Like