+8 votes

Does the Godot Engine supports fully C++?

in Engine by (23 points)

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

2 Answers

+6 votes
Best answer

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 http://docs.godotengine.org/en/latest/reference/custom_modules_in_c++.html

by (28,835 points)
selected by

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

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 ;)

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

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.

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)

+4 votes

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 :)


enter image description here

by (128 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.