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
    -----------------------------------------------------------------------------------------------------------
  • НаукаНаука

Комментарии • 158

  • @gamefromscratch
    @gamefromscratch  3 дня назад +2

    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
    -----------------------------------------------------------------------------------------------------------

  • @shaon1412
    @shaon1412 3 дня назад +46

    Me who didn't even know you could make windows float ☠️

  • @konkitoman
    @konkitoman 3 дня назад +113

    The lag is because Vulkan Swapchain creation!
    Swapchain is the thing that contains the Window contents.

    • @michaelzomsuv3631
      @michaelzomsuv3631 3 дня назад +8

      Okay but is there a fix for that or it's always gonna be this slow if you want floating windows?

    • @lalishansh
      @lalishansh 3 дня назад

      @@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

    • @TheOne11111
      @TheOne11111 3 дня назад

      ​@@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.

    • @ujugamestudio
      @ujugamestudio 3 дня назад +1

      ​@@michaelzomsuv3631sadly no. Since there are now multiple windows with multiple swapchain.

    • @LudvikKoutnyArt
      @LudvikKoutnyArt 3 дня назад +23

      @@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.

  • @terencemolloy9450
    @terencemolloy9450 3 дня назад +37

    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.

  • @Gdquest
    @Gdquest 3 дня назад +53

    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?

    • @ElMarcoh
      @ElMarcoh 3 дня назад +4

      This! I was scratching my head why I could not reproduce the issue.

    • @catto-from-heaven
      @catto-from-heaven 3 дня назад +4

      Nope. I'm on Fedora Workstation 40 and I can notice a huge difference

    • @lithiumsurfer
      @lithiumsurfer 3 дня назад +3

      i'm on arch with wayland and single window mode really helps

    • @mapopi-mm
      @mapopi-mm 3 дня назад +2

      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

  • @plehmann2595
    @plehmann2595 3 дня назад +47

    Now the smart implementation would be to switch to this slower behavior only when at least one window was set to floating...

    • @skaruts
      @skaruts 3 дня назад +6

      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.

    • @Caellyan
      @Caellyan 3 дня назад +1

      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).

    • @Aeduo
      @Aeduo 3 дня назад +3

      @@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.

    • @dotcomstruggle
      @dotcomstruggle 3 дня назад +3

      @@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?

    • @ivensauro
      @ivensauro 3 дня назад +2

      ​@@skarutshow this works when the config is deactivated? What are the popups?

  • @kebrus
    @kebrus 3 дня назад +7

    I find it very hard to believe it's not possible to have both. Seems like either a design flaw or a bug.

    • @sinisterdesign
      @sinisterdesign 2 дня назад +3

      A design flaw? In Godot? Surely not! 🙄

  • @viniciusantonio2253
    @viniciusantonio2253 3 дня назад +30

    hold on, Unity is busy for 3:37

  • @TexSilversmith
    @TexSilversmith 3 дня назад +3

    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.

  • @marcomoscoso7402
    @marcomoscoso7402 3 дня назад +5

    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.

  • @mothra727
    @mothra727 3 дня назад +8

    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!

  • @digital_down
    @digital_down 3 дня назад +3

    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.

  • @vitoralmeidasilva
    @vitoralmeidasilva 3 дня назад +6

    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.

  • @chrismcpherson7582
    @chrismcpherson7582 3 дня назад +2

    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.

  • @m128jg
    @m128jg 3 дня назад +1

    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.

  • @LushContrive
    @LushContrive 3 дня назад +2

    Thank you.
    I can't reproduce the lag. Using Godot 4.2.2 Stable Arch-Linux version.
    Could this be a graphic driver problem?

  • @slackergeek2007
    @slackergeek2007 3 дня назад +61

    I still don't see a difference. Not enough that would make a difference anyway

    • @NervousNoodles
      @NervousNoodles 3 дня назад +16

      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.

    • @internet8080
      @internet8080 3 дня назад +4

      Those flashes are annoying and even harmful for epileptic people.

    • @jaredjones6570
      @jaredjones6570 3 дня назад +1

      ​@@internet8080what flashes?

    • @xormak3935
      @xormak3935 3 дня назад +4

      @@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.

    • @LetrixAR
      @LetrixAR 3 дня назад +3

      @@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.

  • @5minutemovies977
    @5minutemovies977 3 дня назад +1

    I did not notice that issue, but it's good to know a workaround and what it entails

  • @Freznosis
    @Freznosis 3 дня назад +3

    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?

  • @smashSpikeMC
    @smashSpikeMC 3 дня назад

    thanks this is something I did not notice much but is nice to know.

  • @jiro4559
    @jiro4559 2 дня назад

    Thanks man, that actually helps me with another problem, I get same weird flashing when I try to rename the nodes.

  • @nowherebrain
    @nowherebrain 3 дня назад +2

    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 :)

    • @Spartan322
      @Spartan322 3 дня назад +2

      Its a windows issue.

  • @anth5189
    @anth5189 3 дня назад +1

    It would be good to see an explanation from GODOT.

  • @ninstars
    @ninstars 3 дня назад +1

    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.

  • @yanko694
    @yanko694 3 дня назад +49

    Could have been an email 😅

  • @d_ogo
    @d_ogo 3 дня назад +1

    i did feel that and thought something was wrong with my client...
    this actually fixed my issue

  • @anon_y_mousse
    @anon_y_mousse День назад

    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.

  • @ColorauGuiyino
    @ColorauGuiyino 2 дня назад

    Very useful, thank you.

  • @Huguillon
    @Huguillon 3 дня назад +1

    My question is why is not checked by default??, what is the purpose to use multi windows

  • @tacticalassaultanteater9678
    @tacticalassaultanteater9678 3 дня назад +1

    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.

  • @scotmcpherson
    @scotmcpherson 3 дня назад +1

    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.

    • @lordofthe6string
      @lordofthe6string 2 дня назад

      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.

  • @MAKIUSO
    @MAKIUSO 3 дня назад +1

    what kind of pc do you need to recreate the lag?

  • @scribblingjoe
    @scribblingjoe 3 дня назад +1

    I don't need floating windows anyway.

  • @ranielnascimentoferreira8808
    @ranielnascimentoferreira8808 3 дня назад +1

    Godot...But the same speed as I speak

  • @in-craig-ible6160
    @in-craig-ible6160 3 дня назад +1

    I like the Gobot's little hat on the thumbnail.

  • @JosiahBradley
    @JosiahBradley 2 дня назад

    Even in the video I could see the UI lag. Nice find.

  • @keen96
    @keen96 3 дня назад +3

    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.

    • @Spartan322
      @Spartan322 3 дня назад +3

      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.

  • @Thisisdcode
    @Thisisdcode 3 дня назад

    Fun fact it also fixes recording in obs if you are recording godot as a specific window. Very halpfull for devlog timelapses

  • @Wolfy212
    @Wolfy212 3 дня назад +15

    no lag on linux version from my testing

    • @chrismcpherson7582
      @chrismcpherson7582 3 дня назад +3

      Just violent flashes to black (nVidia + Wayland is a nightmare)

    • @notimportant7682
      @notimportant7682 3 дня назад +1

      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

    • @Ehren1337
      @Ehren1337 3 дня назад

      @@chrismcpherson7582 not really. nvidia 555 USE PROPRIETARY DRIVER and that fixes it.

  • @MaxIzrin
    @MaxIzrin 3 дня назад +3

    Thanks for the tip.
    I use VSCode for Godot, so I never have any floating windows anyway.

    • @lordofthe6string
      @lordofthe6string 2 дня назад

      vscode is a laggy POS anyway, so I'm sure you're used to it.

    • @MaxIzrin
      @MaxIzrin 2 дня назад

      @@lordofthe6string Not my experience.

  • @ivensauro
    @ivensauro 3 дня назад +1

    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

  • @colin_actually
    @colin_actually 3 дня назад +1

    I never thought godot 4 was slow.

  • @PurpleKnightmare
    @PurpleKnightmare 3 дня назад

    What I want to know is, how do I make Godot not open in full screen?

  • @TheRealKaiProton
    @TheRealKaiProton 2 дня назад

    I just give this a try, and turning off the single setting, also removes the ability to Maximize the region editor on sprites.

  • @rch5395
    @rch5395 3 дня назад

    Why do u have the task bar icons centered.

  • @hadrianblackwater9848
    @hadrianblackwater9848 3 дня назад +1

    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...

    • @catto-from-heaven
      @catto-from-heaven 3 дня назад +1

      Why don't you use vscode with the godot extension for scripting?

  • @Xalkomak347
    @Xalkomak347 2 дня назад

    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.

  • @Chevifier
    @Chevifier 2 дня назад

    Someone will definitely send a pull request to fix it. swapchain is very flexible. Theres definetly workarounds.

  • @rremnar
    @rremnar 3 дня назад +5

    You said to turn Single Window Mode off, but you turned it on. So which is it?

    • @gamefromscratch
      @gamefromscratch  3 дня назад +3

      Wording when talking about a toggle is odd. Toogle the checkbox for On to Off... Yeah, it's confusing

    • @tacticalassaultanteater9678
      @tacticalassaultanteater9678 3 дня назад +6

      ​@@gamefromscratchit's not ambiguous, you turned ON both the checkbox (by placing a tick mark in it) and single window mode.

  • @EeVeE3D
    @EeVeE3D День назад

    Cool.. Thank you😊

  • @lehisluguer9300
    @lehisluguer9300 3 дня назад

    Cool.. thanks mate

  • @InsaneAwesomeTony
    @InsaneAwesomeTony 3 дня назад +6

    Was it that so slow and laggy?

    • @beep_frog
      @beep_frog 3 дня назад +1

      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.

    • @TheDiner50
      @TheDiner50 3 дня назад +1

      @@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.

  • @pavva317
    @pavva317 3 дня назад +1

    Dragging the mouse at different speeds doesn’t allow for a fair comparison.

    • @SomeRedTeapot
      @SomeRedTeapot 3 дня назад +4

      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

  • @ThaAftrPartie
    @ThaAftrPartie 2 дня назад

    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.

  • @LupusGr3y
    @LupusGr3y 3 дня назад +2

    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.

  • @rolandixor
    @rolandixor 3 дня назад +1

    This guy is boss

  • @ritzenhauf
    @ritzenhauf 3 дня назад +1

    How bout that.

  • @Ah2o5b
    @Ah2o5b 3 дня назад

    The only thing faster than Godot maybe Sonic or the flash.

  • @sergeantsapient
    @sergeantsapient 3 дня назад

    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.

  • @detritic
    @detritic 2 дня назад

    Neal Peart
    Bronny
    Treason

  • @yakdoggames
    @yakdoggames 3 дня назад

    I have no lag in 4.2.2

  • @justlimeguy
    @justlimeguy 3 дня назад +1

    well dam..

  • @milesparker557
    @milesparker557 3 дня назад +3

    Godot + faster = Wentdot

  • @rios7744
    @rios7744 3 дня назад

    i feel like "faster" is a bit misleading. "more responsive" would be more appropriate, imo.

  • @petrbondar535
    @petrbondar535 День назад

    👍

  • @NesiAwesomeness
    @NesiAwesomeness 3 дня назад +5

    What IS really laggy in Godot is zooming in with code editor. It's so slow.

    • @jlewis4441
      @jlewis4441 3 дня назад +1

      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)

    • @NesiAwesomeness
      @NesiAwesomeness 3 дня назад

      @@jlewis4441 it's so frustrating. It's why I've just been coding with VS Code.

    • @Pokeyoshi19
      @Pokeyoshi19 3 дня назад

      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)

    • @swarkin
      @swarkin День назад

      This has been fixed in 4.3

  • @28082989
    @28082989 2 дня назад

    Clickbait video, but thanks anyways

  • @rogelioayus
    @rogelioayus 3 дня назад

    Well I ain’t using that anyway, it’s basically useless XD

  • @lucazfc
    @lucazfc 3 дня назад

    😲

  • @watercat1248
    @watercat1248 2 дня назад

    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 ?

  • @gostan2718
    @gostan2718 3 дня назад +6

    Godot has made a philosophical decision to be slow.

    • @Spartan322
      @Spartan322 3 дня назад +1

      Only on windows.

    • @charlieking7600
      @charlieking7600 3 дня назад +2

      ​@@Spartan322Windows is literally 90% desktop, you can't deny that. That means for 90% users it'll be inexcusably slow.

    • @Spartan322
      @Spartan322 3 дня назад +5

      @@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.

    • @catto-from-heaven
      @catto-from-heaven 3 дня назад +1

      @@Spartan322 Not true. I'm on Fedora with Gnome and I can notice the difference

    • @Spartan322
      @Spartan322 3 дня назад

      @@catto-from-heaven What GPU are you using? Also Wayland?

  • @rumariomusic
    @rumariomusic 3 дня назад +4

    For me there is no difference. Maybe this only happens on slow computers

    • @gamefromscratch
      @gamefromscratch  3 дня назад +9

      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?

  • @charlieking7600
    @charlieking7600 3 дня назад +3

    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.

    • @Spartan322
      @Spartan322 3 дня назад +7

      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?

    • @BoredOfUnityShills
      @BoredOfUnityShills 3 дня назад

      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.

  • @4eyesgaming587
    @4eyesgaming587 3 дня назад

    Yo first

  • @joaovitorgutkoskipaes1850
    @joaovitorgutkoskipaes1850 3 дня назад

    you guys play too much FPS and get all sensible by such small things...

    • @charlieking7600
      @charlieking7600 3 дня назад +3

      Modern hardware is able to do wonders, why UI has to be really slow?

    • @AHeinermann
      @AHeinermann 3 дня назад +2

      Maybe you just have low standards.

  • @SteffanieQuencer
    @SteffanieQuencer 3 дня назад

    The level of engagement here is top-notch. It's clear that everyone is deeply invested in the topic at hand.🔥

  • @Kirstie-n7u
    @Kirstie-n7u 3 дня назад +2

    It's refreshing to be part of a community where respectful disagreement is not only allowed but encouraged.😘

    • @ItsKorin__
      @ItsKorin__ 3 дня назад +10

      those spambots make less sense every day