algorithm - How to be sure that a target goal in a match 3 game level will not be impossible? -


This is not clearly a coding problem, but is logical one. I'm starting to learn how to make a match-3 game. But a question arises in my mind.

When I set goals to complete the level, how will I know that the goal is achievable?

At a level where I have 5 red, 12 blue, 9 green items mixed together, how can I decide how many steps to achieve this goal is required. I mean it should be challenging, but should not be impossible.

Since the objects are randomly generated, it is void that enough gem in the game will not be impossible. > There are some logical explanations for this, or I just have to test and see how many moves are there to achieve the goal.

Is there an algorithm that generates the gem according to the target set, or are they arising in random ways?

To be even more clear about my question, I am going to take an example of King.com.

Number of targets in level 9 are 26,26,14,5, respectively. And the maximum number is 22.

Now this goal can be achievable and challenging (I mean you can get it in two or three trials), but not impossible.

Now my question is that those people are so sure that it will not be impossible, they decided that the 22 steps would be enough and challenging.

OK .. They will be 5 or 6 in the maximum number but it will definitely make it impossible to clean the level. So how they decided to walk 22 or this step.

Whether they are using static patterns to generate and generate commodities, or the ratio of stored gems is fixed (i.e. X%, Y% Z% in total gameplay, M% of gems Respectively), or some other way.

I just need some hint what I want ..

I I am convinced that if your problem is fixed, but I believe:

You meet some "maze" fall / movable gems or some swapable gems like game board and remove the match Holes after scoring 'random' gem filling / scoring

Then:

  1. Backward creation

    Only the back levels are generated from the first target Generate the solution and then randomly generate N -back steps for the beginning of the game level. It is not possible for random production of gems, but always provides solutions in N -steps. Only one solution is guaranteed in the drawback.

  2. Semi-random gem generation

    For example how it works Bjewelld level state Remember, generate random gems and check if any valid steps are possible. If not, then produce different random gems. If still another random set is not produced ...

    If there is still no valid move after generations, then the hyperbolic or bomb or joker or anytime Some produce special gems. It is simple and always gives playability grants but in the solution N -moves

Comments

Popular posts from this blog

c# - Textbox not clickable but editable -

php - how to change mysql_result($res, 0, "url"); to mysqli -

Matlab transpose a table vector -