‹ BackHN Continuity

Thread

Using any C++ library in Godot

168 points · 66 comments · czoido

  1. voodooEntity · · focus · HN ↗
    Was playing arround recently building an RTS with godot until i just hit the ceilling of what i could handle with gdscript performance wise.

    Than started to move alot of heavy logic to c++ simulation : tedious indeed but the results speak for themself.

    Basically allows me to use godot for things like menus dialogues and similar stuff while running the true heavy work in a c++ simulation.

    1. momocowcow · · focus · HN ↗
      gdscript is incredibly slow, worst than something like lua, maybe only good for handling the UI events

      the hierarchy and physics api isn’t great either, it’s easy to hit heap allocs even from a gdextension

      a lot of things wrong with this generic engine, but at least it’s lightweight

      1. tancop · · focus · HN ↗
        Godot is only the best open source engine because Bevy is not ready for production, Lumberyard/O3DE is hard to set up and everything else is ancient or 2D only. one eyed man among the blind type shit
        1. tapoxi · · focus · HN ↗
          Godot is the best open source engine because it is dead simple to use, comes bundled with its own IDE and documentation, the editor runs on any platform that Godot runs (including the web) and the performance benefits for something like Bevy only apply to a handful of games that really need it.

          Godot gives GDScript simplicity for the vast majority of use cases which is that iteration boon, provides C# for games that need the additional guardrails. For performance critical game scripts you can just jump to C++, Rust, Swift, etc.

          But most game scripts are not performance critical. Clair Obscur: Expedition 33 swept the game awards last year as an Unreal Engine game made using almost entirely visual scripting (blueprints).

          1. pjmlp · · focus · HN ↗
            Also Unreal C++ has a GC, exactly to have easy interoperability between engine code and C++ components exposed to Blueprints.
          2. krapp · · focus · HN ↗
            It still bothers me that game engines come with their own bespoke languages like GDScript. Godot is a bit better than others for having C# support and forks in other languages but really no other language will ever be as integrated with the framework as GDScript, And GDScript is never going to be a general purpose programming language, and that necessarily creates lock-in.

            I'm currently messing with some old projects written in Game Maker 5 and let me tell you it would be so much easier if I didn't have to do internet archaeology just to figure out how GML worked 20 years ago.

            1. pjmlp · · focus · HN ↗
              Because it is much easier to have a custom language, than try to subsetting an existing mainstream language, while having to deal with all the mess of people trying to use random stuff on the engine, that naturally isn't supported.

              Example, see all the bad rep .NET and C# get from devs that only know them from Unity, full of legacy stuff and restrictions, instead of using the real product.

              1. krapp · · focus · HN ↗
                That seems like more of a feature than a bug to me. Using C# in Godot means you have all of the Nuget libraries at your disposal, whereas no one is writing libraries in GDScript, because no one is using it outside of Godot.

                Meanwhile to extend Godot usefully you have to use C++ and a plugin API that's arguably no less complicated than adapting an existing language as the scripting language would have been.

                1. pjmlp · · focus · HN ↗
                  But that is the thing, you don't have access to all the NuGet libraries, or even CLR/MSIL abilities, it is a hit and miss depending on what platforms are being targeted.

                  Sure if you only want to target desktop/laptop computers, you're safe.

Open on Hacker News to reply ↗

Unofficial Hacker News client; not affiliated with Y Combinator.