Hello all, I wanted to know something that got me very curious, for those who have made / planned some of the very famouse match 3 style. The problem is, suppose you have some different tiles / colors ... this problem can be generalized for most of the match 3 games. Now, you can get a random initial board, and while you're taking some of the cells out, new are falling all the time. But how can you asure the user that he will always have something to play with? I mean, if you're randomizing every time, even if you don't have an initial random board, you'll have pseudo random new cells coming from above. But how can you asure that every time, the board will be in a situation that there is at least one possible move, thus the program won't hang and if he plays it is because of the time that has ran off. I hope I've made myself clear enough. Greets.
In my experience, it's not necessary to ensure there will always be a match. The game will check the board for potential matches each time a new set has been cleared and replaced, and if there aren't any matches, the game is over. However, you can do your best to impliment some basic artificial intelligence to try to prevent these situations from occurring if you wish to keep the game playing as long as possible.
Or you could stretch your design muscles and provide an option that the player can use when this happens: Think in terms of the shuffle in Chuzzles. -D
Our next casual matching title makes use of non-random spawning. Combos are induced if a combo hasn't happened naturally in awhile, and likewise suppressed if a combo happened very recently. This is primarily there to allow the game to start with fewer colors without the board becoming totally combustive. It also makes the game feel a little more accessible with max color count in later levels. The above is different than your question, though. It depends a lot on your exact mechanics--if you're worried constant deadlocks will be a problem it shouldn't be much work to check valid moves and ensure you're dropping a color or two that could be matched. Many successful products just declare game over at deadlock; the market doesn't seem to mind.
Well there are a number of things you can tweak to alter the gameplay experience. I use variables like "nosingletons" and "colorcollusion" in my config files, where the first says you can't have single colors sitting alone (good for easy levels where making groups requires doubles) and the 2nd is a meaure of how often colors will "randomly" match and so on.. There are lots of tweaky little variables you can play with to push the odds one way or another.
the problem here is even if I decide not to use random at all. Suppose that I say 'every new cell I drop, will have to make at least one possible play' . There are board positions where it is impossible to add cells so that the player is able to make a move.
Part of the problem could be solved by ensuring you only drop cells with colours that are already on the board. I've seen this pattern in several examples, notably Zuma (and lookalikes), Reactor and Puzzle Bobble. This behaviour typically reduces the difficulty of a level as colours are eliminated since the player has to deal with less colour variety that in turn increases the likelyhood of a match. Obviously, this technique cannot guarantee that the board will not fill up so you would have to find a solution, such as checking for a 'checkmate' condition (no more moves possible), or simply keep filling up the board with existing colours even though the game is already lost. In the puzzle mode of my current game, I initially opted to check for a checkmate condition but decided against it due to the complexity of dealing with the potential effects of powerups. Instead I provided an option to restart a level.
heh.. I've just code that to test it, but then I got thinking... as match 3 games are very differents as games like puzzle bobble or zuma that you have to 'clear the board' .. Here, if you have fewer colors, then that would mean the board is full with less colors, and then that means that the probabilty to make a match will increase. So it doesn't mind, or at least, it minds less, which color you throw when you have less colors in the board.
I put a lot of thought and research into the problem. There are a lot of possible solutions but I only found one that I thought was a good fit for my match 3 game. This situations (no more moves) can easily occur if you have many different colors for your tiles, or if you have a very small board (or many very small compartments on your board). This can happen in Big Kahuna Reef (BKR) a lot if the level designer isn’t careful. BKR is one of the only match 3 games I know of that has boards with such unique shapes and the potential of very small play areas. See this screen shot for an example: http://www.bigkahunareef.com/images/screens/SS05.jpg We try to minimize this problem by not making any section of the board too small. But it is always possible that the whole board, or a section of the board, could have no more moves. I never liked blaming the player for this and making the game be over. In BKR the game detects if any region of the board has no more moves. When this condition is detected it shades all the affected tiles red. If you move your cursor over any red tiles, your cursor becomes a net. Clicking on a red tile simply deleted the tile. (the net scoops it out) In other words, when there are no more moves, we let the player delete any piece they like. This will quickly get the board back into a state where there are more moves. If you want to experiment with this yourself you should get a copy of BKR and go into the level editor that is included inside the game. Make a very small board and it will probably get stuck very quickly. It is more interesting to make a very small section of your board and watch only that section get stuck while the rest of the board is playable. IN this case, even though there are more moves somewhere on the board, BKR still detect that part of the board has no more moves and gives you the red net ability on those tiles only. I thought about making the spawning of pieces be non-random in a way that would grantee there are always moves. But I didn’t like the idea of the player getting stuck with moves only in one are of the board. If the only move is the top left corner of the screen, when the player makes that move, you can grantee there will always be another move. But the other move will always be near that same area in the top left corner of the board. The possible moves available could slowly creep their way across the board, but it can be a painfully tedious process. If the board is so locked up that you have to change your spawning to give the player a valid move then you are not really do the player a favor by making that change because you are likely removing all choice form the game and giving him only one possible move and in the wrong area of the board. I also consider a shuffle option but didn’t like it for a lot of reason I won’t go into at the moment. One other thing I should clarify, In BRK, like Jewel Quest, the goal it to mace a match on every single tile of the board. You are not trying to get rid of the jewels, you are trying to change the background behind the jewels. When you use the net to delete a piece, it does not complete that tile of the board. It just removes jewel. But you will still need to make a regular match over that tile if you want to finish the level.
Thank you all very much. I didn't either like the non random idea, but because mostly it would change the gameplay to an unfair state. The user expects as he sees, that the cells would come randomly, and I think that it wouldn't be fair to force one or another cell to the player to make a match, even if it is possible. I think that either the net or the shuffle are good solutions.. I will just try to implement some of these. The sad thing is that I think that through the gameplay I have thought of .. Stucked boards will become frequently, at least with less than 5 different different tiles. So I think I'll try to add more powerups and stuff and reduce the time thus making the game even more dynamic and quickly to go through levels.
Hello James, I have a question, what is a 'section' of the board, I mean, how do you detect the diffect sections in an user made level?. By the way Bejeeweled in some play modes does prevent the 'no more moves' effectively dropping pieces that will surely match. I think I prefer the BKR way.
There are no strict definition of “sectionsâ€. Neither the level designer nor the game sets up boundaries to say where there is a line between sections. The game just figures out if a tile has a move or is connected to a tile that has a move. Any tiles that isn’t connect (directly or indirectly) to a move is assumed to be stuck The way it actually works is every frame the game does the fallowing: 1) assume all tiles are stuck. 2) Find every available move and mark those tiles as not stuck. 3) Figure out which tiles could contain valid moves in the future if the currently non-stuck tiles were changed and mark those tiles as non-stuck. This isn’t as simple as making all the neighbors of non-stuck tiles. It has to be a situation of three tiles in a row with at least two of them being non-stuck to make the third one be non-stuck. 4) Repeat step 3 until you don’t find any new tiles to mark as non-stuck In other words, if there is a possible move in one part of the board, that “playability†(non-stuck) attribute spreads across the board until it reach sections that can’t spread to due to lucked tiles or the shape of the board. It is much simpler to figure out if there are any moves anywhere. Detecting when the whole board is stuck is simple. Trying to detect if part of the board is stuck is much harder. It is only necessary if you have non-rectangular boards. On a rectangular board, any time there is any move it means the whole rectangle is not stuck because that one move could spread new moves to all areas of the rectangle. But as soon as you add nooks and crannies to your board shape, you can run into situation where a section of the board has valid move that will never propagate over to another section. See, match three games can be slightly more complicated to implement than they appear at first glance.
I see, thanks for the answer. And yes, match games are not easy, I can tell you I'm making one and some things are becoming quite a challenge.