Hacker News new | ask | show | jobs
by amarsahinovic 3183 days ago
GDScript will not be replaced in 3.0 but they will add support for other languages, like C#.

Personally, I find GDScript quite OK since you can treat it just like Python, and I think there are some interfaces that enable you to use real Python in Godot (check out their blog).

1 comments

Do you know how the performance of GDScript execution compares to something like Python embedded in an engine where the more costly operations are run in compiled C or C++ code? Or even how the real Python performance in Godot compares to the GDScript performance?

I tried to find this out, but the one "benchmark" I found was somewhat dubious. The Godot documentation claims that GDScript has all sorts of advantages over using other scripting languages that sound qualitatively superior, but it lacks quantitative comparisons.

> The Godot documentation claims that GDScript has all sorts of advantages over using other scripting languages that sound qualitatively superior, but it lacks quantitative comparisons.

The advantage of GDScript is that all its primitives are the same as the C++ primitives that lie underneath. It's memory management model is the same as the engine's, etc... A GDScript function is a C++ function. GDScript is completely integrated into the engine, so if you're doing typical game-dev sort of things, there's literally no overhead.

If perf is an issue check out GDNative. Then you can code in Rust, D, C++ etc with Godot.
That looks like a nice way to add support for other libraries or optimize certain operations. But I'm more interested in a comparison between dynamic languages for quickly writing game logic. It's a pattern that seems fairly common (e.g. with Lua or Python bolted onto C/C++) and Godot's implementation of that idea is very unusual. They claim benefits for it, I'm curious if those benefits actually pay off in some quantitative fashion.
Main advantages are tight integration with engine and ease of use. As I wrote here: https://news.ycombinator.com/item?id=15310477 GDScript is not very fast but It's rally an issue. In 3.0 where we will have C# and GDNative it won't be an issue at all.
That is an exceptionally useful answer for me because I'm considering this for a strategy game with tilemaps. Thank you.
It's in the ballpark of 100 times slower than C/C++ code, which is about the same performance of Python.