游戏邦在:
杂志专栏:
gamerboom.com订阅到鲜果订阅到抓虾google reader订阅到有道订阅到QQ邮箱订阅到帮看

分享用Construct 2制作连线消除游戏的教程(8)

发布时间:2013-08-14 18:00:46 Tags:,,,

作者:David Silverman

终于到最后一篇了:我们就快完成游戏了,就差最后的玩法机制。本文将重点介绍如何制作一个战斗系统,它的作用是,当玩家在一次交换中消除多个方块时(连消),它就给玩家更多得分。(请点击此处阅读本文第1、2、3、4、5、6、7篇

另外,我们还要制作失败事件和游戏结束画面。最后,我会提供一些改进和拓展这款游戏的建议。废话不多说,我们开始吧。

寻找匹配组

我想先小小地修改FindMatches的调用时间。

在写这篇文章时,我发现了一个问题。如下图所示:

FindMatchesSucceed(from gamedev.tutsplus)

FindMatchesSucceed(from gamedev.tutsplus)

正如上图所示,当一个方块被移动一个方块的距离,以形成匹配组时,游戏能迅速检测到匹配组。

FindMatchesFail(from gamedev.tutsplus)

FindMatchesFail(from gamedev.tutsplus)

如上图所示,你可以清楚地看到,在同一种情形下,当一个方块被移动的距离更远时,游戏居然不能感应到匹配组,直到我们执行下一个交换时。问题的原因是游戏检测匹配组的频率不够高。

现在,游戏只有在交换发生后才寻找匹配组,但因为方块下落完这个距离所需的时间更长,所以当方块着地时,匹配组检测已经结束了,于是游戏没有发现这个匹配组,直到检测事件再次激活。

为了解决这个问题,我们要修改FindMatches。

首先,打开SwapBlocks功能,把最后的事件从功能中移除,这样它就不会调用FindMatches了。

SwapBlocks应该如下图所示:

ModifiedSwapBlocks(from gamedev.tutsplus)

ModifiedSwapBlocks(from gamedev.tutsplus)

此时,没有事件调用FindMatches。要解决这个问题,我们得添加新Action到检测匹配组的事件中。找到这个事件并添加这个Action到Else事件的末尾:

Action: Function > Call function
Name = “FindMatches”

你的事件应该显示如下:

ModifiedMatchesPossible1(from gamedev.tutsplus)

ModifiedMatchesPossible1(from gamedev.tutsplus)

另外,借此机会把MatchesPossible事件移动到游戏代码的末尾。这么做可以保证在消除自动匹配组的代码执行以前,它们不会被调用。

现在运行游戏,你会发现刚才的问题不再出现了。

连消

解决了上面的问题后,我们可以执行连消系统了。当玩家的一次交换导致两个或以上的匹配组被消除时,玩家就会得到更多分数。

例子如下:

ChainScenario(from gamedev.tutsplus)

ChainScenario(from gamedev.tutsplus)

在上图所示的情况中,玩家移动绿色方块形成一个匹配组。绿色的匹配组的消除导致蓝色方块下落形成另一个匹配组。

我希望当玩家达到上述结果时,给他们额外的分数。准确地说,我想加倍玩家一次匹配的得分。

怎么做

为了让这个系统生效,我们要创建一个新变量Chain,然后稍微修改当前的功能。首先创建新的Global Variable:

Global Variable: Chain
Type = Number
Initial Value = 0

你的变量应该如下图所示:

Match3_Part7_Chain(from gamedev.tutsplus)

Match3_Part7_Chain(from gamedev.tutsplus)

这个变量的作用是得分倍增器,告诉游戏当前有多少个连消。

现在打开导致方块下落的事件,然后移除调用FindMatches功能的Else事件。

再打开FindMatches,找到你制作FloatingPointsText对象的位置。修改Set Text声明,使用新公式:

Action: FloatingPointsText > Set text
Text = NumMatchesFound * 10 * Chain

这么做使悬浮文本显示连消的得分。

接着,打开FindMatches,这是你在事件末尾再次调用FindMatches的地方,然后删除这个功能调用和Wait声明。为什么?因为如果我们不移除这些,那么FindMatches的调用次数就会太多,进而导致连消无法完成。

(因为我们在本文的开头做的修改,当所有方块都在网格中,且没有一个方块掉落时,FindMatches就会被调用。我们调用FindMatches的多重区域会导致多个功能实例同时运行,这样就破坏了得分系统。)

最后,我们还要再修改一下这个功能。转到这个功能的末尾,设置PointsGiven为0后添加以下Action:

Action: System > Add to
Variable = “Chain”
Value = 1

现在,无论何时游戏找到匹配组,它就会给玩家得分,消除方块,然后增加连消分数。

修改后的FindMatches如下图所示:

ModifiedFinMatches1(from gamedev.tutsplus)

ModifiedFinMatches1(from gamedev.tutsplus)

下一步,打开GivePoints功能,修改两个增加得分的Action,这样它们就会把连消得分计算进去了:

Action: System > Add to
Variable = Score
Value = 10 * Chain

修改后, GivePoints如下图所示:

Match3_Part7_ModifiedGivePoints(from gamedev.tutsplus)

Match3_Part7_ModifiedGivePoints(from gamedev.tutsplus)

重置Chain

我们已经执行作为得分(得分显示在悬浮文本对象中)倍增器的变量Chain,但还有一件事没完成:我们必须增加一个重置Chain的值的声明,这样它才不会无限增加。

我们要把这个声明添加到On DragDrop Start事件中,这样无论何时玩家开始拖动新方块,它就会将其视为一个新Chain。我们这么做的另一个原因是,因为可以防止Chain的值被过早重置,进而导致在Chain后面部分的匹配组的得分更少。

打开On DragDrop Start,添加以下Action:

Action: System > Set value
Variable = Chain
Value = 1

你的事件应该显示如下:

ModifiedDragDrop(from gamedev.tutsplus)

ModifiedDragDrop(from gamedev.tutsplus)

如果你在这时测试游戏,你会看到如果你执行一个我放在前面的图中的连消时,你会得到90分而不是60分。

这样,我们的连消系统就完成了。

Game Over

既然我们的连消系统已经就位了,我们就可以开始添加失败事件和Game Over画面了。

首先,我们必须添加新的Layout作为我们的Game Over画面:

1、在屏幕的右边,右击Layouts文件夹,选择Add Layout。

2、选择Add Event Sheet。

3、打开新Layout增加一个新BG Tile对象。

1)从BG Images文件夹(它在你从本系列的第一篇文章下载的图像包中)中选择图像GameOverBGTile.png。

