does gdnative script allow c++ scripting or not?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Apianbelle

so, I am switching over from unreal engine, (the 2D editor sucks!) and moving my project to Godot. I love using C++, it’s the programming language that I am most comfortable with, and I heard that you can use c++ to develop the entire game under godot, but I was wondering if gdnative let’s you script in c++ like in ue4?

For game logic, it’s recommended to use GDScript over GDNative since it has much better usability – on top of not having any compile times to deal with. Performance is more often than not good enough, and GDScript offers optional static typing :slight_smile:

Calinou | 2021-06-26 23:15

alright. thanks! I might try to get used to gdscript. I am just way more familiar with C++, and the way it handles things.

I couldn’t help but notice that gdscript is kinda like python. am I correct?

Apianbelle | 2021-06-27 00:19

For game logic, it’s recommended to use GDScript over GDNative since it has much better usability

Depends on particular game structure actually.

For instance, I came to Godot from another (rendering) engine and most of my logic (AI, game entities, relations) were already written in C++, so there’s no point for me to reimplement this in GDScript.

But yes, as introductory step I’d also recommend (at least to be familiar with) GDScript.
Although my projects are mostly C++, I use GDScript too, for prototyping, configs, debug.

C++ is more capable as a language, but it requires additional setup (sometimes not very obvious for newcomer) where GDScript is ready to use from the start.

sash-rc | 2021-06-27 10:49

:bust_in_silhouette: Reply From: sash-rc

“Gdnative script” is a shared library (dll/so) compiled from native code languge like C/C++/others… that can be used instead/with GDScript.

Don’t know if this counts as “scripting like in ue4” :slight_smile:

That counts. thanks! appreciate the help!

Apianbelle | 2021-06-27 00:17