Redot-Engine / redot-proposals

Redot Improvement Proposals
MIT License
32 stars 7 forks source link

Add Option to Play Game in Editor Window #24

Open valkyrienyanko opened 1 week ago

valkyrienyanko commented 1 week ago

Describe the project you are working on

A top down space game.

Describe the problem or limitation you are having in your project

I have a friction export that I can change while the game is running but in order to change it I need to click outside the game window and now I can no longer see the game window. I don't have a second monitor to put the game window on.

image

I realize I can code a slider for the friction variable in-game but this is time consuming. I have tried to address this by creating a new Visualize attribute to automate the process but its not perfect.

Describe the feature / enhancement and how it helps to overcome the problem or limitation

I propose there be a new option to run the game window inside the editor. This way we can modify our exports without having to click outside the game window. I believe this is what Unity does.

In addition support could be added for embedding multiple windows at once in case you are for example debugging a multiplayer game and need to launch 4 windows at once.

Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams

The game would render in this yellow shaded area.

Untitled

If this enhancement will not be used often, can it be worked around with a few lines of script?

I don't know.

Is there a reason why this should be core and not an add-on in the asset library?

I feel like it would be a good addition for everyone to have the option to do this. Especially for those with only one monitor like myself.

TAGames commented 1 week ago

In the project settings I set the window to always be on top. This helps, but an embedded play window would be nice. Recently someone created an addon that does this: https://fabimakesgames.itch.io/embedgame

valkyrienyanko commented 1 week ago

In the project settings I set the window to always be on top. This helps, but an embedded play window would be nice. Recently someone created an addon that does this: https://fabimakesgames.itch.io/embedgame

I tried out the addon and it's awesome but every second time I startup the editor, the plugin fails to load. Restarting the editor resolves the issue but this is a temporary solution and is counter productive.