Godot ...But Faster
HTML-код
- Опубликовано: 27 июн 2024
- Have you been using Godot 4.x and noticed that things are a bit... slower? Specifically the UI lags quite a bit compared to earlier versions of Godot. Well, it's not just in your head, Godot 4.x UI is noticeably slower than Godot 3.x. Fortunately it's fairly easy to fix (with some side effects). In this video we look at how to speed the UI up quite a bit by changing just a single setting... and we look at the consequences as well.
So... it's Godot... but faster.
Links
gamefromscratch.com/fixing-go...
-----------------------------------------------------------------------------------------------------------
Support : / gamefromscratch
GameDev News : gamefromscratch.com
GameDev Tutorials : devga.me
Discord : / discord
Twitter : / gamefromscratch
----------------------------------------------------------------------------------------------------------- - Наука
Links
gamefromscratch.com/fixing-godot-4-x-ui-lag/
-----------------------------------------------------------------------------------------------------------
*Support* : www.patreon.com/gamefromscratch
*GameDev News* : gamefromscratch.com
*GameDev Tutorials* : devga.me
*Discord* : discord.com/invite/R7tUVbD
*Twitter* : twitter.com/gamefromscratch
-----------------------------------------------------------------------------------------------------------
Me who didn't even know you could make windows float ☠️
The lag is because Vulkan Swapchain creation!
Swapchain is the thing that contains the Window contents.
Okay but is there a fix for that or it's always gonna be this slow if you want floating windows?
@@michaelzomsuv3631 yup it can be done (in theory) if editor render menu ui in the same view port as menu bar and only create child window for menu panel if the size (width and height) exceeds window size
@@michaelzomsuv3631Fix will definitely come sometime, of course. There are many developers within the community. You just need to report the bugs if you found some.
@@michaelzomsuv3631sadly no. Since there are now multiple windows with multiple swapchain.
@@ujugamestudio Excuses are not solutions. What you provide is an excuse, but solution definitely exists, otherwise there would not exist any vulkan apps on windows with multi-window support that don't lag. Yet there are plenty. It's just an embarrassing bug that needs to be fixed.
I didn't see much of a difference, but then again I use windows, so I'm use to slow menus, bad memory management, and a unresponsive interface.
lol🤣,windows🤣
It's also happening on my mac
This slow down with menus in multi-window mode seems to be specific to Windows. On macos menus are native so you get the native experience and on Linux they are drawn in the same way in single or multiple window mode and are responsive.
It seems on Windows menus draw differently with multiple window mode, maybe they use actual system windows?
This! I was scratching my head why I could not reproduce the issue.
Nope. I'm on Fedora Workstation 40 and I can notice a huge difference
i'm on arch with wayland and single window mode really helps
Using Ubuntu with plasma, this setting cause a lot of issues, like loss of keyboard focus, leaving the editor unable to work until restart. I have to turn it off too
Now the smart implementation would be to switch to this slower behavior only when at least one window was set to floating...
That can't be done. The menus are floating windows. All popups derive from the Window class, and that includes popup menus. So with the single window mode off, each menu is actually a new floating window, but with no border, no draggable or resizeable, etc.
The setting also (I'm guessing) doesn't work nicely on Wayland out of the box and requires additional configuration bc it doesn't support multi-window apps well yet (forced window positioning).
@@Caellyan Godot works as expected in wayland. Not sure what it's doing to assure menus are placed at the cursor though if they are windows. I guess they just have some flags that tell the window manager to place them at the cursor or something. Otherwise, if you're just dragging your own undocked panels around, the application doesn't need to care about placing them for you. A smart window manager may even notice the named child windows associated with godot and restore their original positions.
@@skaruts By "popup" I assume you mean "dropdown"? If all dropdowns derive from the Window class and that's what causes the lag issue, why does turning single window mode on solve it? Don't get this the wrong way I'm just curious and don't know much about Godot's implementation. Does turning that setting on cause the application to use different UI dropdown instances that don't derive from the Window class?
@@skarutshow this works when the config is deactivated? What are the popups?
I find it very hard to believe it's not possible to have both. Seems like either a design flaw or a bug.
A design flaw? In Godot? Surely not! 🙄
hold on, Unity is busy for 3:37…
Another option is to to go Project Settings > Display > Window > V-sync Mode --> disabled.
I found that the lag went away after restarting Godot.
And yes, frustrating glitch.
I was going crazy excited about the floating window thing so I could Godot with my two screens, but I realized I´m so used to the one window workflow once I started using version 4.2 that this is even better, I hate lag in GUI overall.
I never undock windows and was super annoyed by the largginess of godot 4 after I went through the trouble of moving my project to the new version, ty!
kind of a deal breaker for me personally, I can sacrifice the speed for floating windows. I float the script window too much and enjoy that workflow.
Maybe the problem is because the menu is being drawn as a borderless OS window when the option is turned on (but I don`t know exactly if this is true, I may be wrong here)...
Perhaps creating and drawing a new OS window in this context is way slower than drawing the menu "inside" the main window application.
Not being able to have a separate code window used to be a negative for me, but then by the time they made the editor have floating windows I got used to the single window workflow and never use it anyways.
I use a large 4k tv instead of multiple monitors, and I wish more apps were designed for that. The Epic Game Store, Steam, Godot, etc all occupy a large portion of the screen, regardless of the resolution. I like how in LMMS you have floating panels inside a main window, and a scrollbar appears at the bottom if you snap it to one side of the screen. It's open source so anyone is free to adapt that feature.
Thank you.
I can't reproduce the lag. Using Godot 4.2.2 Stable Arch-Linux version.
Could this be a graphic driver problem?
I still don't see a difference. Not enough that would make a difference anyway
It really depends on the workflow you have and the speed at which you work at. The difference to me is significant enough to be annoying as it causes me to slow down going through menus for them to catch up.
Those flashes are annoying and even harmful for epileptic people.
@@internet8080what flashes?
@@jaredjones6570 pause the video when he shows the comparison and go through frame-by-frame with the , and . keys
you will notice that in the "fast" those menu popups appear instantly completely rendered
In the "slow" version they first appear as a grey box before the menu items load in and get rendered.
That delay registeres as flashing for many people and can cause eye strain, headaches and problems for epileptic people (i can't verify that myself but based on what we know nowadays there is no reason to doubt that statement)
Especially on low-end systems it can flicker even more as the UI takes multiple frames to render the changes.
@@xormak3935 that's only a problem if you do it like in the video, and you problably aren't doing that when normally using the program.
I did not notice that issue, but it's good to know a workaround and what it entails
I just tested this out and it was the same (fast) speed with both single window and not. I'm running 240hz monitor though so I wonder if that helped mitigate the issue?
thanks this is something I did not notice much but is nice to know.
Thanks man, that actually helps me with another problem, I get same weird flashing when I try to rename the nodes.
huh, weird...mine is fine without that setting?? I'm on linux, might just be handled different on the linux side...maybe it has something to do with the os and window management???
I had to immediately check after seeing this though :)
Its a windows issue.
It would be good to see an explanation from GODOT.
Probably something to do with the Windows (the OS) implementation, I'm using GNOME with Wayland and it is instantaneous even with the single window mode turned off.
Could have been an email 😅
i did feel that and thought something was wrong with my client...
this actually fixed my issue
I don't use multiple monitors, so I'd prefer to not float a window anyway. That's one of the changes they made to GIMP that I loved, is when they got rid of floating windows by default.
Very useful, thank you.
My question is why is not checked by default??, what is the purpose to use multi windows
Single window mode is just more reliable all around, there's also a funny Wayland fractional scaling bug where in multi-window mode popups slowly roll up.
Gotta be honest, not sure the 50ms difference makes any real world difference. Maybe if you’re developing on a potato, but anything not a celeron made in the last 10 years or 15 years probably isn’t going to be a problem.
Our machines are basically super computers, I compute over a million tiles in a second in my game but they can't get a freaking popup in 50ms?! The fact you just roll over and take it is disturbing.
what kind of pc do you need to recreate the lag?
I don't need floating windows anyway.
Godot...But the same speed as I speak
I like the Gobot's little hat on the thumbnail.
Even in the video I could see the UI lag. Nice find.
I've noticed that the editor in general runs worse on windows compared to mac or linux. Besides this not being a thing on my mac, my project is fully loaded in less than a second on it while it takes like 10 on my mid-high range windows desktop. I wonder what that's all about.
Its almost certainly because most of the maintainers are mostly linux drivers and most of the windows drivers tend to be godot consumers, so suboptimal windows implementations for things tend to happen more, mac is a unix system so its closer similarity to linux alongside its stranger language infrastructure almost certainly makes it less dumb, alongside windows being a pretty bad OS for development in general.
Fun fact it also fixes recording in obs if you are recording godot as a specific window. Very halpfull for devlog timelapses
no lag on linux version from my testing
Just violent flashes to black (nVidia + Wayland is a nightmare)
I also experienced very little difference except for specific conditions that I started to notice a while ago, such as popping out the shader text editor to it's own window made typing feel less responsive and slowed down the main window
@@chrismcpherson7582 not really. nvidia 555 USE PROPRIETARY DRIVER and that fixes it.
Thanks for the tip.
I use VSCode for Godot, so I never have any floating windows anyway.
vscode is a laggy POS anyway, so I'm sure you're used to it.
@@lordofthe6string Not my experience.
I don't have seen the difference seeing the video on my phone.
Maybe using on the pc i can see. Msybe i'm seiing the video on 30fps and the diff is minimal
I never thought godot 4 was slow.
Note I did say faster, not fast.
What I want to know is, how do I make Godot not open in full screen?
I just give this a try, and turning off the single setting, also removes the ability to Maximize the region editor on sprites.
Why do u have the task bar icons centered.
I need to decouple the script window. The UIX behavior otherwise trips me every single time. Closing a tab thinking you are closing the script code but you are closing the scene and nothing changes on what you are seeing...
Why don't you use vscode with the godot extension for scripting?
While this is a good temporary fix, this issue doesn't seem to bother me much. Hopefully it will be fixed in a future release.
Someone will definitely send a pull request to fix it. swapchain is very flexible. Theres definetly workarounds.
You said to turn Single Window Mode off, but you turned it on. So which is it?
Wording when talking about a toggle is odd. Toogle the checkbox for On to Off... Yeah, it's confusing
@@gamefromscratchit's not ambiguous, you turned ON both the checkbox (by placing a tick mark in it) and single window mode.
Cool.. Thank you😊
Cool.. thanks mate
Was it that so slow and laggy?
I never consciously noticed, but I also don't use the floating window functionality so there's no reason for me not to enable that. Some people will also probably argue that even if its a 0.01 second delay, multiplying that by the million times you are using the UI adds up.
@@beep_frog The opposite problem of stacked menus or weirdness where you have to keep the pointer from leaving a multiple sub-menues that changes the size as you move the cursors around on webpages etc... So many web pages has menus so frustrating to navigate and the INSTANT you move the cursor a pixel off you lose the hole menu chain.
Even computer programs with drop downs like this can be a pain in the ASS. I rather take a menu with this tiny delay then a drop down that moves around or simply can not be used without slowing down or get into menus you where in no way actually trying to get to. So many product pages and company websites has failed to sell their product simply based on menus being a deal barker to navigate. Some website in particular seem to be hiding what your actually trying to find and buy. It is that bad trying to navigate such places.
Dragging the mouse at different speeds doesn’t allow for a fair comparison.
You can still see that in 3.x the old menu disappears and the new one appears instantly when in 4.x there's a short pause (.1 - .2s?). What I would like to see though is testing other UI elements. Too lazy to check it myself
I would have used a desktop capture or something 0:55 to have a side by side. Comparison, because they way you did it, it’s not really conducive of “is this really faster” 1:30
Look up kerning.
Coming from web development where multi monitor setup is common and expected, I was always confused why neither Godot or Unity really supported multi monitor. But now Godot does and I really need to squint to see the lagginess so I will definitely keep single window mode off. But awesome that the option exists for those who don't need it.
This guy is boss
How bout that.
The only thing faster than Godot maybe Sonic or the flash.
Cool I guess but doesn't seem like all that much of a trade-off to me. I'd rather be able to undock windows.
Neal Peart
Bronny
Treason
I have no lag in 4.2.2
well dam..
Godot + faster = Wentdot
i feel like "faster" is a bit misleading. "more responsive" would be more appropriate, imo.
👍
What IS really laggy in Godot is zooming in with code editor. It's so slow.
UGH. I can't STAND when I try to hit Ctrl + Backspace and accidentally hit the plus button, which is mapped to increase font size, forcing me to sit there for 20 seconds as the editor has an aneurysm
Fortunately, as I was writing this comment, I remembered I can just remap that shortcut to something else, but I still don't know why the lag happens when in 3.x changing font size was near instant (and helpful sometimes for me)
@@jlewis4441 it's so frustrating. It's why I've just been coding with VS Code.
This comment made me curious, so I did some research and it looks like this is already fixed for the upcoming 4.3 update (see pull request #88474)
This has been fixed in 4.3
Clickbait video, but thanks anyways
Well I ain’t using that anyway, it’s basically useless XD
😲
One thing i don't like Godot the don't let you make the layout in the order you want,
And only let you put those floting on the left side right side.
I don't know why the don't let people to have whatever layout the wand like most software's do.
For example if perfect to have the file browser on the button that my disition why Godot don't let you do that ?
Godot has made a philosophical decision to be slow.
Only on windows.
@@Spartan322Windows is literally 90% desktop, you can't deny that. That means for 90% users it'll be inexcusably slow.
@@charlieking7600 Pretty sure Mac is at like 20% of the desktop marketshare, Linux is at minimally 5%, (and that's only if we consider the western world, China, India, and Russia greatly disrupt that) but either way my statement had no opinion on amount of users, its not a philosophical decision to be slow, its a simple product that most Godot maintainers are Linux drivers, so Windows gets secondary attention because Windows devs are a smaller portion and most developers actually tend to greatly dislike Windows.
@@Spartan322 Not true. I'm on Fedora with Gnome and I can notice the difference
@@catto-from-heaven What GPU are you using? Also Wayland?
For me there is no difference. Maybe this only happens on slow computers
The machine you saw this on was a i9-13900HX with a 4090 GPU and 64GB of RAM. If that's slow, we've got issues.
Are you on a different platform than Windows?
Godot has been in open-source development since 2014 (ten years) and several years was in commercial production.
And it still has performance troubles and weird decisions (e.g. you can't use profiler without scene being loaded twice - in editor and in opened window, it loads GPU with unnecessary work (especially bad for 2 Gb VRAM cards)). And many users still claim this engine is going to be Blender of gamedev. Did software freedom and donations help? They didn't.
But hey! Don't forget to donate! Juan needs your money! 15 million bucks gathered with W4 games aren't enough. Maybe it will become Blender of game engines... In next decade.
Complaining about such only after you get kicked from the project is a good way to make your complaints look hollow and meaningless. Where were these "legitimate" criticisms before that drama went down? Makes it pretty suspect why they were contributing when it was always going in the same direction, why did he never speak out before getting kicked?
Still sore that your contributions weren't good enough, eh? Aww. Maybe try dragging yourself up rather than trying to drag other people down with your Iies.
Yo first
you guys play too much FPS and get all sensible by such small things...
Modern hardware is able to do wonders, why UI has to be really slow?
Maybe you just have low standards.
The level of engagement here is top-notch. It's clear that everyone is deeply invested in the topic at hand.🔥
It's refreshing to be part of a community where respectful disagreement is not only allowed but encouraged.😘
those spambots make less sense every day