Should I use different nodes for my point & click adventure game besides control+texturerect with areashape?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Attydude
  1. You have a PNG background of a room.
  2. The room has PNG’s of different characters & items inside the room.
  3. Clickable event where you click characters or items in the room. Based on what you click, it affects whether or not the other PNG’s change or trigger an animation or activates a dialogue or switches scene.
  4. When you hover over a PNG, text appears highlighting the name of what your cursor is highlighting.
  5. There is a boolean that decides whether the object can be clicked or not yet, and which type of event is triggered when you click it that changes based on the games state.

I use Control > Area2D > Collision Shape.

Area2D to handle the mouse click, and collision shape to say what area can be clicked.
I wrap them inside of a textureRect.

I have no clue if there’s a better way to handle this. I will be doing this for thousands of objects for this game. and want to figure out what’s the most efficient nodes to use for it.

:bust_in_silhouette: Reply From: SteveSmith

It sounds good to me as a starting point. However, if you haven’t already, I would make your Control > Area2D > Collision Shape it’s own scene and inherit from that each time, so if you do decide to change, you only need to change it in one place.

Ideally you would write a program that creates all the required nodes dynamically after reading in the details from a CSV file or something. That would save you loads of work in the long run.