-
-
Notifications
You must be signed in to change notification settings - Fork 103
Description
Describe the project you are working on
Godot
Describe the problem or limitation you are having in your project
Several users who want to switch to Godot (or switched to Godot already) miss the functionality provided by engines such as Unity for "exploring" the running game.
While Godot can show you all the running game contents in the remote scene tree and its sort of possible to override the remote camera, it still leaves a lot to be desired.
Engines like Unity or Unreal let you run the game within the editor window. They achieve this by running inside the same editor process, which lets you explore the game while you run it.
This approach has the clear advantage of allow you to explore the running game more intuitively, but it also has several disadvantages:
- Non-destructive editing of the running game is impossible or in a very limited fashion.
- The game has to be saved, the cleared before playing.
- The game has to be reloaded after playing.
- The editor stability can be easily compromised if the running game crashes.
None of these are problems with Godot however. Godot runs the game in a separate process and lets you explore its contents via IPC, but as the game window is not embedded, exploring the content becomes more unintuitive and annoying.
Describe the feature / enhancement and how it helps to overcome the problem or limitation
The idea is to have an embedded game mode in Godot. This proposal describes specifically how this could be done in a way that is feasible and should allow most of the expected behavior.
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
The main goal is to have a new mode in the top bar called "Game", where the game can run embedded in the editor. It would look something like this:
(Note: Pretend that the icon in game is a joystick icon and I am a very skilled graphic designer).
The idea is that the game runs in this window, at either native resolution or letting you stretch the window to fit it (zooming options can be discussed further, but you get the idea).
What functions are supported and what are those icons?
- Pause: Ability to pause the running game
- Next Frame: Ability to move to the next frame while paused.
-
- 2D/3D selection mode: This lets you select which kind of nodes and view will be interacted with while exploring the scene.
-
- Game input: When this icon is toggled and the game is focused (click on it to focus), all input is captured and goes to the game until user clicks elsewhere. (Of course if the game captures the mouse, we will need some way to un-capture it with some special keybinding).
- Selection Mode: This mode no longer sends input to the game and it lets you select 2D/3D nodes (depending on the selection mode described before) by clicking on them. They will appear on the remote scene tree and inspector so you can see their content.
- List Selection Mode: Same as the mode above, but it presents a list of nodes you can choose to select instead of selecting the topmost one.
-
- Camera override: This lets you override the game camera and pan/zoom (if 2D is selected) or WASD/similar (if 3D is selected).
Implementation notes:
The main idea of this feature is that Godot will remain running the game as a sub process, with the main difference being that the game window is embedded into the editor. This can be done with relevant Vulkan extensions (and worse case if a platform does not support this, it just does not let you embed the game window, but most should support it).
FAQ:
Q: Are there not other 10 proposals about this?
A: Yes, but this explains how it would be done in a way that is feasible technically.
Q: Will the 2D and 3D editors show the game objects moving around?
A: No, this is not possible and probably never will. Exploring will have to happen from the game window itself. We can add tools to make this as comfortable as possible.
Q: Will I still be able to edit the scene while the game runs in a non-destructive way?
A: Yes, unlike other engines, you will not lose any change made to the scenes you are editing and the changes will also replicate to the running game.
Q: Will the editor stability be compromised by the game?
A: No, it should not be.
Q: Is this feature optional?
A: This feature is not only optional but probably only present for platforms and rendering drivers where it is possible to do this kind of embedding. I suppose users will be able to configure whether they want to use it by default or not in the editor settings.
If this enhancement will not be used often, can it be worked around with a few lines of script?
This is core
Is there a reason why this should be core and not an add-on in the asset library?
N/A
