Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Game Button and Mode For Seamless Experience #5802

Closed
toliaferrode opened this issue Jul 19, 2016 · 13 comments
Closed

Game Button and Mode For Seamless Experience #5802

toliaferrode opened this issue Jul 19, 2016 · 13 comments

Comments

@toliaferrode
Copy link

toliaferrode commented Jul 19, 2016

Operating system or device - Godot version:
Any OS, any Godot version

Issue description (what happened, and what was expected):
This is a feature request. I opened an issue that is similar to this, but I wanted to expand on it.

I feel like there should be a Game button in the grid where 2D, 3D, Script, and now AssetLib are. I feel like this would be cleaner for the interface rather than opening the game in it's own window. With the game window open it's harder to get to the debugger, profiler, see your scripts, etc, unless you're running dual monitors. I think the way Unity does it is really great. Everything is totally accessible because of the game tab. Even Blender similarly does this with rendering by putting your render in interface when pressing F12.

How it would work is you can click on the game button to see it, or when you press play it automatically goes to the game mode.

Maybe still including the option to open a window is good for people with more than one monitor.

Steps to reproduce:

Link to minimal example project (optional but very welcome):

@bojidar-bg
Copy link
Contributor

A very slight problem that would start from this is that if something crashes in-game, it would crash the whole editor, not only the game.

@vnen
Copy link
Member

vnen commented Jul 19, 2016

I couldn't find any previous issue, but I'm pretty sure this has been asked before. And the answer is that it would be a major hack to make this work, if it's even possible.

@djrm
Copy link
Contributor

djrm commented Jul 19, 2016

There is some info about this in the unity2godot tutorial, some pros and cons of every approach

@toliaferrode
Copy link
Author

Ah, I see. I'd be happy with being able to hit F8 to close out an errored window as I posted in a previous issue. And eventually a dual monitor setup. :)

@Zylann
Copy link
Contributor

Zylann commented Jul 20, 2016

Integrating the game window inside the editor is doable with OS-specific APIS, where you could basically embed the window inside another. But I have no idea how hard/different it is on different platforms, especially because of cross-process GUI events being involved.

The reason why Unity does it nicely is that, sadly (IMO) they run everything in the same process. Having a separate window in Godot is actually a side-effect for running the game in another process. It has the advantage that it can't harm, freeze or slow down the editor, you can debug-break it, eventually debug multiple instances (when it's done) and the same logic will work for both local and remote.

Edit [2018]: I still think running in-editor is a bad idea, for many reasons, at least as long as it's in the same process. I don't deny that inspecting the game live is bad, but it's a sharp double-edge sword with many implications (it's not just about running in editor, that's easy. It's about all the side effects of that, and this is a different beast). The best way to handle it is to keep game and editor contextes as separate as possible, and a separate process does that nicely.

@bojidar-bg
Copy link
Contributor

@Zylann BTW, I have played around with the concept of having multiple SceneTree-s, and it works correctly (mostly). It should be possible by using per-world PhysicsServer freeze and similar to put the game viewport inside the editor (probably even running SceneTree::idle_frame and SceneTree::frame in seperate threads, to forbid slowdowns on the editor itself).

TL;DR, it is possible, but it won't be an easy thing to do, plus it would likely break compatibility with 2.x.

@toliaferrode
Copy link
Author

toliaferrode commented Jul 22, 2016

Maybe we could have it for 3.x? :)

Another reason to implement this I feel is that it's harder to get to your Script Variables in the inspector the way it is now.

@akien-mga
Copy link
Member

I don't think this would be implemented no, Godot's behaviour with forked processes is superior in many ways to the Unity3D approach, so forcing the game to run embedded just because Unity3D users are familiar with it and find it cool would be pointless.

@toliaferrode
Copy link
Author

toliaferrode commented Jul 22, 2016

I guess dual monitors are the best way to use Godot. Thanks. :)

Can we get F8 on errored windows then? I posted this issue awhile ago.

@aaronfranke
Copy link
Member

aaronfranke commented Mar 19, 2019

While I don't think it's a good idea to integrate the gameplay into the editor, there is a feature that I miss from Unity that came as a result of the "unified process", which is viewing and editing the running game from within the editor. I would find it useful if Godot had support for viewing and editing the running scene, such that I could view, move, delete, and duplicate objects while the game is running.

@KoBeWi
Copy link
Member

KoBeWi commented Jan 4, 2020

While I don't think it's a good idea to integrate the gameplay into the editor, there is a feature that I miss from Unity that came as a result of the "unified process", which is viewing and editing the running game from within the editor.

This is partially implemented by #27742
We can also use remote inspector to edit the scene. While it is not as seamless as in unity, the functionality is there.

@Calinou
Copy link
Member

Calinou commented Jan 4, 2020

I wonder if this could be emulated by moving and resizing the project window to match the viewport's coordinates and setting a flag so the project window is always on top. The window would have to be made borderless as well. Of course, this would break when alt-tabbing or moving the editor window, but it'd be better than nothing.

Either way, this would be an opt-in setting anyway. I'm fine with the current way of working.

@akien-mga
Copy link
Member

Feature and improvement proposals for the Godot Engine are now being discussed and reviewed in a dedicated Godot Improvement Proposals (GIP) (godotengine/godot-proposals) issue tracker. The GIP tracker has a detailed issue template designed so that proposals include all the relevant information to start a productive discussion and help the community assess the validity of the proposal for the engine.

The main (godotengine/godot) tracker is now solely dedicated to bug reports and Pull Requests, enabling contributors to have a better focus on bug fixing work. Therefore, we are now closing all older feature proposals on the main issue tracker.

If you are interested in this feature proposal, please open a new proposal on the GIP tracker following the given issue template (after checking that it doesn't exist already). Be sure to reference this closed issue if it includes any relevant discussion (which you are also encouraged to summarize in the new proposal). Thanks in advance!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

9 participants