so I have a grid of different blocks but all belonging to the same family. How do I swap two neighbouring blocks?
Could you provide more details about what you're asking? Do you mean switch blocks like in a grid-puzzle game like Candy Crush/Bejeweled?
Develop games in your browser. Powerful, performant & highly capable.
yes, like in CC or Bejeweled.
Here's one tutorial for creating match-3 games in C2:
http://gamedevelopment.tutsplus.com/tut ... medev-8071
In the 2nd part of the tutorial it is explained how to swap blocks.
I was already trying that but it didn't work (block disappeared instead of swapping) so I was looking for an alternative.
Here I provided the example how to swap block freely: