A clone game of Toon & Toy Blast. It’s a match-2 game where we try to pop same neighbour colors. I’ve used improved flood-fill algorithm to find adjacent colors. It was quite fun & challenging. I’ve learned a lot of search algorithms to make it more optimized.
Quest System
- I’ve created Quest system where required pieces needed in game. Since this would be infinite; I also added “Total Move Count” system where we spend a point every time we match. If this point reaches zero; the game will be lost.
Editor View
Level Creator
- I’ve created a Level Creator Editor that helps us creating fast levels. Row & Column decides our width/height of the board. Droppable piece column creates a matrix that we can put some pieces that will appear in the game later on when matched. Game is looping through these board datas. Everytime we load scene (additive game scene) it gets the current board & load all the data. It’s easy as that. Since we have pieces in board, system basically gets from 2D array & call the objects from pool. Pool objects are in ElementData. Simply we click “Load Pieces” it gets every piece in Resources folder. (editor only)
Editor View
Object Pool Elements
Responsive Board
- I’ve created a “responsive board system”. Includes 2 responsive elements. Camera that position itself via board width/height and sets the orthographic size with margin. So that whatever value we enter, it will keep good-looking! The other one is “board frame”, it acts similar as camera since we know our board width/height we simply set its sprite width/height as I slice it.
Code View
Rocket Mechanics
- I’ve added rocket system that destroys every removeable element in row/column. It appears on board when 5 or more match is done. I’ve tried to make board reward system expandable that everytime we add reward, we simply edit its condition and call the required method. The rockets also trigger each other if they are reversed (If clicked is vertical direction & neighbour is horizontal for example)
Balloon Mechanics
- I’ve added balloon mechanics where ballons burst when there is match nearby.
Duck Mechanics
- I’ve added duck mechanics that matches when they are in first row. For better experience, i thought rockets dont destroy ducks so that they can be only matched at bottom. This can be changed by changing IUntouchable’s bool value.
Shuffle Mechanics
- I’ve added shuffle mechanics that can both work with “Shuffle button” & when there is deadlock in the board.
What Would I to Improve More
- Better save system: For the sake of time; I saved the level only & with player prefs. Normally i would save it to JSON & read it from there. And more firebase cloud.
- Better loops for searching
- Better approach on Match Handling
- Better collapse as visually
- and more..