Can I write a full game with just C++, or is GDScript necessary?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By anonyme0
:warning: Old Version Published before Godot 3 was released.

Does the Godot Engine supports fully C++?

I also need help with my programming homework. Can anyone help me?

vall81 | 2018-01-11 14:49

:bust_in_silhouette: Reply From: Zylann

You can use C++ entirely if you want, the functions, classes, nodes etc are the same. Actually, Godot is built in C++, developping your game this way means you simply add code to the engine for your game. It’s usually done through a module so the code stays organized. More info here Custom modules in C++ — Godot Engine (latest) documentation in English

Would you recommend me to do so? (I mean coding a whole game in C++)

anonyme0 | 2016-10-12 00:21

No, I would recommend writing the game with scripts first. Then if some parts of your game require a lot of CPU power, you can move them to C++.

The reason is that you will make progress a lot faster with scripts, and you’ll come up with a prototype more easily. And only then, you’ll figure out if you need C++ performance or not. If you don’t, then you gained a lot of time not trying C++ first. If you do, then it’s fairly doable. It’s harder and slower to develop in C++, that’s why prioritizing scripts is better IMO.

Note that Godot allows you to write parts of your game in both languages, the CPU-intensive part in C++, and gameplay in GDScript.

Personally I like C++ a lot, and writing some with Godot is good for learning the inner workings, contributing and customizing the engine to the maximum. But for gameplay… not so much. It depends on you, your project, team size and skills :wink:

Zylann | 2016-10-12 01:05

Thanks for the answer! Is there any example of fully C++ programmed game using Godot engine (I haven’t found one yet)?

anonyme0 | 2016-10-14 00:21

I don’t think a game has been made entirely in C++ with Godot, but you can find C++ modules on Github to take example on. There are some in the modules/ folder of Godot itself (GDScript, Gridmap and the IK node are modules). I also made three modules myself, to integrate noise generation and Minecraft-like terrain.

I think you still need to create a project and scenes because that’s the entry point of the engine, but nodes within the scenes can be C++. You could also bypass the nodes thing by using only the servers (VisualServer, PhysicsServer, AudioServer…) but it’s harder and a bit pointless tbh.

Zylann | 2016-10-14 20:03

Are there some C++ examples so we can download them and compile them to test? For example test a player animations and move in a 3D map? (other game engines like Irrlicht provide this)

baptx | 2018-08-12 16:15

:bust_in_silhouette: Reply From: ProggerParrot

I know the Answer comes very late, but a lot of people are interested in building entire games with C++ in Godot Engine.

So I’ve made some videos about this topic, and collected the most importand onces here in my Steam guide :slight_smile:

enter image description here