r/MobileGaming • u/Time-Ad9897 • 7h ago
Discussion I reverse-engineered Block Blast's code. The pieces you get aren't random - they're chosen based on your phone, country, and how much you're worth to them.
Post and work made possible with AI
I took apart the iOS version of Block Blast! (v7.5.3, com.blockpuzzle.us.ios) and pulled the game logic out of the binary. The short version: the blocks are not randomly generated. There's a whole engine whose job is to decide which pieces to hand you, and it takes into account your board state, your device, and how profitable you are.
Here's the evidence, straight from strings and config tables embedded in the app.
- There's a literal block-selection rigging engine
The app ships a C++ subsystem built at /algo-cpp-sdk-all_prod/src/stateless/algoSelect/ with files named, in plain English:
- AlgoSelectBlockDealDeathState.cpp — "death state"
- AlgoSelectBlockRandomNoDie.cpp — "random no-die"
- AlgoSelectBlockAvoidClearBoard.cpp — avoid giving you a board-clearing piece
- AlgoSelectBlockStopRefreshScoreIOS.cpp — stop your score from climbing
- AlgoSelectBlockGather.cpp — clump pieces into unhelpful clusters
- AlgoSelectBlockEntropy3MediumIOS.cpp — fake randomness
And ~25 named selection functions: selectBlockEasyChoose, selectBlockHardOptimize, selectBlockAvoidClearBoard, selectBlockReviveReplace, selectBlockHardLevel4, RandomNoDie, DealDeathState, IncreaseVariance...
- The full algorithm catalog (found in Chinese config tables)
The app contains a readable table of 77 named algorithms. Translated, the catalog includes:
- Death puzzle, Lethal puzzle, Simple death
- Extreme puzzle, Incredibly hard puzzle
- Trap puzzle — high edge-hugging
- "Puzzle where no block fits" — yes, that's a real entry
- Limit high-combo algorithm
- Stop score-farming, Don't clear the board
- Random no-death — the piece that saves you
- Revive / Revive algorithm
- Assisted board-clear — rescue clears
- Entropy-increase variants — the "looks random" theater
Each algorithm has tuning knobs in the config: useRatio (chance it fires), replaceCount (how many pieces to swap to find a bad/good one), removeBlockArr (specific piece shapes removed from your pool), needFilter/needAdd, and a noDie boolean.
- The pieces run through a 6-layer pipeline, not a dice roll
Every batch of 3 pieces flows through: Preprocessing → Block Pool → Block Selection → Safety Net → Position → Logging. The safety-net layer exists to keep you alive when the game decides you shouldn't die yet.
- It's not just your board — it's your worth
This is the part that got me. The game classifies you as a customer:
- isHighValueForAdType — are you a high-value player?
- isLowMaturityHighValueUserWithInstallDay:firstLoadEcpm: — judges you by days since install + your ad ECPM (what advertisers pay to reach you)
- reportWithInstallDay:...:playerAdValue:showEcpm:...:isBlocked: — a full ad-worthiness report, with an isBlocked flag
- hs_updateMaturityScoreWithTotalScore: — a running "maturity score"
- multiplier_strategy_maturity_threshold / multiplier_strategy_player_maturity_value — a score-multiplier strategy driven by your value tier
- A downloaded TFLite ML model (fetched from CDN, updated remotely) that classifies you on-device
Plus:
- high_device / adShowOnLowDevice / deviceLevel — your phone model decides ad behavior
- Churn_prediction_tier_1/2/3 — three tiers of "how likely are you to quit"
- ReturnUserAbilityStrategy and ReturnUserFirstGameAssistance — returning players get "assistance"
- Country collected via getCountryCodeByGPS, Storefront, and Unity's CountryCodeProvider
- It's tuned remotely, per player cohort
All of this is driven by server config (statelessId, blockGroup, noDie fields) pushed from gamedot.afafb.com and hella-cfg.afafb.com. The exact rigging is A/B-tested per region and per player-value tier, and can be changed over the air, with no app update.
What this means
A genuinely random block puzzle deals you 3 random pieces. Block Blast runs a server-controlled slot machine with a brain: it can hand you a "death puzzle" when you're about to lose, quietly deal you the saving piece ("no-die") when you've been stuck or might quit, withhold board-clearing pieces, cap your combos, and stop your score — all calibrated against your phone, your country, your ad-worthiness, and your predicted likelihood to churn.
The JS is locked behind encryption, but the C++ engine shipped with readable symbols and Chinese config tables, which is what lays it all bare.
Method: downloaded the decrypted IPA, extracted the arm64 Mach-O, and pulled strings/config tables. Not encouraging anyone to break anything — this is just reading what's in the file.