跳到正文
DEV Community· Instant Games·· 3 小時前AI 評分23

如何在不失去理智的情況下規劃 300 個三消關卡

Structuring 300 Match-3 Levels Without Losing Your Mind

AI 導讀

Instant Candy Pop 的關卡設計把 300 個三消關卡分成 6 個各有 50 關的世界,逐步引入障礙與玩法,再把舊元素組合起來。關卡以資料而非程式碼管理,並用簡單機械人反覆測試通關率,以找出過難或過易的關卡;穿插較簡單的關卡,讓難度節奏有所起伏。

正文

A match-3 game lives or dies on its level progression. One level is easy to make. Three hundred is a content problem, a balance problem and a boredom problem all at once. Here is the structure I used for Instant Candy Pop, a free match 3 game that runs in the browser with no download.

Chunk the levels into worlds

I did not design 300 levels. I designed 6 worlds of 50.

  • Strawberry Sunrise
  • Citrus Carnival
  • Mintwater Falls
  • Grape Twilight
  • Chocolate Peaks
  • Rainbow Citadel

A world is the right unit of design. It gets a palette, a mood, and, most importantly, a teaching job. Fifty levels is enough to introduce a new idea, let the player get good at it, and then combine it with older ideas.

One new thing at a time

The obstacle list in Candy Pop is jelly, candy crates, chocolate, frosted candy, locked candy and cherries. If you drop all six on a player at once, they stop reading the board and start guessing.

Instead, I treat each obstacle as a lesson:

  1. Introduce it alone, on a small, forgiving board.
  2. Reuse it in a slightly harder setup.
  3. Combine it with one earlier obstacle.
  4. Only then give it a level where it is the main challenge.

The first three levels also use short tutorials, because a player who stalls in level 1 never sees level 300.

A level is data, not code

Every level is a small object. A rough shape looks like this (simplified sketch):

const level = {
  id: 42,
  world: "Citrus Carnival",
  moves: 24,
  goal: { type: "jelly", target: "all" },
  grid: [
    "..J..J..",
    ".JJJJJJ.",
    // ...
  ],
  obstacles: { C: "crate", L: "locked" },
};

Keeping levels as data has three payoffs. You can generate them, you can validate them with scripts, and you can tune a number (like moves) without touching game logic.

Validate levels automatically

The cheapest bug in a match-3 game is a level that cannot be won. A simple harness helps: run a basic bot many times on each level and record how often it clears. If a level is cleared 0% of the time by a decent bot, look at it. If it is cleared 100% of the time with moves to spare, it is probably too easy for its position in the world.

You do not need the bot to be smart. You need it to be consistent enough that outliers stand out.

Pace with rest levels

A curve that only goes up exhausts people. I leave a gentler level every handful of levels so a player can win, feel clever, and keep going. It is a small trick, but it is the difference between "one more level" and closing the tab.

Special candies are the reward system

A match of 4 creates a Striped candy. An L or T shape creates a Wrapped candy. A match of 5 creates a Rainbow candy. Combining specials is where the game becomes expressive, for example two Striped candies, or a Rainbow with a Rainbow, which clears the board. Level design should leave room for these. A board where specials never have space to appear wastes your best feature.

What I would do differently

  • Write the bot earlier. I would build it before level 20, not level 200.
  • Record move counts for every cleared level from the start, so tuning is based on data.
  • Keep one spreadsheet of "what each world teaches" and review it before adding anything new.

Try it

Instant Candy Pop is free in the browser, with no sign-up and no real-money purchases.

How do you structure big content sets in your games? Worlds, chapters, something else?

Instant Candy Pop is an independent game and is not affiliated with the makers of any other match-3 title.

For readers hunting for candy games online, the game is a colorful candy puzzle you can play as one of the free match 3 games online, with a few match 3 tips built into the early tutorials.

來源:DEV Community · dev.to