3 ms·
GDScript doesn't have a GC which is a plus for people who want predictable performance. It also avoids bloating the runtime. If someone is making a HTML5 game t
by charcircuit 3y ago
GDScript doesn't have a GC which is a plus for people who want predictable performance. It also avoids bloating the runtime. If someone is making a HTML5 game they will not want to distribute a big WASM blob of the python runtime.
If people want to use python instead of GDScript they are free to do so.
https://godot-python-extension.readthedocs.io/en/latest/ https://godot-python-extension.readthedocs.io/en/latest/
- rezmason 3y agoI think you're right, and want to offer some additional perspective. I made a very, very simple game in Godot 4 with my friend this fall. To build for the web target, I ported our C# to GDScript, and it wasn't so bad. The resulting webstuff was 50MB without audio. I ported it again to JS, and it's 50KB without audio. Maybe 150K with audio. About the size of two favicons. Yes, the game is very very simple ( https://rezmason.net/fluid https://rezmason.net/fluid , still refining it), but the difference between 50K and 50MB is still significant. If we had used some kind of Python to WASM toolchain, I don't know what size the project would be, but probably more than 50MB. With C# in the mix, and mono, or whatever, it would be even larger. One of the reasons we explored Godot this year was to try other ways of producing things. GDScript helps maintain Godot's distinction from its competitors, and I'll reach for it whenever I need to make #ThatKindOfThing.
- deleted 3y ago[deleted]
- charcircuit 3y ago>The resulting webstuff was 50MB without audio. That sounds about right for a full engine build before compression. When optimizing for size with Godot you rip out the parts of the engine you don't need. From what I remember some of these are not that hard to remove like 3D support. It still will be more than what it would take just doing it from javascript so you would want to make sure Godot is actually bringing value to the project.
- neonsunset 3y agoThere is no free lunch in technology. Strict reference counting is always more expensive than GC. Theoretically, compiled languages with extensive lifetime analysis and reference counting elision could produce better performance (think Rust borrow checker and lifetime annotations but you don't do the heavy lifting) but this is yet to be done and no language has this today (Swift is slower than top tier GC languages at this).
- charcircuit 3y agoMy word choice of "predictable performance" was deliberate.