2)设置位置为(-6,-7)。

3)设置大小为(613, 619)。

4、创建新的Sprite对象。

1)从图像包里选择图像GameOverText.png。

2)设置位置为(303, 200)。

5、创建新的Button对象。

1)设置名称为RestartButton。

2)设置位置为(262, 410)。

3)设置大小为(100, 30)。

4)设置文本为Restart。

这样我们的Game Over画面就设置好了,返回原来的Layout,也就是Layout 1,在那个画面中添加一个新项:

1、在Layout 1上,创建新Sprite对象。

2、使用Paint Bucket工具把这个Sprite涂成红色的。

3、关闭动画编辑器。

4、设置名称为GameOverArea。

5、设置位置为(196, -30)。

6、设置大小为(344, 150)。

7、设置不透明度为0。

你应该注意到这个Sprite就在与操作区域的顶部相同的位置上,而且大小也一样。我们要使用这个Sprite对象来检测玩家的失败(方块碰到它的时候,就表示玩家失败)。打开Event Sheet 1,我们就可以开始执行这个事件。

失败事件

在我们开始检测失败事件以前,我们必须添加一个新变量,它的作用就是当方块碰到GameOverArea对象时停止方块的移动。这样玩家就知道自己已经失败了。

Global Variable: MovementPossible
Type = Number
Initial Value = 0

现在打开移动方块的事件,添加以下条件:

Condition: System > Compare variable
Variable = MovementPossible
Comparison = Equal to
Value = 0

移动事件应该显示如下:

ModifiedMovement(from gamedev.tutsplus)

ModifiedMovement(from gamedev.tutsplus)

移动事件使用我们的新变量后,我们就可添加检测失败条件的事件了:

Event:
Condition: Block > Is overlapping another object
Object = GameOverArea
Condition: Invert: Block > IsDragging
Action: System > Set value
Variable = MovementPossible
Value = 1
Action: System > Wait
Seconds = 1.5
Action: System > Go to layout
Layout = Layout 2

你的新事件应该如下图所示:

GameOverEvent(from gamedev.tutsplus)

GameOverEvent(from gamedev.tutsplus)

现在,打开Event Sheet 2;我们要添加一些新功能到我们之前制作的RestartButton对象。添加新事件到Event Sheet 2:

Event:
Condition: RestartButton > On clicked
Action: System > Go to layout
Layout = Layout 1

