How the game sets your difficulty
Every level attempt gets a personal difficulty, from how much you play, how much you spend and how you've done before. Then the falling pieces are recoloured, move by move, to hit it. With a calculator and a drop demo that use the game's own tables.
Out of moves, so close
The steering aims at a line that finishes on your last move, and harder settings aim just short of it. What the game calls “fuuu”, how the out-of-moves panel makes its pitch, and why bigger move packs cost the same.
About the game's code
- Release
- 开心消消乐 for Android, package
com.happyelements.AndroidAnimal, version 1.161, China only. - Engine
- Cocos2d-x 2 with LuaJIT. Almost all of the game is Lua: 11,675 scripts and about 2.7 million lines, comments included. A Rust module runs board simulations.
- Protection
- Each script is compressed and encrypted (AES-128-CBC). The key is inside the game's native library; once it's known, every script decrypts to readable source.
- Levels
- 9,851 main levels and 2,056 hidden ones ship in the app, each a JSON description of the board, goals, moves and score thresholds. The most common goal is collecting items (about 3,000 levels), then clearing ice (1,875).
- Server
- Much of the tuning is chosen by the server for each player: which table variants apply, statistics about the player, and measurements of how hard each level really is. The app only shows the rules and the default tables.