+1 vote

Hi all,

I've been reading the godot docs for couple of days now. I have previously used cocos2dx, a C++ game engine. The godot seems to be a viable alternative to cocos2dx and it seems to have better tools for building maps, particle systems and animations. In cocos2dx the visual editor is cocos creator, which is not available for Linux and is closed source and does not support C++ (yet) but only javascript. That means no editor for me.

Now the question: Can one use godot and its awesome-looking editor and still code the game with C++? In docs it seems that the engine can be extended using C++ but I would only like to code my game logic with it.

There are not many C++ capable free game engines around. cocos2dx is pretty much the only good one around but not many are happy with it. UE4 is very big and not free. There could be a big market share for godot if it just could fill the need. It is not far away, at least.


asked Apr 15, 2017 in Engine by ast (13 points)

3 Answers

0 votes

You can technically still code in C++ by building a module and having Godot use it, or by just modifying the engine directly. Both of these methods require recompiling the entire engine, though. Here is some documentation about making modules in C++, but keep in mind that the use of GDScript is almost always preferred.

answered Apr 15, 2017 by Taylor Hansen (19 points)
0 votes

Any reason to use C++?

You can create things really quick with GDScript to see if work first (is a OOP based language too so should not be a problem to use), then make modules on C++ with exactly the same logic.
People use to do this on critical parts of the games, where max performance is needed.

More or less like in Unreal.

Check GDNative post, Godot 3 will be able to use the engine API with almost any language (there are people working with Rust, Lua and others) but I would not recommend to use C++ (and I love { } ) or any languages without knowing the engine first.

Godot 3 will support C# too (not via Native scripts) but GDScript will stay as the main language.

answered Apr 15, 2017 by eons (7,664 points)
0 votes

I played a bit with Cocos2dx, and the C++ part seemed as easy/or difficult as in Godot. I think the compiling time is a bit longer for Godot, but I'm not so sure, here GDNative will make a big difference (too bad is not ported for the 2.1 branch).
Check this project out, you can see the gd script version and the C++ implementation:

answered Apr 16, 2017 by MrMonk (514 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 How to use this Q&A? before posting your first questions.