0 votes
  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.

    1. 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.

in Engine by (16 points)

1 Answer

+1 vote

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.

by (1,057 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.