A classic match‑3 puzzle game made with Qt 6 / QML. Swap adjacent tiles to make lines of 3 or more, earn points, create powerful props, chain combos — and try to finish before you run out of steps.
一款用 Qt 6 / QML 制作的经典三消游戏。滑动交换相邻方块,凑成 3 个及以上即可消除得分、生成强力道具、触发连锁连击——在步数耗尽之前拿到尽可能高的分数。
- 🎮 Classic match‑3 gameplay / 经典三消玩法 — swap, match, gravity drop, cascade combos / 交换、消除、重力下落、连锁连击
- 🚀 Props / 道具系统 — rockets, bombs and super items, all activatable and chainable / 火箭、炸弹、超级道具,可激活且可连锁触发
- 💥 6 combo props / 6 种组合道具 — rocket+rocket, bomb+bomb, bomb+rocket, super+rocket, super+bomb, super+super / 火箭+火箭、炸弹+炸弹、炸弹+火箭、超级+火箭、超级+炸弹、超级+超级
- 📊 End‑of‑game statistics / 结算统计 — per‑color eliminations and prop activations shown at game over / 结算时展示各颜色消除数与道具激活数
- ⏸️ Pause & initial step settings / 暂停与初始步数设置
- 🎵 BGM & sound effects / 背景音乐与音效
- 🧩 Refactored core engine / 重构的核心引擎 — game rules live in a plain C++ core (
core/), UI in QML / 规则逻辑下沉到纯 C++ 核心(core/),界面由 QML 驱动
| 规则 Rule | 说明 Description |
|---|---|
| Match / 消除 | Swap two adjacent tiles; 3+ in a row/column clears them for 10 points per tile / 交换相邻方块,横竖 3 个以上消除,每格 10 分 |
| Combo / 连击 | Falling tiles can trigger new matches automatically / 方块下落后自动连锁消除 |
| 4 in a row / 四连 | Creates a rocket — clears a full row or column / 生成火箭,清除整行或整列 |
| 5 in a row / 五连 | Creates a super item — clears all tiles of one color / 生成超级道具,清除全场同色方块 |
| T / L shape / T 字或 L 字 | Creates a bomb — clears tiles within radius 2 / 生成炸弹,清除半径 2 范围内的方块 |
| Swap two props / 道具交换 | Two props swapped together trigger a powerful combo / 两个道具交换触发强力组合效果 |
| Steps / 步数 | Each effective move costs 1 step; game over at 0 / 每次有效移动扣 1 步,步数用完游戏结束 |
Swap adjacent tiles, match 3+, watch the cascade:
交换相邻方块,三消消除,方块下落连锁:
Rocket — lightning clears a whole column / 火箭 —— 闪电清除整列(或整行):
Bomb — explodes everything in radius 2 / 炸弹 —— 爆炸清除半径 2 范围:
Super item — wipes all tiles of one color / 超级道具 —— 清除全场同色方块:
Combo: Rocket + Rocket — clears a full row AND column / 组合:火箭+火箭 —— 行列十字清除:
Combo: Bomb + Rocket — blast plus triple lines / 组合:炸弹+火箭 —— 爆炸加三行(列)清除:
Combo: Bomb + Bomb — massive radius‑4 blast / 组合:炸弹+炸弹 —— 半径 4 超级爆炸:
Combo: Bomb + Super — turns a color into bombs, then detonates them all / 组合:炸弹+超级 —— 先把一色变成炸弹再全部引爆:
Combo: Rocket + Super — turns a color into rockets, then fires them all / 组合:火箭+超级 —— 先把一色变成火箭再全部发射:
Combo: Super + Super — double full‑board wipe / 组合:超级+超级 —— 双重全场清除:
Pause anytime to adjust the initial step count, restart or resume:
随时暂停,可修改初始步数、重新开始或继续游戏:
├── main.cpp # app entry, registers the game backend / 程序入口
├── core/
│ ├── GameEngine.{h,cpp} # game rules: matches, gravity, props, combos, score / 规则引擎
│ ├── BoardModel.{h,cpp} # board state as compact uint8 grid / 棋盘数据模型
│ ├── MatchFinder.{h,cpp} # pure match-detection algorithms / 纯函数匹配检测
│ ├── GameBoardCompat.{h,cpp} # QObject facade exposed to QML / 暴露给 QML 的桥接层
│ └── Types.h # shared types & prop constants / 共享类型与道具常量
├── qml/
│ ├── main.qml # UI, HUD, overlays / 界面与覆盖层
│ └── AnimationManager.qml # animation queue & prop effects / 动画队列与道具特效
└── image/, music/ # art & audio assets / 美术与音频资源
Requirements / 环境要求: Qt 6.5+ (QtQuick, QtMultimedia), qmake or Qt Creator
- Open
Match3Demo.proin Qt Creator, or run / 在 Qt Creator 中打开Match3Demo.pro,或执行:
qmake Match3Demo.pro
make # Windows (MinGW): mingw32-make- Run the produced
Match3Demobinary / 运行生成的Match3Demo。
On Windows with Qt's MinGW toolchain, make sure Qt's
mingw_64/binand the matchingTools/mingw*/binare at the front of yourPATHwhen building/running. Windows 下使用 Qt 自带 MinGW 工具链时,构建和运行请将 Qt 的mingw_64/bin与配套Tools/mingw*/bin放在PATH最前。
Important
English: The source code of this project is licensed under the MIT License. However, the game art (tile images, backgrounds, UI) and audio (BGM, sound effects) in image/ and music/ are from the mobile game Anipop (开心消消乐) and all rights belong to their original owner (Happy Elements). They are included for learning and communication purposes only, non-commercial. If you are the rights holder and object to their use here, please open an issue or contact me, and I will remove them immediately. Please do not use these assets in any commercial product.
Important
中文: 本项目的源代码基于 MIT License 开源。但 image/ 与 music/ 目录中的游戏美术素材(方块、背景、界面图)与音频(背景音乐、音效)来自手游**《开心消消乐》,版权归原作者 乐元素(Happy Elements) 所有。这些素材仅用于学习交流,严禁商用**。如权利人认为本项目的使用构成侵权,请提交 Issue 或联系我,我会立即移除相关素材。请勿将本项目中的任何素材用于任何商业用途。
The source code is released under the MIT License. Game assets are not covered by it — see the disclaimer above. / 源代码基于 MIT License 开源;游戏素材不在该授权范围内,见上方版权声明。












