0 votes

I'm trying to build a simple block based game in which the player initially controls a square, but attaches to other squares on contact, clustering together.

Currently, I have a pSquare scene which is an Area2D node with Collision2D and Sprite children, and is supposed to represent a square attached to the player (or the initial square).
The other rectangles are represented by a Mob scene with Area2D nodes with collision and sprite children. (I'm roughly following along the structure outlined in the official tutorial Your First Game).

I'm thinking I need to have a Player scene that has an array of instances of pSquare, and appends to that array whenever there is a new contact.

I'm having a hard time figuring out which built in nodes to use and why, and how to organize everything. I'd appreciate any guidance on this. I also don't mind starting over if a different structure is more appropriate. I'm still getting a hold on the big picture with Godot.

Godot version 3.3.2
in Engine by (12 points)

Please log in or register to answer this question.

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 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 webmaster@godotengine.org with your username.