Home Game Development godot – When/Where use Node2d as parent vs Other Node

godot – When/Where use Node2d as parent vs Other Node

0
godot – When/Where use Node2d as parent vs Other Node

[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]

Previous article PS5 Black Friday Deals: Consoles, Games, and Accessories
Next article The Last of Us 2 could be coming to PS5 – Destructoid
Hello there! My name is YoleeTeam, and I am thrilled to welcome you to AmazonianGames.com. As the premier destination for all things related to Amazon Games' universe, we are dedicated to providing you with the most exciting and immersive gaming experiences out there. From captivating visuals to exhilarating gameplay, our website is packed with comprehensive insights, updates, and reviews to keep you ahead of the game. Whether you're a seasoned gamer or new to the scene, I am here to guide you through this virtual frontier. If you have any questions or suggestions, feel free to reach out to me at john@yoleesolutions.com. Embark on your Amazon gaming journey today with AmazonianGames.com and let the adventure begin!