How to make a match three game like Puzzle Bobble.

I can figure out all the mechanics of the game but the problem is that how can I check if there are three same-colored balls are adjacent to each other. I’ve thought all the ways but couldn’t get a reasonable solution. Can someone solve me this problem?

I saw your question yesterday, then this morning I happened to come across this article.

I’ve only skimmed it quickly but it looks like what you need.

Thanks

Idea I came up last night was to check if the object next to another object is of same color. If so, then add it in a list. After that check the list if is larger than three. If so then destroy each Gameobject in it and also empty the list.
How is this idea?

1 Like