Best "newbie" process/philosophy for instancing scenes?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By toec

So, if I want to make a forest that has both conifer and deciduous trees, and the deciduous trees include Maples, Birches, and Aspens…

Do I make a BasicTree.tscn and then modify the instances of that scene to have the proper sprites, size, collision size and so on?

Is it good practice to make the base scene for an object as skeletal as possible and then make modifications to instances?
If so, what sort of details/differences qualify as a breaking point where you really need to create a second base scene (i.e.: would it be best to have a ConiferBase.tscn and DeciduousBase.tscn)?

:bust_in_silhouette: Reply From: 1izNoob

I would make a basetree scene and add all the relevant nodes to that and then have the specific trees inherit from that scene. That is the most common approach and quite flexible because you can add additional node to the inherited scene.

In terms of breaking points, it depends on what the trees are capable of doing. But I couldn’t really think of anything good for your example. I’d say only have scenes inherit from the basetree scene if they are trees (and not stones or animals).

Ok. That makes sense. Sort of like treating scenes as just more game assets or like functions within a script.

toec | 2020-04-04 21:53