[ad_1]
tl;dr = When/Where/Why use ‘Node2d’ as the parent vs going straight to ‘Other Node’?
I have just started diving into using Godot for the first time. I completed the Your First Game official tutorial (Dodge The Creeps) and have a question my searchengine-fu hasn’t yet been able to find an answer for. Links to this question being asked already and/or where I completely missed this in the docs are appreciated.
I would like to attempt my own game now and learn during the process. Something I can’t seem to find an answer for is when it is appropriate to select “Node2d” when creating a new scene, versus clicking on “Other Node” and selecting what is required from there.
If I want to make a tower defense game I will need a scene to hold the ‘world/map’ that I make using a TileMap. The Turrets I place and the Mobs that follow the path will be their own scenes – presumably something like Sprite2D or AnimatedSprite2D
When I create these scenes (ie world.tscn, missile_turret.tscn etc), when/where/why is it appropriate to select Node2D as the parent and then add TileMap or Sprite2D as a child, versus when should I just go straight for “Other Node” then select either TileMap or Sprite2D from the list of all nodes that comes up?
Which Node to use for certain features is part of the journey of discovery I’m looking forward to, but currently I’m mentally stunlocked with the concept of using the correct parent node.
Questions rattling in my mind currently sound like: “Do I make everything Node2D and then add the appropriate child nodes every time? That didn’t seem to be the case in the tutorial” / “Do I make a “main.tscn” that uses the Node2D option as the parent and then all of my other scenes skip straight to “Other Node > [correct node like TileMap]” as the parent which I then add to main.tscn?”
Any help clearing the head noise is greatly appreciated. Thank you all
edit: two typos I noticed
[ad_2]