Thanks! It was fun to build. It was somewhere between a prototype/exploration and tech test. The idea was try fluid prototyping. Rather than create a full GDD & Design Doc, we started with a rough concept, 2 producers, 2 designers and a developer (me). We basically got together for 2 weeks and built/changed it on the fly. We would test ideas right in a game rather than on paper. The character and some of the backgrounds were put together by a concept artist, the rest I either created or grabbed from old games.
It is more than just the match-3, it also has pet battles, pet training, a farming and crafting component and progression map, as well as animation and cut scenes.
It is pretty much all scratch built, the only 3rd party things I used were HOTween and EasyFont. No framework was used but, it did become a framework itself, mostly for the animation and event sequencing. It was also a tech test, as I started it right after the Unity 2D features came out. So the whole thing uses the Unity 2D features.
The match-3 part started as a traditional swapping game, then became one where you draw to connect gems, then the sliding version. All 3 are still part of the game, and can be switched on and off.
I have done a couple of match3 games on other platforms, and generally speaking I do them like this:
The ‘gems’ are fairly self-contained and contain many of their own methods for animation. The board uses a 2d array (Gems[,]), I then start with methods for
Fill - this finds all the holes in the array and creates new gems for them.
Check - this is called after the user makes a move or the board is filled. It uses a simple recursive method to walk the board and build an array of matches. It will return either null (no matches) or an array of killsets (an array of arrays of matches).
- if there no matches it return control of the board to the user
- if there are matches, it plays the animations to remove them and then…
Compress - this just shifts all the gems downward to fill gaps. After compression, it goes back to Fill.
That is the main loop: Fill, Check, Compress, Fill, Check, Compress, etc…
I use HOTween (love it) sequences for most of the gem animation. For example, when I fill the board, for each gem I add, I add a tween of the drop to the sequence. When I have found all the holes I call sequence.Play(), and it has a single callback (OnComplete) that moves to the check method. The gem removal and compressions have their own sequences as well. Makes for a clean way to move from state to state.
Hope that helps!
ZG