Using any C++ library in Godot

(blog.conan.io)

33 points | by czoido 1 hour ago

8 comments

  • voodooEntity 6 minutes ago
    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.

  • MeteorMarc 12 minutes ago
    So, what profiling support is available to find the critical parts of your GDscript or C# code. Before needlessly jumping into c++ hassle for performance reasons? Tfa addresses functional reasons, which is ok.
  • valorzard 1 hour ago
    If you know rust, the Godot rust bindings for GDExtension are also really good and let you use any Rust library in Godot (including tokio and async rust if you really want) https://godot-rust.github.io/
  • jokoon 37 minutes ago
    So it requires writing a CMake script, some python, and some weird C++ code.

    A bit tedious but that's how it goes.

    • OsrsNeedsf2P 26 minutes ago
      The point is that it's compatible, not that it's the recommended way of doing things.
  • hnacobsxph 21 minutes ago
    Static linking libstdc++ with -fvisibility=hidden saved me on Linux, though it bit me the day I needed exceptions to cross the boundary.
  • fwsgonzo 1 hour ago
    Just don't forget the versioning script needed on at least Linux. It's either that or build with the same older distro Godot uses, so you have a matching libstdc++ version. You can link with a newer stdlibc++ but you will need a linker versioning script that hides your impl from the dynamic linker so you don't get random ghosts in your machine.
    • czoido 41 minutes ago
      Hi! Yes, you are right, thanks for pointing this out. It's something to keep in mind when distributing an extension for Linux. I have just updated the post with a note about it.
  • zerr 1 hour ago
    > // Copy the position of every entity into the MultiMesh buffer

    So, is a zero-copy impossible due to world (C++ vs Godot) boundaries?

  • ill-ion 1 hour ago
    [dead]