0 votes

Hey all,

I'm in a bit of a spot with a mechanic I want to implement for a grid based puzzle game.
I've been trying to approach it through different means, but nothing so far has worked.

Essentially, I have created instances of block sprites that can move in a grid like fashion within four directions. You start off moving one sprite around at a time, and can change to the next one and so on by pressing space. I want to add a mechanic where if you move next to another sprite, they will 'combine'. I've set up some raycast2D to detect the collision, but i've been stumped on the combination part for a while.

Its a bit more complicated than it seems because I want each sprite to maintain control of its movement, while following those it has combined with. Also, managing other sets of combined sprites that must combine with another set. It's kind of like jelly no puzzle, but I dont want to totally combine the sprites since i want to maintain individual control over each of them. The later idea would be that the current sprite in control of its set can spin the whole set as a center axis.

I've tried making changed the sprites parent and child structure. Creating signals and groups to manage the movement. Using arrays. Copying the position of the following sprites to the one in control, and nothing has worked for me.

If you have a suggestion or want to play around with it to see what I mean you can download the project here.

Thanks in advance.

in Engine by (19 points)

How are you going to maintain individual control while merged?

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