-
-
Notifications
You must be signed in to change notification settings - Fork 21.3k
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
Add "Game" editor for better runtime debugging #97257
Add "Game" editor for better runtime debugging #97257
Conversation
f27cb5e
to
aa9fd47
Compare
aa9fd47
to
baedb41
Compare
This is excellent! One small detail I think would be neat is to freeze the time parameter in shaders while the game is suspended, so that the effects don't continue animating and the 'next frame' button allows for shader debugging |
baedb41
to
1581db4
Compare
@JoNax97 Done! |
Finally, this is incredible work and I'm really excited to see this merged! Thank you so much! A few questions:
I don't think all of that necessarily needs to go in this PR but just curious about the future of this feature. Regardless, I really appreciate what you have so far! |
|
Great work! I'm curious how this would behave for an XR project.. would it be possible to disable the Also I'm curious if this would work with the Android editor. Have you tested this PR with the Android editor? |
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
@RobProductions I haven't checked the code yet, but like this PR is doing, you can have your own code evaluated outside of process (even during debug breaks), by registering a capture in EngineDebugger and implementing a EditorDebuggerPlugin to communicate with it. |
This comment was marked as off-topic.
This comment was marked as off-topic.
1581db4
to
39a0360
Compare
Nice work, I would like to see more controls for the interacted objects (in Unity you can move, rotate, scale in this mode?), maybe some new buttons needs to be introduced for this. |
fbq8107lZ3.mp4This happens after running the project a couple of times and requires restarting editor to fix. EDIT: EDIT2:
godot.windows.editor.dev.x86_64_BOfYg60Jin.mp4
|
I can't seem to get this to work properly. Is there a setting that I need to set somewhere? When I launch the game it is not always on top, and with the same position/size as per the viewport. Clicking the editor brings the editor window to the front and hides the game window. This is on windows 10. |
Go in the project settings, turn on Advanced Settings, look for |
But then #70792 will become extremely annoying. |
Congrats on this 🎉 I'm very impressed and grateful for your work, @YeldhamDev! |
Might be a stupid idea but having worked on an "alternative" pathway for this kind of functionality in godotengine/godot-proposals#9142, it sounds like a possible inevitable progression is just the play button runs another (slightly modified) instance of the Godot editor that can run the scenes in process like in the proposal. This would result in a kind of hybrid with godotengine/godot-proposals#7213, with embedding coming free, and if you crash the "nested" editor it's no big deal. The beauty of the editor itself is that it's very lightweight, and going this route kind of helps dogfooding the editor just like the Godot's own UI. Just food for thought. Edit: Also, I think the idea of having the editor run on the game engine, but the debug runtime runs on the editor is pretty funny. See: https://docs.godotengine.org/en/stable/getting_started/introduction/godot_design_philosophy.html#the-godot-editor-is-a-godot-game |
I'm not sure what your thoughts on this are, but I've shared an idea that will likely be related to this here: #99010 (comment) |
Now that this new Game workspace has been merged, I've updated my existing proposal relating to focusing/centering on selected remote nodes: godotengine/godot-proposals#8130 Because 3D camera movements are made much easier by focusing (especially zooming and orbiting), I believe this proposal is even more important now that the Game workspace has been implemented. |
It would be really handy if the game toolbar actions had configurable shortcuts (suspend in particular). |
You need to press a play button (F5) to run a game. It's a bit counter-intuitive. |
Yes, this is the current limitation. You can only interact with a non-embedded game window, at least until #99010 got merged. |
Thank you! |
@YeldhamDev |
@Comdfsfsfas there is already a PR for embedding it. #99010 |
But I have always wanted to know, why not embed the runtime window into the 3D window, but open a new Game window. In fact, you can display the debugging tool on the 3D viewport during runtime (I think this is better) |
If you're meaning you'd like to have both the playable game and the embedded game workspace viewable and interactive at the same time, this proposal is a good place for discussion: godotengine/godot-proposals#11091 |
I've tried my best on looking for a mention of this both in this PR and the related proposal, and I didn't find any discussion that answered my doubt, so: I feel like the new "Suspend" button in the Game tab is pretty redundant (at least in the still dev version I tested) and clashes nastily with the existing Pause feature at the very top right. I couldn't see any difference in functionality, and some odd counterintuitive cases appeared like having the game Paused but not Suspended, or having it both Paused and Suspended. I still don't quite understand that. Is it going to be developed further, and I'm a bit too early perhaps? |
You can't use picking when the app is stopped with the debugger's pause, because it's completely frozen. |
I think there might be a usability issue with using the same icon for both pause and suspend, given they do different things. One idea that comes to mind is something about a stopped/paused clock that gives the idea that we are pausing time in the game when it is suspended, rather than pausing all rendering and interactivity. Maybe a clock with a pause icon over top of it. Not sure if this idea can be turned into a good looking icon. Also not sure if it makes sense to anyone else. Maybe someone else has an idea of what a unique suspend icon could be… |
Agreed. |
Maybe a snowflake? If I understand the difference in functionality correctly…. |
Ok thanks, I understand the justification now. A part of me still wishes that it was possible to pick nodes when Paused (so a Suspend isn't needed), but I'm getting way ahead of myself - maybe a different time.
That being said, I really like the idea of giving the button a different icon, and a snowflake representing "freeze (the game)" feels clear enough to me. Just wanted to add that I believe a tooltip on the button describing the use of the feature would avoid confusions even more. |
Implements several aspects of godotengine/godot-proposals#7213.
2024-09-20.19-19-42.mp4
Features Implemented
when the game is suspended (see below), this includes anything that has collisions or some sort of visual representation. When a node is selected, a selection box will appear around it and it will be opened in the inspector.Things Missing
Limitations
Compatibility Break
Sponsored By: 🐺 Lone Wolf Technology / 🍀 W4 Games.