![]() |
Attention | Topic was automatically imported from the old Question2Answer platform. |
![]() |
Asked By | Reginhowl |
By this, i mean using many nodes without properties, but only to be used to attach script.
For example, if we have an instance of NPC, It will have lots of node children with attach scripts and the scenario will be for a single scene, we will have 30-40 NPCs w/ each NPC having around 20 Nodes (15 Nodes for empty nodes[Node2D] attached w/ scripts & 5 Nodes for the properties of NPC[CollisionShape,Sprite,AnimationPlayer,Sound,etc…]).
That means we will have 800 Nodes alone just for the 40 NPCs for a single scene(and will increase more with other game objects).
Is there such thing as too many nodes(even though some use of empty nodes are just used to group nodes like folders) and is something to worry about?
Or are these empty nodes(Node2D w/ attached scripts) just like folders and nothing to worry about?
And if there is ‘too many nodes’, how many is the’ too many’?
To make a simple scenario:
- Having each NPC have their own node child of Empty Node2D+script
vs
- Having 1 Universal Empty Node2D+script (parent) which all NPCs will access(Though i think it will most likely crash if two NPCs executes and accesses the node at the same cycle).
Thanks for reading & looking forward to your insight and guidance.
not sure but there is Max Renderable Elements
property at Project Settings > General > Rendering > Limits > Rendering which has 65536
value.
volzhs | 2018-07-16 13:01
Thanks for sharing! I was not aware of this.
Reginhowl | 2018-07-16 19:57