Can I program everything in Godot in C++

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

I know C++,Java and Python.But my real problem-solving ability lies in C++. It is not that I can’t learn Gdscript but i am highly (really highly) comfortable with C++.
Can i Program everything (from programming game to extending the engine to everything possible) in godot in C++ (any sideffects associated with it)
you can even add more facts in answer !!!
THANKS !!!

:bust_in_silhouette: Reply From: player0815

Theoretically this should be possible. I recommend to have a look at the basics of GDScript. At the moment I also get to know the engine. I also know C++ and Phyton. And I prefer C++ too. But simple things can be done in Godot much faster with GDScript. GDScript resembles Phyton anyway, you won’t have a hard time learning it.

Some facts:

  • compile time is very long with C++ (testing your module needs much more time, than hit F5 key with GDScript)
  • with GDScript you have a much easyer posibility to get access on different objects.
  • You can create reusable nodes by copy and paste the script (and instancing it).
  • if you want high performance e.g. for terrain generation you can write a prototyp in gdscript, to check your algorithm and after that write your module in c++…
  • try the shader language, its very close to C and can do very interessting things^^

The Question is not: c++ vs gdscript. In my opinion you should use both, if you can combine advantages of both :slight_smile:

Thanks
Open source projects like Godot is just standing because of programmers like you.

By the way how much time will it take me to learn gdscript,knowing that i am well versed in python.
Also tell me the best way to learn gdscript (Books will be the best option)

Abhishek | 2018-10-07 20:21

since you can python, it’ll only take a few minutes. What takes a little longer is to get to know the API. (knowledge of game dev terms helpful too)

I have simply taken this link to the hand

GDScript — Godot Engine (3.0) documentation in English

and started building small projects. Take a look at tutorials on Youtube and browse through the documentation

Familiarize yourself with the surroundings. If you have an overview, you can also start with modules in c++.

in few days your a ready for your fist little project, if you wish^^

good luck and happy coding :smiley:

player0815 | 2018-10-07 21:52

:bust_in_silhouette: Reply From: MysteryGM

You will want to take a look at the Godot GDNative.

First read this:

Then this:

Then this:

Also this:

:bust_in_silhouette: Reply From: ProggerParrot

For me it is a really good way to write my daily gameplaycode with simple python-styled GDScript. And when i have some more complex stuff or need some performance optimizations, then you can perfectly use the c++ solutions of Godot to hide everything behind the engine or a shared library.

I have here a short Steam Guide where the most important stuff is collected :slight_smile:

Steam Community :: Guide :: Using C++ to build complete Games in Godot!enter image description here