你的事件如下图所示:

RestartEvent(from gamedev.tutsplus)

RestartEvent(from gamedev.tutsplus)

重置值

如果你现在运行游戏,游戏线束后再开始,你会发现它回到原来的Layout,但方块没有移动。原因是,我们使用的所有变量都是Global Variables,所以当我们重启Layout时有些变量不能自动重置。

我们必须在On Start of Layout事件中添加一个重置的Action。

打开On Start of Layout事件,添加这个Action到For循环被调用以前的初始事件:

Action: System > Reset global variables

你的事件应该显示如下:

ModifiedOnStart(from gamedev.tutsplus)

ModifiedOnStart(from gamedev.tutsplus)

这时再测试,你会发现没有问题了。

接下来做什么?

现在,我们已经回顾了本教程涉及的所有功能。

你会注意到,你的游戏仍然不是上面的DEMO显示的样子,最大的不同之处是你的游戏没有开始画面。我不说制作它的原因是,它几乎与制作Game Over画面一模一样——留给大家当练习吧。

接下来我想讨论一下如何改进游戏,使它更漂亮更有趣。

特殊方块

我想说的第一个改进方法是特殊方块——这种方块会给玩家额外得分,或者显示某些特别的效果。

为了打断活动和使游戏更有趣,大部分3连消游戏都包含特殊方块。按现在的情况来说,游戏在理论上可以一直进行下去,但玩法永远不变。时不时地引入一些特殊的方块可以使游戏保持新鲜感。

为了加入特殊方块,你必须改变方块生成的方式,这样当方块产生时,它就有可能是一个特殊方块。执行的办法有很多,但通常是产生介于1到100的随机数字,中有在随机值介于95到100之间时,才产生特殊方块。当然,随机值也可以在其他数字范围中产生。

你的目标是,保持特殊方块稀少,但又不能太稀少。这样,玩家才能时不时地得到特殊方块,使游戏更有意思;但是,太多特殊方块会破坏游戏的平衡性。

炸弹方块

特殊方块有很多种,最常见的是炸弹方块。

炸弹方块被消除时会导致其他方块被一并消除。不同的游戏有不同的表现方法:在某些游戏中,炸弹方块会破坏所有它周围的方块;在另一些游戏中,炸弹方块会破坏整排方块。

在下图中,你可以看到《Candy Crush Saga》中的两种炸弹方块:

StripedBlock(from gamedev.tutsplus)

StripedBlock(from gamedev.tutsplus)

在游戏中加入炸弹方块是很简单的:

1、先创建一个检测炸弹方块被破坏的事件。

2、一旦炸弹方块被破坏,它就会触发一个找到爆炸位置和破坏所有应该被它破坏掉的方块的功能。

3、例如,如果你的炸弹方块可以破坏它周围的所有方块,那么功有就应该找到炸弹方块的位置以及它周围方块的位置,看这些位置上是否还有方块。

4、如果它在那些位置上找到方块,那就破坏它们。

减速方块或暂停方块

在许多游戏中还有一种特殊方块,要么是使方块移动速度下降,要么是停止方块的移动。

这种方块也是很容易做的:

1、与炸弹方块一样,你需要一个事件来检测这些方块是否被破坏。

2、当这些方块被破坏时,MovementsPossible就会变成1,这样方块就停止移动了,或修改speed,使方块移动得非常慢。

3、然后,你还要有一个计时器来计算生效时间,大约10-15秒。一旦时间结束,游戏就会重置方块的移动速度到正常水平。

你还要考虑一个问题,当玩家激活一个暂停方块时,又激活另一个暂停方块,要怎么办?对于这种情况,你可以重置计时器,或把新激活的暂停时间累计到当前暂停时间中。

其他游戏模式

玩家总会玩腻我们现在做好的这种无尽模式,所以你还要考虑添加其他游戏模式。

定时模式

最简单的一种就是定时模式,也就是给玩家固定的时间,看他们在这段时间内能得到多少分数。

对于这种模式,其他代码都不用改,只要添加第二个失败条件,即当计时器走完时,游戏结束(游戏邦注:第一个失败条件是“当方块碰到屏幕顶部时,游戏结束”)。

当游戏开始时,计时器也开始,当计时器走完,游戏就显示相同的结束画面。

益智模式

在这种模式中,你给玩家一种之前设计好的、特殊的游戏面板,要求他们以尽可能少的交换次数消除所有方块。

(你可能要关闭方块移动,因为如果方块移动,游戏就会不断刷出新方块。)

