This is the “micro channel small game development actual combat” series of the 14th, this series we will start from 0, make a 1010 game.

If you don’t have any experience in game development, you can read my “Anyone Can Make Games” series, which will guide you hand in hand to make your first wechat game.

The small game development tool used in the tutorial is wechat official small game production tool: wechat small game production tool

The main content of this paper is to introduce the design and implementation of fine 1010 mode.

In the latest version of Refined 1010, a new game mode has been added: Quest mode. Today I will talk to you about its production ideas and general methods.

The reason for making such a mode is as follows: the original game mode takes a long game. Taking myself as an example, I need at least 10 minutes to play a game. If I want to play thousands of minutes carefully, it may take more than half an hour. Obviously this is too long for a small game, but the game mode is already there and the only way to shorten the time between sessions is to increase the difficulty of the game, which is not a good way.

So how can such a simple elimination game be reduced to a few minutes per session? The answer was to create a new game mode: level mode. Each level takes only a few minutes to complete, with either success or failure.

For this reason, I added a new level mode to the game. The original game mode is called The Classic mode to meet the needs of the two different scenarios. The Mode can be played in fragments of a few minutes, while the Classic mode can be used to kill a long period of boring time.

In fact, the level mode is not complicated, currently only added obstacle play. Just by changing the objective of the game, the two modes of play become very different.

  • The goal in classic mode is to eliminate as many as possible to get a higher score.

  • The goal of the game in quest mode is to eliminate the obstacles in the game as quickly as possible to complete the level challenges.

In classic mode, the player needs to survive as long as possible to get a higher score, while in Aggressive mode, the player always wants to get through the level as quickly as possible and move on to the next level.

As you can see, two very different outcomes can be achieved by simply adjusting the player’s goals in the game, so when you’re designing the gameplay, try switching the goals in the game, which may bring some unexpected surprises.

The following is the general idea of the mode of entry.

The biggest difference between the quest mode and the classic mode is the end of the game criteria, in the classic mode, the end of the game criteria is to check whether there is room in the grid for any of the remaining shapes, if not, the game ends. In the pass mode, the judgment condition of the end of the game is divided into two kinds, one is the same as the classic mode, as the failure of the pass condition, the other is to judge the number of obstacle blocks in the game, if there are no obstacle blocks, the game passes.

In the implementation only need to use a global variable to record the number of obstacle blocks, every time to eliminate an obstacle block, that is, the number of global obstacle blocks minus 1, the number of 0 then the game pass.

Recruit mode, the place with the greatest effort may be the level design, at first I thought is to use random way to generate levels, so I made a prototype test, the conclusion is although random way can make a checkpoint at every time of entering is different, but unable to control the emergence of obstacles block position, There was no control over the difficulty of the current level, so the idea of randomly generating levels was rejected. I ended up using a manual level design, with each level being manually designed to ensure a manageable difficulty curve that would allow the level to rise gently.

The biggest key to achieve the entry mode is the setting and presentation of data. How a level’s obstacle data is displayed on a grid.

This is a grid filled with data, with green squares filled with 1s to represent obstacles in the level and white squares filled with 0s to represent empty positions. Level design can be done by setting the grid data in such a way that if an obstacle block needs to be removed twice, just set the number of obstacles to 2. Once the level is designed, simply export the grid data and load the level data in the game for display.

The data for a level looks something like this:

0000000000000000000000021120000001001000000100100000010010000001001000000211200000000000000000000000
Copy the code

This is a string with a length of 100, each number represents the content of a square, 0 represents empty, greater than 0 represents different obstacle blocks, starting from the bottom left of the grid, read each number in turn, and then set the content of the grid according to the number can show a level.

As you can see, it’s not that complicated to implement. The real complexity is in the design of the level and turning it into a string of 100 characters, rather than manually setting the numbers one by one.

I built a level editor to handle this chore.

After editing the level, export all the data to a “CSV” file.

Wechat mini game production tool supports the import of “CSV” files, so it is easy to import the level data into the game production tool, here I used a list to store the game level data.

Finally, take a look at the effect in level mode.

After entering the game, read the data of the corresponding level, and then display the obstacle blocks of the current level based on the data.

Manual level design allows me to make a lot of interesting shapes, like this one:

After making the level mode, I had a further thought: could I make a level editor into the game? This allows players to make their own levels and even share them with friends, taking advantage of the social nature of wechat.

That’s the next step in this little game. I will continue to explore and share with you.


If you want to learn to play games, pay attention to my public number [small ants teach you to play] on it.

Welcome to experience my first small game work, wechat search “delicate 1010”, a delicate and warm small game.

If you think the article is good, please click a “like” to give me some motivation, thanks ~