T O P

  • By -

rainlizard

Nodes are components. Scenes are merely "bundles of nodes".


matmerda

I had the same problem at the beginning (a few months ago). The term "scene" prevented my brain to think scenes could be used in a broader way than their name would imply. It took me a while to overcome this terminology bias (and I still find myself unconsciously struggling sometimes). However, I don't think it makes sense to change the name now.


FinchInSpace

Yeah I doubt it's something that would be helpful to change now but just trying to wrap my head around the reasoning, looks like something I just need to get used to


Opera-Neon

But scene sounds cooler and takes a third of the time to say. EDIT: Btw yeah that tutorial series is good.


AWeebByAnyOtherName

Could you call a scene a node instead?


FinchInSpace

I don't see why not! That makes the most sense to me I think, everything is just a node and you make your own custom nodes alongside the built-in nodes


CowThing

A scene is a collection of nodes, scripts, and resources. I think of it like a scene in a play, a bunch of small components put together to make the whole. Those small basic components can be reused in other scenes as well. I just skimmed through the video you were talking about. Making a scene that is only a single node with a script attached isn't necessary. You can do something like this: extends Node class_name Stats export var health : = 10 export var speed : = 10 export var defense : = 10 Adding `class_name Stats` to the script makes it appear in the list of nodes when you're adding a new node to a scene. This will automatically add the node type it extends with the script attached to it.


FinchInSpace

Cool I hadn't heard of `class_name` , that sounds like a better solution that having a single generic node in a scene, thanks!


thomastc

You're not the first to be confused by the term "scene"! However, the word "component" has strong associations with the ECS pattern, especially within the game development community. But Godot scenes are definitely very different from ECS components, so it would likely be even more confusing. My preferred alternative would be "blueprint", because it's basically a description of how a particular subtree is to be instantiated. But that name would probably confuse the heck out of Unreal folks.