这种模式要求你能够设置特殊的方块网格,所以你必须有一种系统,当游戏开始时,你可以进入特殊的方块设置,而不是像我们现在做的这样产生完全随机的设置。)

另外,虽然这种游戏模式相当容易执行,但需要你手动设计大量益智题,这样玩家才能有大量特殊的益智題可玩。

添加这种游戏模式可能很费时间,但许多玩家都喜欢这种模式。如果你舍时花时间,效果会相当不错的。

总结

在这个教程系列中,我们从无到有制作完一款3连消游戏。如果你有时间和想象力,你还能对这款游戏做更多改进,但我在本系列中展示的想法也可以运用到其他游戏项目中。

继续做游戏,继续探索新想法,你在这里学习到的东西也许有一天就派上用场了。

我希望,无论你是完整地看本系列,还是只看了你自己不太会的部分,你都能有所收获。感谢阅读!(本文为游戏邦/gamerboom.com编译,拒绝任何不保留版权的转载,如需转载请联系:游戏邦

Make a Match-3 Game in Construct 2: Chaining and Game Overs

by David Silverman

The time has finally come: we are just about done with our game, and are ready to implement the final gameplay mechanic. This article will focus on making a combo system that gives the player more points for creating chains that destroy multiple groups of blocks after only one swap.

On top of that, we will implement the loss scenario and add a Game Over screen. Finally, I’ll talk about things you can work on in your own time to improve on and expand the game beyond what we have covered. So, without further ado, let’s get started…

Final Game Demo

Here is a demo of the game we’ve been working towards, and which we will have built at the end of this part of the series:

Finding Matches

Before we move on to the main article, I want to make a small change to when FindMatches gets called.

While working on this article, I discovered an issue that you can see in the GIF below:

As you can see in this first GIF, when a block is dropped only one block distance to try and form a match with a group of blocks at the bottom of the fall, it works perfectly.

In this second GIF, though, it becomes clear that when a block is dropped a greater distance in the same scenario, it fails to detect the match until we perform another swap. The reason for this is that the game is not looking for matches often enough.

Right now, the game only looks for matches after a swap, but because of the amount of time it takes a Block to fall this distance, the match detection has already ended when the Block hits the ground and so the match isn’t found until it is re-initiated.

To fix this, we’ll modify when we perform a FindMatches check.

First go to the SwapBlocks function and remove the final Event from the function so that it does not call FindMatches at all.

SwapBlocks should look like this now:

At this point, there is no Event calling FindMatches. We’ll fix this by adding a new Action to the Event which detects when Matches are possible. Find this Event and add this Action to the end of the Else Event:

Action: Function > Call function
Name = “FindMatches”

Your Event should now look like this:

Also, take this chance to move both of the MatchesPossible Events to the end of the game code, if you haven’t already. Doing this will ensure that they are not called at all before the code which eliminates pre-made matches.

If you run the game now, you should be able to perform the scenario I presented above without issue.

Chaining

With that issue fixed, we are going to implement the chaining system, which gives the player extra points for matches that are caused by the destruction of another match.
You can see an example of the type of situation I mean below:

In the above scenario, the player moves the green block and creates a match. Then, the destruction of the green blocks causes the blue blocks to fall and create another match moments later.

I want to give the player bonus points for achieving something like this. Specifically, I want to apply a multiplier to the number of points the player receives for each match, and have the multiplier increase with each consecutive match that is made.

Making It Work

To make this system work, we are going to make a new variable called Chain, and then make a few small modifications to a the existing functions. So, first create a new Global Variable:

Global Variable: Chain
Type = Number
Initial Value = 0

Your variable should look like this:

This variable will act as a multiplier for the points to tell it how long a chain has been going.

Now go to the Event which causes the blocks to fall, and remove the Else Event that calls the FindMatches function.

Now go to FindMatches itself and find the locations where you make the FloatingPointsText objects. Modify the Set Text statements so that they use a new formula:

Action: FloatingPointsText > Set text
Text = NumMatchesFound * 10 * Chain

This change makes the floating text be modified in the same way that the Points themselves eventually will.

Next, go to the section of FindMatches where you call FindMatches again at the end of the Event, and delete this function call and the Wait statement. Why? Because, if we did not remove these, then FindMatches would end up getting called too many times and the chains would never be initiated correctly.

(Because of the changes we made earlier in this article, FindMatches will be called whenever all Blocks are in the grid and none are falling. Having multiple areas where we call FindMatches would just cause multiple instances of the function to be running at the same time, and could mess up the points system.)

Finally, we will make one other change to this function. Go to the end of the function and add this Action after you set
PointsGiven to 0:

Action: System > Add to
Variable = “Chain”
Value = 1

Now, whenever the game finds matches, it gives the player points, destroys the blocks, and then increases the Chain value.
The new version of FindMatches should look like this:

Next, go to the GivePoints function and modify both Actions that increase the value of the Score so that they take the Chain value into account:

Action: System > Add to
Variable = Score
Value = 10 * Chain

With this change, GivePoints should now look like this:

Resetting the Chain

We have implemented the variable Chain as a multiplier for the points the player is receiving (and the number of points that are displayed in the floating text objects), but there is still one thing we need to do: we need to add in a statement that resets the value of Chain so that it will not just increase infinitely.

We are going to add this statement to the On DragDrop Start Event so that, whenever the player starts dragging a new Block, it is regarded as a new Chain. The other reason we are doing it here is because it prevents the Chain value from being reset prematurely, thus making all of the matches in the latter part of a Chain less valuable.

Go to the On DragDrop Start Event and add this Action to the Actions list:

Action: System > Set value
Variable = Chain
Value = 1

Your Event should now look like this:

If you test the game at this point you should see that if you make a chain like the one I demonstrated in the gif earlier, you receive 90 points instead of 60 points.

With that working, the chaining system is complete and you should be able to create as elaborate a chain as you want without issue.

Game Over

Now that our chaining system is in place, we will add the loss scenario and a Game Over screen.

The first thing we need to do is add a new Layout that will act as our Game Over Screen:

On the right-hand side of the screen, right-click the Layouts folder, and select Add Layout.

Select Add Event Sheet.

Go to the new Layout and create a new BG Tile object.

Choose the image GameOverBGTile.png from the BG Images folder in the graphics pack you downloaded during the first tutorial.

Set the Position to -6, -7.

Set the Size to 613, 619.

Create a new Sprite object.

Choose the image GameOverText.png from the graphics pack.

Set the Position to 303, 200.

Create a new Button object.

Set the Name to RestartButton.

Set the Position to 262, 410.

Set the Size to 100, 30.

Set the Text to Restart.

Now that you have your Game Over screen set up, go back to your original Layout, Layout 1, and add one new item to that screen:

On Layout 1, create a new Sprite object.

Use the Paint Bucket tool to paint this sprite entirely red.

Close the animation editor.

Set the Name to GameOverArea.

Set the Position to 196, -30.

Set the Size to 344, 150.

Set the Opacity to 0.

You should notice that this sprite is at the same position, and the same size, as the top part of the game field. We are going to use this sprite object to detect when the player has lost by detecting when a block is colliding with it. Go to Event Sheet 1 so we can start implementing this.

Stopping the Blocks at the Top

Before we start detecting the loss scenario, we need to add a new variable that we will use to stop the blocks when they hit the GameOverArea object so that they will no longer move. This will make it clear to the player that they have lost.

Global Variable: MovementPossible
Type = Number
Initial Value = 0

Now go to the Event where you move the blocks and add this condition:

Condition: System > Compare variable
Variable = MovementPossible
Comparison = Equal to
Value = 0

Your movement Event should now look like this:

Now that the movement uses our new variable, we will add the Event that detects the loss condition:

Event:
Condition: Block > Is overlapping another object
Object = GameOverArea
Condition: Invert: Block > IsDragging
Action: System > Set value
Variable = MovementPossible
Value = 1
Action: System > Wait
Seconds = 1.5
Action: System > Go to layout
Layout = Layout 2

Your new Event should look like this:

Now, go to Event Sheet 2; we’re going to add some functionality to the RestartButton object we made earlier. Add a new Event to Event Sheet 2:

Event:
Condition: RestartButton > On clicked
Action: System > Go to layout
Layout = Layout 1

Your Event should look like this:

Resetting the Values

If you play the game now, get a game over, and then restart, you should notice that it goes back to the original Layout, but the blocks are not moving. The reason for this is that all of the variables we have been using are Global Variables, so some of them are not automatically reset when we restart the Layout.

To reset them, we need to add an Action to our On Start of Layout Event that will manually reset them for us.

Go to the On Start of Layout Event and add this Action to the initial Event before the For loops are called:

Action: System > Reset global variables

Your Event should now look like this:

If you test again, you should no longer have this issue.

What Should You Do Next?

At this point, we have gone over every feature that I wanted to cover within the scope of these tutorials.

You’ll notice that your game still isn’t exactly the same as the one in the demo above, with the biggest difference being that your game doesn’t have a Start screen. I chose not to go over the creation of the Start screen, since it is almost exactly the same as creating the Game Over screen – I leave this as an exercise for you.

Instead, I am going to discuss a few features you could consider adding to your game that could make it better or more interesting.

Specialty Blocks

The first thing I want to discuss is specialty blocks – blocks that either give the player bonuses or perform some unique function.

Most Match-3 games include specialty blocks to help break up the action and make the game more exciting. As it stands, the game can theoretically go on forever, but the gameplay never changes. Introducing special block types every now and then can help make the game more interesting when it has been going for a while.

To integrate a specialty block you will need to change the way blocks are generated, so that whenever a block is created there is a random chance it will become a specialty block. There are a number of ways to do this, but generally its best to just generate a random number between 1 and 100 and only generate a specialty block when it the random value is between 95 and 100, or some other range that you decide upon.

Your goal should be to make specialty Blocks rare, but not too rare. This way, the player will get them regularly enough to make the game more fun, but not so often that it destroys the balance of the game.

Bomb Blocks

When it comes to specialty blocks you have a lot of options; one of the most common is a bomb block.

Bomb blocks cause extra blocks to be destroyed when they are destroyed. They are different in every game : in some games, they destroy all of the Blocks that are surrounding them; in others, they destroy an entire row or column of Blocks.

In the image below, you can see two of the bomb block types from the popular game Candy Crush Saga:

Bomb blocks are generally pretty simple to integrate:

Start with an Event that listens for the destruction of any bomb blocks.

Whenever one is destroyed, it should pass its position into a function that will then find and destroy all of the blocks that would also be destroyed by that bomb block.

For example, if your bomb block is supposed to destroy all the surrounding blocks, you would pass the position of the bomb block to a function that would look at each of the surrounding positions to see if there are any blocks there.

If it finds any blocks in these positions, it then destroys them.

Time-Slow or Time-Stop Blocks

Another specialty block type you’ll find in a lot of games is one that slows down how quickly the Blocks move, or stops them entirely.

Blocks like these are very simple to make.

Just like with bomb blocks, you’ll need an event that listens for when one of these Blocks is destroyed.

Whenever this happens, you should either change MovementsPossible to 1 so that the blocks will stop, or modify the speed so that the blocks move very slowly.

Then, you should start a timer that lasts for a short period of time, maybe 10 – 15 seconds. Once that timer ends, you’ll reset the speed of the blocks and proceed normally.

You need to remember to account for the player activating a time-stop block while another time-stop block is already active. In this scenario, you should restart the timer or add the standard length of the timer to the existing timer and continue normally.

Other Game Modes

You could also consider adding other game modes for when the player gets bored of the Endless mode we created.

Timed Mode

The easiest game mode to add is one where the player has a time limit, with their goal being to get as many points as they can before the time runs out.

In this scenario, you would leave all of the game code untouched except to add a second loss condition to the game, whereby the game ends when the timer runs out (as well as when the Blocks hit the top of the screen).

When the game starts, you would begin a timer for the amount of time the mode lasts, and when the timer ends you would end the game the same way you do now.

Puzzle Mode

In this game mode you would give the player a very specific game board that you design in advance and ask them to eliminate all of the blocks in as few swaps as possible.

(You’ll probably want to turn off the block movement, since if the blocks are moving there will also be new blocks added over time.)

This mode would require you to be able to set up a specific block grid, so you would need to have a system that allows you to pass in a specific block setup when the game starts rather than generating one entirely at random like we do now.

On top of this, while this game mode would be relatively easy to implement, it would require you to do a lot of manual puzzle design so that you could create a lot of unique puzzles for the player to try and solve.

Adding a game mode like this can be quite time-consuming due to all the content creation required, but there are a lot of players that would enjoy it. It can really pay off well if you put in the time.

Conclusion

Over the course of this tutorial series, we built an entire match-3 game from start to finish. There is a lot more that you can do with this game if you take the time and have the imagination, but there are also a lot of ways you can use the ideas I presented to help you with other game projects.

Keep working on your game, and keep exploring new ideas, because you never know when something you learned here might come in handy later.

I hope that, whether you went through the whole series or just skipped around to the parts you weren’t able to do on your own, you learned something from this. If you have any issues or comments, let us know in the discussions below each article – I’d love to hear from you and see what twists you’ll add. In any case, thanks for reading and good luck with your games!(source:gamedev.tutsplus)


上一篇:

下一篇: