I would like to know how would you will design the core algorithm of CANDY CRUSH? Any one got idea?
Jump to content
Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.
Posted 31 May 2013 - 02:18 AM
Is this one of these "Match 3 in a row" games?
Just check if the two flipped objects are connected to 2 more equal objects, if yes remove all of them, if not flip back.
Yes, It's kind of "Match 3 in a row" game.
How you got to implement this rule? Use recursion or backtracing? How to organized those objects, the board should be traverse each time.
Posted 03 June 2013 - 05:16 AM
I am working on a match 3 game, but it also matches irregular pieces connected to the original match. For that I am using the flood fill already mentioned on the thread.
Posted 03 June 2013 - 10:25 PM
I believe I answered this kind of question before. You could search your space for 2 criteria: 2 of the same "candy" adjacent horizontally or vertically, and then see if at least a third is switchable from whichever direction the "candies" are in (horizontal or vertical). This covers the first portion. The second is looking for 2 "candies" that are in a line, horizontally or vertically, with only 1 piece that separates them. Then with that one piece, see if a piece in the opposite direction (if you are finding horizontal lines, look vertically, or vice versa) can be switched to make 3. If so, this is a match.
GameDev.net™, the GameDev.net logo, and GDNet™ are trademarks of GameDev.net, LLC.