3 ms·
What makes gdscript object “heavier” than the c++ classes that implement them? IIRC the docs just mention that creating gdscript objects is an expensive operati
by dartos 3y ago
What makes gdscript object “heavier” than the c++ classes that implement them? IIRC the docs just mention that creating gdscript objects is an expensive operation, but that’s just as true with C# objects because both have memory allocations.
Modern gdscript best practices call for typing, but tbh I think making a game without types is possible and fine (Lua and JavaScript are used to make successful games for example)
Totally true about python. If you’re used to python, gdscript is like writing code in a funhouse mirror.
You don’t need to use godot’s editor. Godot has a built in LSP, so the vscode extension works well. I think they even added a scene graph view.
I mean use whatever you want to make a game, but personally, I find the Godot specific language features really sell gdscript. (Signal connection syntax, $ and %)
I usually wire up signals is gdscript and write actual work (algorithms and math) in dependency-free gdextensions
- TheCleric 3y agoHere is the reference for the base Object class in Godot, so every time you instantiate an object (even if you have defined a simple class without a lot of complexity), all of this gets instantiated and allocated. This is MUCH heavier than a C# base object (which wouldn't necessarily have to be based on a Godot class). https://docs.godotengine.org/en/stable/classes/class_object.html#class-object https://docs.godotengine.org/en/stable/classes/class_object.... Keep in mind I don't say any of this because I dislike GDScript. It's just not the best tool for all jobs in my opinion.
- dartos 3y agoFor sure. No heated debates here! Rollercoaster tycoon 1 and 2 were written in assembly. Great games can be made from anything. Normally when I make Godot games, all of my classes are nodes anyway. I really lean into the “everything is a node” idea. Now if I’m writing some algorithm (A* or marching cubes or whatever) I wouldn’t start with gdscript, so I guess I never really made gdscript objects just off the base Object class before.