SyntaxBomb - Indie Coders

General Category => General Discussion => Topic started by: plenatus on December 19, 2020, 22:23:54

Title: Logic behind a match 3 game like Bejeweled
Post by: plenatus on December 19, 2020, 22:23:54
I create a match 3 game many years ago but the last problem was that at some point the new items doesn´t allow new combinations.
Have anybody an logical idea how to solve that problem?
Title: Re: Logic behind a match 3 game like Bejeweled
Post by: blinkok on December 19, 2020, 22:49:05
I feed in a colour that is one of the remaining colors or a least heavily weighted towards that group of colours
Title: Re: Logic behind a match 3 game like Bejeweled
Post by: Derron on December 20, 2020, 08:48:34
You either do forward-solving - or you check if there is at least ONE allowed move ("switch elements").

allowed move: if not, then mix the board (not visually), check for possible combinations ... and once you found a working solution (maybe even check for "x possible combinations", not just 1) you do the visual shuffling


forwardsolving: only add combinations which allow combinations if the current board would else have no combination possibility. You can even increase "likelyness". So if there is only one combination on the board, you should most probably add some new "could combine" when adding new ones ("falling down"). There is surely a sweet spot. If there are 20 combinations possible on the board this surely means there are so many "randomly aligned" elements, that almost every new added block will be combineable too already.


bye
Ron
Title: Re: Logic behind a match 3 game like Bejeweled
Post by: plenatus on December 21, 2020, 23:48:44
Okay thank you both for the tips...I think this is a new sideby project over the xmas days ;)