-
-
Notifications
You must be signed in to change notification settings - Fork 21.1k
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
base: master
Are you sure you want to change the base?
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
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested and can confirm it works, with some of the issues mentioned above like the selection box positioning, but otherwise works great!
@YeldhamDev @GustJc @MBCX Yo, could you guys try this MRP if you've got time, I am seeing the same behavior when trying on 4.3 stable & 4.4 with GDScript. I promise I'll put this to rest lol, but wanted to see if is_in_physics_frame() returns true always for you guys. |
@jaydensipe Tested 4.3-stable and 4.4.dev trunk from this branch. Both always return true for me. 4.3-stable Godot v4.3.stable - Windows 10.0.22631 - Vulkan (Forward+) - dedicated Radeon RX 580 Series (Advanced Micro Devices, Inc.; 31.0.21921.1000) - Intel(R) Core(TM) i5-9600K CPU @ 3.70GHz (6 Threads) v4.4.dev.gh-97257 [2ee6e45] |
2535b8f
to
9672068
Compare
@YeldhamDev @MBCX Alright I believe I figured it out, or at least the cause. Do you guys have 60hz monitors? If you do, when running the project with V-Sync ENABLED under project settings causes the project FPS and physics rate to be equal (60). So if I test the "Game" editor with 60hz monitor and V-Sync ENABLED, I don't crash, but if you disable V-Sync and try to test, it SHOULD crash for you guys now. test-mrp-with-fps-stuff-and-vsync-disabled.zip Running with 240hz on my monitor: Running with 60hz on my monitor (V-Sync ON): Running with 60hz on my monitor (V-Sync DISABLED): So I've also read a bit about the deferred stuff here which might have some insight (https://www.reddit.com/r/godot/comments/uk7kzz/call_deferred_is_for_idle_frames_but_why_not_also/). |
Yup @jaydensipe, it does crash when vsync is disabled |
Ok, thank god I am not crazy, thank you guys for testing that! @YeldhamDev I think in |
I tested that on my second AOC display which is 60 Hz, I tested again now on my first Samsung monitor (which according to Windows is a 59.94 Hz monitor) and I did get a true case while testing, interesting... 🤔 In 90% of cases though it crashes. And because is 59.94 I guess the engine rounds Physics Frames to 60. |
Yep, I found the same, sometimes you get lucky and happen to be in the physics frame. |
I have a 160hz and another 60hz monitor. It only returns true when the window in the 60hz but when I move it to the 160hz monitor, it randomly returns false or true when I click. |
Oh, that's interesting.... Normally it is true here..... changing vsync inside godot doesn't seem to affect at first. But that was because I've set vsync turned ON inside my nvidea configuration panel. |
9672068
to
708f818
Compare
@jaydensipe Alright, one more time, please test it. |
@YeldhamDev Hmm... still seems to be crashing. Did you change any code though, or did you wanna try the RenderingDevice change in the above branch compare https://github.com/godotengine/godot/compare/9672068184828d8e948d5b28b12f367f4d617739..708f818f31574a99cc388f5c3958b477a11db356? |
708f818
to
2f206f5
Compare
My changes were unstaged when rebasing from the For real now, test it. |
@YeldhamDev All good lolol Looks like... WE ARE GOOD! Great job man. 🎊 Screen.Recording.2024-10-22.191251.mp4 |
2f206f5
to
b7b2540
Compare
@jaydensipe Done! |
Works great now! |
I thought about some edge case of nodes selection in running project and assumption was confirmed: Running project will be closed (crashed?) after trying to select from popup menu a node which doesn't exist anymore. This does not cause the editor to crash. Test project: new_project.zip Select Sprite2D when it is inside the scene tree to bring up the popup menu (you may have to click in the center of the screen since Node2D and Camera2D are in the center) and wait until Sprite2D is freed. After Sprite2D is freed, try to select it from the popup menu list. The project will close. |
b7b2540
to
882d607
Compare
@arkology Again, good catch. Fixed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I ran into a couple issues when testing the latest updates to this PR:
Show list of selectable nodes at position clicked
is still broken on Android; the popup is not interactable and prevent any further input
1000059422.mp4
- 2D node selection breaks when manipulating camera from the editor. This occurs both on Android and Windows
1000059444.mp4
882d607
to
e75d88f
Compare
Fixed.
As I said before, this sounds like a popup bug on Android, unrelated to the PR itself. I can't even test for a workaround on my end, as I don't own a tablet. |
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.