Hey folks, I have a little programming style question (Hope I don't start a holy war :P).
I'm a backend programmer that uses OO languages a lot, so I'm used to abstracting things and writing verbose, boring code. I started to realize that I go out of my way to also use GDscript that way. Today I spent some time refactoring this code:
planet_material.albedo_texture = load(planet_data["texture"]) planet_material.normal_texture = load(planet_data["normal_map"]) planet_material.normal_enabled = true
planet_material.set_texture(SpatialMaterial.TEXTURE_ALBEDO, load(planet_data["texture"])) planet_material.set_texture(SpatialMaterial.TEXTURE_NORMAL, load(planet_data["normal_map"])) planet_material.set_feature(SpatialMaterial.FEATURE_NORMAL_MAPPING, true)
My mentality is this: Seeing as how I learnt about Godot thanks to 3.0 and it being open source, I'd want my code to be ready for a 4.0 in the feature, and also be easily usable by other people. Using built-in enums and methods over direct assignment seems like the best way to do that. I was wondering what are the opinions of other gdscript users regarding this. Do you take the small & fast way, or the more "enterprise" way of writing gdscript? I'm sure there might be some performance differences too but that doesn't really concern me that much.