Godot Version
4.6.1
Question
What types of games could I develop in C++ using GDExtensions that would be very hard or impossible in GDScript?
4.6.1
What types of games could I develop in C++ using GDExtensions that would be very hard or impossible in GDScript?
Probably something like total war or UEBS would be a struggle with GD Script, unless some heavy object pooling was used.
Anything with heavy simulation / raw calculation. However, there is always C# supported natively that you can use, which can achieve almost the same level of performance as C++, and you can mix-and-match it with the GDScript for all these hard calculations.
Minecraft
Thanks im looking for pure c++ game , no gdscript and no c#
Why? What are the C++ benefits here?
What are the C++ benefits here?
The large crowd usually uses vertex animation tricks, no?
C++ benefits are always and everywhere the same - performance ![]()
Why? You should offload as much as possible on GDScript. It plays extremely well in concert with C++. And doing high level logic as an extension doesn’t make much sense when you have the convenience and immediacy of GDScript at your disposal.
The best workflow is to quickly implement/prototype a feature in GDScript first. If it underperforms, consider script threads or compute shaders. If those are not suitable - kick it to C++. In some occasions, when it’s obvious that the thing will demand high performance on the cpu side, go directly to C++.
I wouldn’t know , but those games are notoriously CPU heavy.
I lean on C++ pretty heavily in my current project, but I absolutely use GDScript everywhere/anywhere I can.
The reason is precisely as normalized suggested: performance, specifically the things wchc mentioned earlier: simulation / calculation.
I am not making your typical game though, and for most typical games the engine probably provides all you need (in terms of performance critical code), so in general the answer here is going to be: atypical games.
My particular needs that are delegated to C++:
So in my case I guess it boils down to a non standard game world (being the world), non standard architecture (event driven) and needing to generate a lot of stuff (procedural generation).
I use GDExtensions for a RISC-V emulator and assembler in game, it is very hard to emulate 32 bit architectures in GDScript given int and float are always 64 bits. I also find writing the parser easier as GDExtension can access each byte in a string as a byte, rather than as a String.
You are not using GODOT build in Event queue? with the signals and all ?
What do you use ?
Are you doing programming type of games? I also managed to embed a JS interpreter into GDExtension.
A heap.
Maybe not entirely obvious from my previous post, but I am essentially using Godot for the ‘front-end’ of the game. None of the objects in the simulation proper are derived from godot types, so they can’t emit signals nor listen for them.
An MMO.
You can do anything in C++, including every type of game. C++ is used with UE5. The benefits of C++ include efficient memory management.
Or massive memory leaks if you are not careful.
oh yeah
You must use Valgrind or some other tool to track memory leaks or you are guaranteed to leak memory very efficiently. I have used C++ quite a lot, but the memory management is the reason I nowadays rather use other programming languages.