That's really helpful, thank you.
It would be helpful (to a noob like me) if 'composition' could be explained a bit better.
That's really helpful, thank you.
It would be helpful (to a noob like me) if 'composition' could be explained a bit better.
I appreciate your feedback! Would it be helpful if I add something like this?: "Composition in Godot is the practice of building complex objects by assembling smaller, reusable nodes (e.g., adding a HealthComponent node to an enemy) rather than relying on deep, rigid class inheritance hierarchies. It promotes flexibility, allowing behaviors to be added or removed at runtime, whereas inheritance creates tight coupling between parent and child classes."
Exactly that!
Thank you. This is one of the most useful articles I've read in my (very slow) Godot journey. Coming from OO programming to something like Godot, finding the reusable bits, and how all that is meant to work has been the most frustrating. Mostly, it seems, because people assume we all have the same understanding of terms.
When you say the node is reusable, is this a 'cut and paste' the node in (so all future changes to the base node is lost) or is the another way? The only way that has worked has been a one-scene node so I can update the node and it updates in all scenes using it.
I'm sure I'm missing something!
Very well done! Thank you!
Welcome to the programming.dev Godot community!
This is a place where you can discuss about anything relating to the Godot game engine. Feel free to ask questions, post tutorials, show off your godot game, etc.
Make sure to follow the Godot CoC while chatting
We have a matrix room that can be used for chatting with other members of the community here
We have a four strike system in this community where you get warned the first time you break a rule, then given a week ban, then given a year ban, then a permanent ban. Certain actions may bypass this and go straight to permanent ban if severe enough and done with malicious intent