Included content & third parties
- Google Mobile Ads Unity plugin (AdMob): not in the download. Import it from Google to show ads (Ads). Until then the game builds and runs without ads.
- Unity In-App Purchasing: not in the download as files. Unity's Package Manager installs it from
Packages/manifest.json("com.unity.purchasing": "5.4.4") when the project opens (In-app purchases). - No AdMob ids: no App ID and no ad unit id ships with the project; every id field of the Game Config is empty. Enter your own before you build for release.
- No receipt-validation key:
GooglePlayTangle(Google Play) is not shipped; you create your own in Unity (iOS needs none: StoreKit 2 verifies purchases itself) (Receipt validation).
.dll, .so, .aar, .jar or .framework file, and no Library or PackageCache folder.| Content | Where it comes from |
|---|---|
| Code | Written for this item by the author (Zaviro), with an AI coding assistant (see AI disclosure). The save, ads, purchase and UI framework is shared with the author's other Unity items (Ludo Royale, Chess Crown, Link Crown); it is a self-contained copy, supported and updated through this item's own updates (see Shared components). |
| Pictures (blocks, crystals, ice, board, buttons, panels, icons, backdrops, app icon) | Original work created by the author with their own art generator code, made for this item. No stock images, clip art, emoji packs or AI image generator. |
| Sounds and music | Original work synthesized by the author's own audio code (bells, plucked strings, filtered noise), made for this item. No samples, sound libraries or AI audio generator. |
| Levels (300) | Made by the author's level generator from fixed seeds and checked by the game's own computer player. None comes from another game. Every level's origin (template, seed, win rates) is listed in Documentation/Level origins (all 300 levels).csv (how they were made). |
| Fonts | Rubik Black and Rubik ExtraBold by the Rubik Project Authors, SIL Open Font License 1.1 (BlockBloom/ThirdPartyLicenses). TextMesh Pro's essential resources come with Unity's uGUI package. |
The same notes are in the plain-text file Documentation/Included content and third parties.txt, next to this page.
Introduction
Thank you for purchasing Block Bloom. This guide takes you from opening the project to publishing your own version of the game. Every gameplay, economy, ads and shop setting lives in one asset (the Game Config), the 300 levels live in one level pack you edit with the Level Editor, every screen and popup is a regular prefab in one scene, and the rules of the game are plain C# you can read and change.

















Click a screenshot to open it at full size (1080 × 2400, taken on an Android phone), or see them all on the full-size screenshots page.
How the game plays
The rules
- The board has 8 × 8 cells. Below it, the tray holds three pieces. Drag a piece onto the board: it floats a little above the finger so the finger doesn't hide it, a shadow shows where it lands, and the rows and columns it would complete glow.
- Pieces go anywhere they fit. They don't turn by themselves (only with the Turn booster).
- When all three pieces are placed, three new ones come.
- A full row or column clears. Several lines at once give more points, and a cheer: Frosty! for two, Blizzard! for three, Avalanche! for four or more.
- Chain: clearing again within three placements adds a chain step, and each step adds 25% to the points of a clear (a chain of 3 gives ×1.5). Three placements without a clear end the chain.
- Clearing the whole board gives a bonus (Crystal clear!, 300 points).
- The game ends when none of the tray pieces fits anywhere. Once per game a second chance thaws the three fullest rows (for a rewarded ad or 300 coins); frozen blocks and crystals stay.
Points = 1 per block placed + 10 per block cleared × the number of lines cleared at once × the chain bonus. Every number is a setting (Game Config → Score).
Classic
Endless, for the best score. The dealer starts gentle (smaller pieces, trays that always fit, often a piece that completes a line) and slides to tough (bigger pieces, trays that may not all fit) as the score reaches 6,000. The best score is kept and shown on the home screen. A game left in progress is saved: the Classic button then reads Continue. At the end, the game pays one coin for every 100 points (at most 150).
Levels
300 levels in 15 chapters of 20 (Snowy Meadow, Crystal Cave, Frozen Lake … Bloom Summit), on a map that opens level by level. Before a level, a popup shows its starting board, its goals and its moves. A level is won when every goal it has is reached:
| Goal | How |
|---|---|
| Points | Reach the score. |
| Blue crystals, rose crystals, amber stars | Some blocks hold a crystal or a star (on the starting board, or on pieces the dealer hands out). Clear the line it is in to collect it. |
| Frozen blocks | Ice breaks when its line clears; thick ice needs two clears (the first one cracks it). A full line with ice in it still clears; thick ice stays in place, cracked, until its second clear. |
Most levels also have a move limit (each placed piece is one move). Out of moves, the game offers five more (for a rewarded ad or coins). Stars: winning within the level's par (the moves the careful computer player needs) gives three stars, within 135% of par two, otherwise one. Coins: 20 for a first win plus 10 per star; 5 for a replay.
Boosters
| Booster | What it does | Unlock level |
|---|---|---|
| Turn | Tap a piece of the tray: it turns a quarter clockwise. A turn that wouldn't change the piece (a square, a single block), or that would leave no piece that fits, is refused and uses no booster. | Level 5 |
| Pick | Tap a block of the board: it breaks (frozen blocks and crystals too; a crystal broken this way counts). | Level 9 |
| Refresh | Three new pieces that can all be placed. | Level 13 |
New players start with 3 Turns, 2 Picks and 2 Refreshes, so they can try each booster from the first game. A booster the player has none of shows a lock until its unlock level; after that, its button opens a popup to buy a pack of 3 with coins or get one for a rewarded ad. The first game shows a hand that teaches the first move.
Coins, shop and gifts
Coins come from Classic games, levels, the daily gift (50, 75, 100, 125, 150, 200, then a 500-coin present on day 7), rewarded ads in the shop (100 coins, five a day) and purchases. They buy boosters, second chances, more moves, block styles and backdrops.
Requirements
- Unity 6000.0 LTS (made and tested with 6000.0.84f1). Use 6000.0.58f2 or newer: earlier Unity 6 versions have the security issue CVE-2025-59489.
- Unity Hub modules: Android Build Support (with OpenJDK and Android SDK & NDK) and/or iOS Build Support.
- Android API levels: minimum API level 24 (Android 7.0) and target API level 36 (Android 16), both set explicitly in Player Settings (see Building).
- For iOS: a Mac with Xcode 16 or newer.
- Packages (already in the project's manifest): In-App Purchasing 5.4.4, uGUI 2.0 with TextMesh Pro.
- C#: the scripts use C# 8 features such as switch expressions. Unity 6 compiles them as they are (Unity supports C# 8 from 2020.2 on).
- Optional: the Google Mobile Ads Unity plugin (not included, free from Google; made for version 11.x) to show ads.
Device requirements
What your players' phones need to run the game as it comes in the package.
| Minimum | Notes | |
|---|---|---|
| Android version | Android 7.0 (API level 24) | The game targets API level 36 (Android 16), set explicitly in Player Settings. |
| Processor | ARM64 or ARMv7 | Store builds contain both. The demo APK is ARM64 only. |
| Graphics | OpenGL ES 3.0 or Vulkan | Required by Unity 6. All phones sold with Android 7 or newer have it. |
| Memory (RAM) | 2 GB recommended | The game itself uses about 275 MB while playing, of which about 65 MB is graphics. |
| Storage | About 40 MB | The demo APK is 36 MB. Builds from Google Play (App Bundle) download only what the phone needs. The save takes a few KB. |
| Screen | Portrait | Phones from 16:9 to 21:9 and tablets (3:4); notches and cut-outs are kept clear (safe areas). The board grows or shrinks to fit. |
| Internet | Not needed to play | Needed only for ads, purchases and the privacy consent form. |
| iPhone / iPad | iOS 15 | Set in Player Settings (Target minimum iOS Version 15.0): Unity IAP 5 uses StoreKit 2, which needs iOS 15. iPhone 6s or newer; uses Metal. |
Measured on a Samsung Galaxy A71 (Android 11, 1080 × 2400, 8 GB RAM), where every screenshot of this guide was taken. The layouts were also checked at 9:16, 20:9 and 3:4 screen shapes in the editor.
Your own accounts and possible costs
The project itself has no running costs and needs no server. To publish and earn money you need your own accounts:
| Account | Needed for | Cost |
|---|---|---|
| Google Play Console | Publishing on Android, in-app products | One-time registration fee (25 USD at the time of writing) |
| Apple Developer Program | Publishing on iOS, in-app products | Yearly fee (99 USD at the time of writing) |
| Google AdMob | Ads | Free; Google keeps a share of ad revenue |
The stores also keep a commission on in-app purchases (usually 15% or 30%). AdMob and the stores are third-party services with their own terms; check the current fees on each provider's website.
Getting started
- Unzip the download. In Unity Hub choose Add → Add project from disk and pick the
BlockBloomfolder (the one that containsAssets). Open it with Unity 6000.0. - The first opening imports everything and downloads Unity IAP through the Package Manager (a few minutes, online). If Unity asks to import TextMesh Pro Essentials, the project already contains them: you can close the window.
- Choose Tools → Block Bloom → Open Main Scene, set the Game view to a portrait phone size (for example 1080×1920 or 1080×2400) and press Play.
- Open Tools → Block Bloom → Game Config to see every setting, and Tools → Block Bloom → Level Editor to see the levels.
- Open Tools → Block Bloom → Setup Checklist. It lists, with a live status, the six things every buyer must replace before publishing (save secret, AdMob ids, product ids, Google Play receipt key, links, package name), says what happens if one is skipped, and has a button to each place to change it. It also opens by itself while any of them is left.
- Set your own save secret now: Tools → Block Bloom → Generate New Save Secret. It writes a new random secret into
SaveManager.cs. It is required before your first release: see the next section, Save secret (required).

⚠ Save secret: required before you publish
Every copy of Block Bloom ships with the same save secret (BlockBloom-CHANGE-ME-…, the Secret line of Scripts/Runtime/Services/SaveManager.cs). If you publish with it, your game shares its anti-tamper secret with every other buyer of this package, which nullifies the save protection: anyone who has the package can forge a save, with any number of coins and boosters, No Ads and every theme without paying (the full risk). Replacing it takes one click:
- Generate it: in Unity choose Tools → Block Bloom → Generate New Save Secret… and confirm, or click Generate New Save Secret in the red box at the top of the Game Config.
- Check it worked: the red box at the top of the Game Config is gone, the Setup Checklist shows item 1 as DONE, and the
Secretline inSaveManager.csno longer containsCHANGE-ME. - Keep it for good: commit
SaveManager.csto your version control, or keep a copy of the secret somewhere safe, and use the same secret in every update. A different secret makes every existing save unreadable and players start over (see When a save is rejected).
If you forget: the Setup Checklist window opens when you open the project and lists it as TO DO, the Game Config shows the red box, a release build stops and asks (Generate and cancel build / Build anyway / Cancel build), and every build logs a warning. None of them changes the secret for you: only step 1 does.

Project structure
Assets/BlockBloom/
Art/ images: Blocks (5 styles x 7 colours), Board (frame, cell, crystals, ice), Backdrops,
UI (panels, buttons, ribbons, map, app icon), Icons (+ Glyphs), Fx
Audio/ 21 sound effects and 2 music loops (WAV)
Config/ the themes: Skin_* (block styles) and Backdrop_* assets
Documentation/ this guide, the full-size screenshots page and the level origins
Fonts/ Rubik Black and Rubik ExtraBold (+ TextMesh Pro font assets and materials)
Levels/ Levels.asset, the level pack (300 levels)
Plugins/iOS/ the iOS haptics helper
Prefabs/UI/ every screen and popup (HomeScreen, GameScreen, ShopPopup ...) and the product and theme cards
Resources/ GameConfig.asset and Localization/strings.csv
Scenes/ Main.unity
Scripts/
Runtime/Core the rules: Board, Shapes, Dealer, Scoring, Session, LevelDef, Bot (plain C#, no Unity code)
Runtime/Game board view, tray and drag, pieces, goal panel, effects
Runtime/UI screens (Loading, Home, Levels map, Game), popups and widgets
Runtime/Framework UI manager, tweens, localization, themes, Game Config, level pack
Runtime/Services save, wallet, progress, audio, haptics, clock
Runtime/Ads ads manager and placeholder ads
Runtime/IAP Unity IAP manager
AdMob/ Google Mobile Ads provider (compiled only when the plugin is in the project)
Editor/ menu, Level Editor, Setup Checklist, build checks, AdMob setup, art import rules, tests
ThirdPartyLicenses/ font license
Assets/Resources/BillingMode.json Unity IAP store choice for Android (Google Play)
Game Config
Almost everything is a setting of one asset, BlockBloom/Resources/GameConfig.asset (Tools → Block Bloom → Game Config). Every field has a tooltip: hold the mouse over its name. Changes apply the next time you press Play; in a build, they are part of the game you publish.



Every section, with an example
| Section | What it sets | Example: before → after |
|---|---|---|
| Score | Points per block placed (1) and cleared (10, multiplied by the lines cleared at once), the share each chain step adds (0.25), placements a chain survives without a clear (3), and the bonus for an empty board (300). | Bigger rewards for combos: Chain Step 0.25 → 0.5. A chain of 3 then gives ×2 instead of ×1.5. |
| Classic mode | The dealer at score 0 (Start) and from Ramp Score on (End); in between it slides from one to the other. Each one has the weights of small, medium, large and huge pieces, Fair Chance (the three pieces can surely all be placed) and Help Chance (one piece completes a line right away). Also the coins of a Classic game. | Longer, calmer games: Ramp Score 6000 → 12000, and End → Fair Chance 0.75 → 0.9. |
| Levels mode | The level pack, the coins of a first win (20 + 10 per star) and of a replay (5), and the moves the “more moves” offer gives (5). | More generous levels: Level Coins 20 → 40 and Coins Per Star 10 → 15 (a three-star first win then pays 85). |
| Second chance | Rows that thaw (3), the price (300 coins; or a rewarded ad), how many per game (1). | No second chance at all: Second Chances Per Game 1 → 0. |
| Boosters | For Turn, Pick and Refresh: on or off (Enabled), price of a pack, pack size, starting count, and the level from which it can be bought once a player has none left. Boosters per rewarded ad. | More Picks for new players, buyable from the start: Pick → Start Count 2 → 3, Unlock Level 9 → 1. |
| Rewards | Start coins (300), the 7 daily gifts (50 … 500), free coins per rewarded ad (100) and ads per day (5), double coins with an ad. | A bigger day 7: Daily Rewards → Element 6 500 → 1000. |
| Themes | The block styles and backdrops on sale (assets in Config/); the first of each list is free and owned by everyone. | Remove a style from the shop: select the list, select its element, click −. (Players who bought it keep it in their save, but it no longer shows.) |
| Feel | How far above the finger a dragged piece floats (260), the size of the tray pieces (0.55 of a board cell), the first-move hand. | Piece closer to the finger: Drag Lift 260 → 180. |
| Ads | Master switch, banner, when interstitials show (from the 3rd finished game, every 2, at least 90 s apart), App IDs and ad unit ids (empty), test devices. See Ads. | Fewer full-screen ads: Interstitial Every 2 → 3, Interstitial Cooldown 90 → 150. |
| Purchases | Simulated purchases in the editor, receipt validation, the products of the shop. See In-app purchases. | A bigger coin pack: Products → Element 2 → Coins 15000 → 20000 (and the same price in the stores). |
| Links | Privacy policy, terms, store pages and support e-mail used by the Settings buttons. | https://example.com/privacy → https://mystudio.com/blockbloom/privacy |
Levels & the Level Editor
The 300 levels are in one asset, BlockBloom/Levels/Levels.asset (a Level Pack), set in the Game Config. The map shows them in chapters of 20. Tools → Block Bloom → Level Editor edits them; every change can be undone with Ctrl/Cmd+Z and is saved in the level pack.

Making a level
- Choose the level in the list, or Add a new one after the selected level (Copy duplicates it, Move up / down reorders).
- Paint the board. Pick a brush (a block and its colour, a blue crystal, a rose crystal, an amber star, ice, thick ice) and click or drag on the grid. Right click erases. A row or column may not be full at the start.
- Set the goals. Target score, crystals and stars to collect, and Break all ice (every frozen block of the board). Set as many as you like; the level is won when all of them are reached.
- Moves: the placements allowed (0 = no limit: the level is then lost only when no piece fits). Gem chance: the chance for each dealt piece to carry a crystal or star of a kind the level still needs.
- Dealer: click Gentle, Normal or Tough, or set the weights of small, medium, large and huge pieces, Fair trays and Helper piece yourself.
- Check it. The box below says whether the level is valid (and what is wrong if not). Test with the bot (40 games) plays it with the careful and the casual computer player and shows how often each wins and in how many moves. Set par from the bot sets the three-star par to the careful player's median. Play it starts Play mode right in that level (if Play mode is already running, the level starts in the running game).
The board layout
Each level stores its starting board as 64 letters, one per cell, row by row from the top. The Level Editor writes it for you; this picture shows how cells are numbered, which matters if you write levels by hand or in code:

. empty, 0–6 a block of that colour, a b c crystals and stars, i ice, I thick ice.Where the 300 levels come from
None of the levels comes from another game. They were made by the author's level generator (a development tool, not part of the download) in these steps:
- A plan per level: the kind of goal (score, crystals, ice, ice and crystals, score and ice) and a planned difficulty that rises along the 300 levels with easier “breather” levels between harder ones.
- A starting board from one of 13 hand-made templates (heart, diamond, valley, stairs, pillars, flake…) with a fixed seed, filled with blocks, crystals and ice.
- Tuning with the game's own computer player: the casual player plays the level 48 times, and the move limit (or the score target) is adjusted until it wins about as often as planned (from about 95% for the first levels down to about 50% for the hardest). The careful player then plays it 16 times; its median number of moves becomes the three-star par.
- Proof:
Documentation/Level origins (all 300 levels).csvlists every level's kind, template, seed, moves, par, goals and the win rates of both players. The same origin is shown in the Level Editor (Origin: generator v1, template valley, seed 372206), and the included tests replay every level with the careful player.
Levels you edit are marked edited in the Level Editor.
Rules engine & computer player
The rules are in Scripts/Runtime/Core: plain C# with no Unity code, so the same rules run in the game, the editor tools, the tests and the level generator.
| Class | What it does |
|---|---|
Board | The 8 × 8 grid as a 64-bit mask (one bit per cell: row * 8 + col), plus the colour, crystal and ice of each cell. Placing, finding and clearing full lines, cracking ice, loading and writing layouts. |
Shapes, Shape, Piece | The 37 piece shapes (15 outlines and their turns), each with its size class; a piece is a shape with a colour and maybe a crystal. |
Dealer | Deals trays of three. Fair trays are checked so the three pieces can surely all be placed in some order (a fast search over the bit masks); helper pieces complete a line right away. |
Scoring | Points of a placement and the cheer it earns. |
Session | One game, Classic or a level: board, tray, score, chain, goals, moves, boosters, second chance, the outcome. Saves itself to a SessionState and loads back. |
LevelDef | One level: layout, goals, moves, par, dealer, gem chance, origin; Validate() says what is wrong with it. |
Bot | The computer player used by the Level Editor, the tests and the level generator (it doesn't play against the player). It rates every placement of every tray piece with a few board features (lines cleared, nearly full lines kept open, empty cells closed in, a tidy board, cells that move a level goal forward), then, of the best few, prefers one after which the rest of the tray still fits. Skill 1.0 always takes its best move; lower skills add noise to the ratings, like a less careful player (the casual player is 0.55). |
Rng | A small seeded random generator, so a seed always gives the same game (useful for tests and levels). |
The bot is fast enough to run on the main thread: a whole game takes a few milliseconds. In the game it never runs while the player plays.
Testing your changes
After you change the rules (Scripts/Runtime/Core), the levels, the Game Config or the save data, run the included tests. They need no extra package.
| Tools → Block Bloom → Tests → | What it checks | Time |
|---|---|---|
| Run Quick Tests | Every shape and its turns; the Turn booster refusing turns that would end the game or change nothing; placing and clearing on hand-made boards (rows, columns, both at once, ice and thick ice, crystals); the fair-tray search against a brute-force search on thousands of random boards; the dealer; the save format of a game in progress; 200 computer games of Classic with every rule checked after every move; all 300 levels validated and played 4 times by the careful player; the Game Config (ids, prices, products, levels) and the save system (edited, rejected and restored saves). | About 5 seconds |
| Run Full Tests | The same with 3,000 Classic games and each level played 12 times (about 20 million checks). | Under a minute |
- Results: a dialog says whether every check passed. The Console shows a line for each failed check and a summary. A level the careful player can't win is reported as a warning: worth a look, not an error.
- The code is in
Scripts/Editor/BlockBloomTests.csandScripts/Editor/Tests/CoreChecks.cs. To add a check, callr.Check(condition, "what it means")in one of their methods; to test a rule, copy one of the hand-made boards inBoardChecks: load a layout, place a shape, check the result. - The save checks use this computer's saved progress and put it back at the end. Stop Play mode before running the tests.
- Command line (for a build server):
Unity -batchmode -projectPath <project> -executeMethod BlockBloom.EditorTools.BlockBloomTests.RunFromCommandLine -quit, with-fullfor the full run. The exit code is 0 when every check passes and 1 otherwise.
How the code fits together
Three layers, each only talking to the one below it:
- Input:
TrayViewmoves the dragged piece (lifted by Drag Lift), asks theSessionwhether it fits at the nearest cell, and hasBoardViewshow the shadow and the lines that would clear. When the finger lifts, it callsGameScreen.OnDropped. - Rules:
OnDroppedcallsSession.Place, which changes the board, clears lines, counts points, crystals and ice, deals a new tray when the tray is empty, and sets theOutcome(playing, won, no room, out of moves). It returns aMoveResultwith everything that happened. - Show it:
GameScreenreads theMoveResult:BoardViewanimates the drop and the clear, crystals fly to theGoalPanel, the score counts up, cheers and sounds play. Nothing on screen changes the rules. - Save it: a Classic game in progress is written to
PlayerData.savedClassicafter every move.SaveManagerwrites the save to the phone at most every 2 seconds during play (DirtyWriteInterval), at once for coins, boosters and purchases, and when the app pauses or closes. - The end: after every change to the game (a move, a booster, a second chance)
GameScreen.CheckOutcomelooks at theOutcome; when the game is over, the second chance or the end follows a short pause for the effects.GameScreen.Finishrecords the best score or the level's stars (Progress), puts the coins in the wallet as pending (they are collected by the result popup, and never lost if the app closes), letsAdsManagershow an interstitial if one is due, then shows theResultPopup. These delayed steps belong to one game: leaving the screen drops them (a level won just before still counts), and a Classic game the app closed at its second chance comes back to that moment with Continue.
Where to change what: rules in Core; how a move looks in BoardView and GameScreen; what a screen shows in its screen or popup class (UI/Screens, UI/Popups) and its prefab; numbers in the Game Config.
Adding a piece shape
The most common change: a new piece for the dealer, for example a big “plus”. One line in one file.
- Scripts/Runtime/Core/Shapes.cs: add a line to
Outlines.#is a block,.an empty cell,/starts the next row. The class (Small, Medium, Large, Huge) decides how often the dealer picks it (Game Config → dealer weights).
Its turned versions are made by themselves (duplicates dropped), sostatic readonly (string name, ShapeClass cls, string drawing)[] Outlines = { ("dot", ShapeClass.Small, "#"), ... ("block", ShapeClass.Huge, "###/###/###"), ("plus", ShapeClass.Huge, ".#./###/.#."), // new: a plus of five blocks };plusbecomes one shape and an asymmetric outline up to four (name-0…name-3). Keep shapes within 5 × 5 cells so they fit in a tray slot (the longest shipped piece,penta, is 5 long). - Nothing else to draw: pieces are built from the block pictures of the current style, so the new shape works with every theme.
- Run Tools → Block Bloom → Tests → Run Full Tests. The shape checks cover the new outline, and the level checks show whether the levels are still winnable: a new shape changes the pieces the dealer hands out in Classic and in every level.
- Check your hardest levels with Test with the bot in the Level Editor; give them a few more moves if the win rate dropped.
Saves: a Classic game in progress stores its tray as shape ids (ell-2). Adding a shape never touches existing saves, so an older save loads in the new version, and a save with the new shape opened by an older version simply drops that one piece from the tray and deals again if the tray is empty. The included tests prove it: they load a saved game whose tray holds a shape id the game doesn't know, and one where every piece is unknown. Removing or renaming a shape is just as safe for saves, but don't do it while you still ship levels tuned with it in mind.
Removing a booster
Example: a game without the Pick booster. One switch does it; no code changes.
- The switch: Game Config → Boosters → Pick → untick Enabled. The game then hides its button under the board (the two other buttons close up, centred), and the booster can't be used, in Levels or in Classic.
- How to play changes by itself: its last line (text key
help_boosters, which names Turn, Pick and Refresh) is replaced byhelp_boosters_some(“Stuck? Use the boosters under the board.”). With all three boosters off, the line disappears. Both texts are instrings.csv, in every language; edit them there if you like. - Bundles: Game Config → Purchases → the Winter Pack gives 5 of each booster: set its Picks to 0. The shop card adds up the boosters by itself (“No Ads · 10 boosters”). The included tests fail with a clear message while a product still gives a switched-off booster.
- Saved games and old players (an update of a published game): nothing breaks. Players keep the number of Picks in their save, and it comes back if you switch the booster on again in a later update. The save stores the boosters by position, so keep
Booster.Pickin the enum. - Optional code removal: not needed. If you want to strip it anyway, leave the enum value and remove only the Pick branch of
GameScreen.OnBooster/OnCellTappedandSession.PickBlock; keep the switch off so its button stays hidden.
The same switch removes Turn or Refresh (the Winter Pack's Turns / Refreshes to 0).
Economy & rewards
| Source | Coins (default) | Setting |
|---|---|---|
| New player | 300 | Start Coins |
| Classic game | 1 per 100 points, at most 150 | Classic Points Per Coin, Classic Max Coins |
| Level, first win | 20 + 10 per star (50 for three stars), doubled with an ad | Level Coins, Coins Per Star, Double With Ad |
| Level, replay | 5 | Replay Coins |
| Daily gift | 50, 75, 100, 125, 150, 200, 500 (a missed day starts again) | Daily Rewards |
| Rewarded ad in the shop | 100, five a day | Free Coins Amount, Free Coins Ads Per Day |
| Purchases | 1,000 / 6,000 / 15,000, Winter Pack 5,000 | Products |
| Spending | Coins (default) |
|---|---|
| Booster pack of 3 | Turn 120, Pick 180, Refresh 150 |
| Second chance (thaw) or 5 more moves | 300 |
| Block styles | Crystal 1,500, Peppermint 2,500, Pebble 3,000, Aurora 4,000 |
| Backdrops | Snowy Pines 1,200, Winter Dusk 2,000, Northern Lights 3,000 |
Rewards are added to the wallet as pending coins the moment they are won and saved; the result popup collects them. If the app closes in between, the coins are collected on the next start. The daily gift and the daily ad limits follow GameClock, which never goes back (see Save data).
Themes
The Themes popup has two tabs: Blocks (block styles) and Backdrops. Each style or backdrop is an asset in BlockBloom/Config, listed in the Game Config (Themes).
| Asset | Fields |
|---|---|
Block style (Skin_*.asset) | Id (kept in the save), name key, price, 7 block pictures (128 × 128, in this order: rose, amber, gold, mint, blue, violet, and glacier, the one drawn under ice), a preview picture. |
Backdrop (Backdrop_*.asset) | Id, name key, price, a full-screen picture (1080 × 1920 or larger, cropped to fill the screen), a preview, and the ink colour of the texts drawn straight on it (score, level number). |
Adding a block style
- Draw 7 pictures of 128 × 128 (see Reskinning) and a 256 × 256 preview, and put them in a new folder
Art/Blocks/mystyle. - Assets → Create → Block Bloom → Block Style in
Config. Set a new id (for examplemystyle; never change it after release), a name key, a price, the 7 pictures and the preview. - Add the name to
strings.csv:skin_mystyle,My Style,Mon style,... - Drag the asset into Game Config → Themes → Skins. It appears in the Themes popup.
A backdrop works the same way (Create → Block Bloom → Backdrop, list Backdrops). To give a style with a purchase, put its id in the product's Unlock Skin (the Winter Pack gives aurora).
Reskinning
Replace a picture by overwriting its file with yours, same name, same size (or larger in the same proportions). The import settings (sprite type, borders, compression) stay, because they are in the .meta file next to it. After replacing many files, Tools → Block Bloom → Reset Art Import Settings applies the project's import rules again. All sizes are in pixels.
9-slice borders keep the corners of a picture sharp while its middle stretches. They are listed in the order of Unity's Sprite Editor: L (left) · R (right) · T (top) · B (bottom). Draw your picture with the same border widths, so the corners fit in them.
Picture (in Art/) | Size | 9-slice L · R · T · B | Where it shows |
|---|---|---|---|
Blocks/<style>/block_<style>_0 … _6 | 128 × 128 | none | The blocks: 7 colours per style (rose, amber, gold, mint, blue, violet, glacier) |
Blocks/Previews/skin_* | 256 × 256 | none | Block style cards in Themes |
Board/board_panel | 256 × 256 | 72 · 72 · 72 · 72 | The frame around the board (see the board picture: grid 34 inside the frame, 38 at the bottom) |
Board/cell, cell_glow | 128 × 128 | none | An empty cell; the glow of a line about to clear |
Board/gem_1, gem_2, gem_3 | 128 × 128 | none | Blue crystal, rose crystal, amber star (drawn on a block) |
Board/ice_1, ice_2, ice_cracks | 128 × 128 | none | Ice, thick ice, and the cracks after a first clear |
Backdrops/bg_* | 1080 × 1920 | none | Full-screen backgrounds (previews: Backdrops/Previews, 256 × 256) |
UI/panel_popup | 320 × 320 | 100 · 100 · 100 · 100 | Every popup |
UI/ribbon_blue, ribbon_rose | 640 × 180 | 170 · 170 · 60 · 60 | Popup titles |
UI/Buttons/btn_blue, _green, _gold, _rose, _violet, _white | 256 × 200 | 96 · 96 · 70 · 90 | Wide buttons (the bottom border is larger: it holds the button's 3D edge) |
UI/Buttons/btn_tile | 200 × 216 | 60 · 60 · 60 · 60 | Square tiles (home menu, boosters) |
UI/Buttons/btn_circle_* | 200 × 216 | none | Round buttons (pause, close, back) |
UI/card, card_selected | 160 × 160 | 56 · 56 · 56 · 56 | Shop and theme cards |
UI/inset | 128 × 128 | 44 · 44 · 44 · 44 | Sunken boxes in popups |
UI/pill_dark, seg_pill, seg_track | 200 × 100 / 200 × 100 / 200 × 110 | 48 / 46 / 50 on every side | Coin and score pills; the tab switch in Themes |
UI/bar_track, bar_fill, bar_fill_green | 200 × 64 | 30 · 30 · 30 · 30 | Progress bars (loading screen) |
UI/rounded_white | 64 × 64 | 24 · 24 · 24 · 24 | Plain rounded boxes, tinted in code |
UI/Map/node_current, node_done, node_locked | 200 × 216 | none | Level buttons on the map |
UI/home_hero | 900 × 520 | none | The floating blocks on the home screen |
UI/star_full, star_empty, glow, rays | 256 × 256 (rays 512) | none | Stars and the light behind rewards |
UI/toggle_on, toggle_off, toggle_knob | 160 × 88, knob 96 × 96 | none | Switches in Settings |
Icons/ic_* | 256 × 256 | none | Icons (coin, boosters, gift, settings…) |
Icons/Glyphs/gl_* | 128 × 128 | none | White symbols on round buttons |
Fx/fx_* | 64 × 64 | none | Particles: sparkle, flake, shard, bloom |
UI/AppIcon/app_icon (+ _round, _foreground, _background) | 1024 × 1024 | none | The app icon (Player Settings → Icon); the Android adaptive icon uses the foreground and background layers |
Sounds are WAV files in Audio/ (sfx_* effects, music_menu and music_game loops): replace them with files of the same name, any length. Fonts: Rubik in Fonts/; to change it, create TextMesh Pro font assets from your font (Window → TextMeshPro → Font Asset Creator, dynamic) and assign them in the TMP Settings and the text components, or replace the font file and keep the font asset.
Colours of texts and ribbons are set in the prefabs (Prefabs/UI); the block colour order (0 rose … 6 glacier) is the same in every style and in level layouts.
Localization
The game comes in English, French, Spanish, Portuguese (Brazil), German, Italian, Dutch, Indonesian, Turkish and Russian. On first launch it follows the phone's language; for any other phone language it starts in English. The player can change it at any time with the language button in Settings (each tap shows the next language), and the choice is kept.
All texts are in BlockBloom/Resources/Localization/strings.csv: one row per text, the key first, then one column per language.
key,en,fr,es,pt,de,it,nl,id,tr,ru
level_n,Level {0},Niveau {0},Nivel {0},Nível {0},Level {0},Livello {0},Level {0},Level {0},Seviye {0},Уровень {0}
- Edit the file in any spreadsheet program and save it as CSV (UTF-8).
{0}is replaced by a number or a name;\nin a text is a line break. - The fonts are dynamic TextMesh Pro font assets: any letter that exists in Rubik (Latin alphabets including Central European and Turkish letters, and Cyrillic) appears automatically. For other alphabets add a fallback font to the font assets.
- In the scene, texts use the Localized Text component with a key. In code, use
Loc.Get("key")orLoc.Format("key", value).
Adding a language, step by step (example: Polish, code pl)
- strings.csv: add a column at the end of the first line, then fill it in every row.
language_nameis the name shown on the Settings button. An empty cell shows the English text.key,en,fr,es,pt,de,it,nl,id,tr,ru,pl language_name,English,Français,Español,Português,Deutsch,Italiano,Nederlands,Bahasa Indonesia,Türkçe,Русский,Polski classic,Classic,Classique,Clásico,Clássico,Klassisch,Classica,Klassiek,Klasik,Klasik,Классика,Klasyczny level_n,Level {0},Niveau {0},Nivel {0},Nível {0},Level {0},Livello {0},Level {0},Level {0},Seviye {0},Уровень {0},Poziom {0} - Scripts/Runtime/Framework/Loc.cs, so phones set to that language start in it:
public static string FromSystemLanguage() { switch (Application.systemLanguage) { ... case SystemLanguage.Russian: return "ru"; case SystemLanguage.Polish: return "pl"; // new default: return "en"; } } - Same file, for numbers written the local way (1 250 instead of 1,250):
static CultureInfo MakeCulture(string language) { ... return language switch { ... "ru" => new CultureInfo("ru-RU"), "pl" => new CultureInfo("pl-PL"), // new _ => new CultureInfo("en-US"), }; ... }C# version:
language switch { ... }is a switch expression, a C# 8 feature (Unity 2020.2 or newer). This project needs Unity 6000.0 or newer anyway (see Requirements), and it compiles it with no setting to change. On an older toolchain, write it as a classicswitchstatement with lines such ascase "pl": return new CultureInfo("pl-PL");. - Try it: press Play, open Settings and tap the language button until it shows Polski. Check every screen: long words may need shorter texts.
com.nosuchstudio.rtltmpro), and install it with Unity's Package Manager, following the instructions on its own page. Then add a font that covers the alphabet as a fallback font, and check every screen in that language, as texts that mix numbers and words may need small changes.
Support: RTL Text Mesh Pro, like any third-party package, is not part of Block Bloom. It is made and supported by its own author, so installing, setting up or fixing it is outside the support for this item.
Ads (AdMob)
Block Bloom ships with no AdMob ids at all: the App IDs and the ad unit ids in the Game Config are empty, and there is no test-id fallback anywhere in the code. Fill them in from your own AdMob account:
| Game Config → Ads field | Put in |
|---|---|
| Admob Android App Id | the App ID of your Android app in AdMob (it contains a ~) |
| Admob Ios App Id | the App ID of your iOS app in AdMob |
| Admob Android → Banner, Interstitial, Rewarded | the three ad unit ids of your Android app (they contain a /) |
| Admob Ios → Banner, Interstitial, Rewarded | the three ad unit ids of your iOS app |
If you skip it: your published game shows no ads and earns nothing; an empty id simply means “no ad of that kind”. If an id comes from another app, or the Android and iOS ids are swapped, no ads show either. The App IDs are copied into Google's plugin settings automatically. No ads wanted? Untick Enable Ads instead.
Reminders: the Setup Checklist shows TO DO, and every release build warns, while ids are missing.
Two things are not included: Google's Mobile Ads Unity plugin (with its UMP consent SDK and External Dependency Manager), which you import from Google, and any AdMob id. AdMob is a third-party service: you need your own (free) AdMob account, and Google's terms and payment thresholds apply.
Ads go through AdsManager, which talks to a provider. The AdMob provider (Scripts/AdMob, its own assembly) compiles only when Google's plugin is in the project: the BLOCKBLOOM_ADMOB define is added automatically when the plugin is found, and removed again if you delete it, so the project always compiles with or without it. Without the plugin (or without ids), the editor and development builds show on-screen placeholder ads so you can test every ad flow; release builds show none.
Placements
| Format | When (Game Config → Ads) |
|---|---|
| Banner | At the bottom of the screens when Use Banner is on; the layout moves up and the board shrinks a little to make room. |
| Interstitial | After a finished game (Classic or a level), before the result, from the 3rd finished game (Interstitial From Game), every 2 games (Interstitial Every), never within 90 seconds of another full-screen ad (Interstitial Cooldown). Never in the middle of a game. |
| Rewarded | Free coins in the shop, a booster in the booster popup, the second chance (thaw or more moves), double coins after a won level. These buttons work only once an ad has loaded. |
No Ads (or the Winter Pack) removes banners and interstitials; rewarded ads stay, because the player chooses to watch them.
Setting up AdMob
- Download the Google Mobile Ads Unity plugin (a
.unitypackage, version 11.x) from Google's AdMob documentation for Unity (search for Google Mobile Ads Unity plugin) and import it (Assets → Import Package → Custom Package). Accept the External Dependency Manager prompts. Block Bloom notices the plugin and switches its AdMob code on. - For Android, run Assets → External Dependency Manager → Android Resolver → Force Resolve and enable the Gradle templates it asks for.
- In your AdMob account, add an app for Android and one for iOS, and create a banner, an interstitial and a rewarded ad unit for each.
- Put your App IDs and ad unit ids in the Game Config (Ads). The App IDs are copied into Google's settings automatically (or with Tools → Block Bloom → Ads → Apply AdMob Setup Now). Google's plugin stops a build that has no App ID.
- Tools → Block Bloom → Ads → AdMob Status shows whether the plugin is found, whether the App IDs are set and how many ad unit ids there are.
Testing ads
Never click your own live ads: Google can limit or close an account for invalid traffic. While you develop, use test ads, as Google explains on its Enable test ads page for Unity (search for AdMob Unity test ads):
- Test devices (recommended): run your build on your phone once and look in the device log (Reading the logs) for the line from Google's plugin that gives your device id. Add that id to Test Device Ids in the Game Config: your phone then gets test ads from your own ad units, everyone else real ads. Emulators and the iOS simulator always get test ads.
- Google's sample ad units: the same page lists sample ids that always show test ads. If you paste them in to try something, put your own back before you publish: a build with sample ids earns nothing.
Consent (GDPR) and privacy options
The AdMob provider uses Google's User Messaging Platform: it asks for consent where required (EEA, UK, Switzerland) before loading ads, using the messages you publish in AdMob (Privacy & messaging). When the consent message applies, Settings shows a Privacy options button so players can change their choice. If the request fails (no internet), it is tried again when the app comes back.
The demo APK
The demo APK on zaviro.net shows the same on-screen placeholder ads as the editor: it was built without Google's plugin and without any AdMob id, so it contains no ad network at all.
Turning ads off
Untick Enable Ads in the Game Config to run without ads while keeping the plugin. To remove AdMob completely, delete the folders Google's plugin added (GoogleMobileAds, ExternalDependencyManager and its files in Plugins): Block Bloom switches its AdMob code off by itself and compiles without any Google code.
In-app purchases
- a web address (HTTPS endpoint) running on a host of your choice, which the game calls after each purchase;
- server code that asks Google and Apple whether the purchase is real: a Google Cloud service account with access to the Google Play Developer API, and an App Store Connect API key for the App Store Server API;
- a small database to remember used purchases, and the hosting cost.
| Step | Needed? |
|---|---|
| Install Unity IAP | Nothing to do. Unity's Package Manager installs it when the project opens (the download contains no Unity IAP files). |
| 1. Put your own product ids in the Game Config (Products) | Required to sell. |
| 2. Create the same products in Google Play Console and App Store Connect | Required to sell. |
| 3. Test with a license tester (Google Play) or a Sandbox account (App Store) | Required before you publish. |
| Google Play receipt check: paste your licensing key into the Receipt Validation Obfuscator | Required for Android release builds: they refuse every purchase until you do it. Development builds accept unchecked purchases with a warning, so you can test the shop first. |
| Checking purchases on your own server | Optional. Only if you build and host a server; the game sells without one. |
Your own store accounts are required and the stores charge fees (see possible costs).
Purchases use Unity IAP 5 (com.unity.purchasing 5.4.4), with Google Play Billing on Android and StoreKit 2 on iOS. Unity IAP is not copied into the project: Packages/manifest.json lists it, and Unity's Package Manager downloads it from Unity's own registry (packages.unity.com) when the project opens, under your Unity license. The download contains no Unity IAP files or binaries: there is no DLL, .so, .aar, .jar or .framework file of any kind in the archive, and no Library or PackageCache folder; Unity IAP reaches your project only through the Package Manager. The BLOCKBLOOM_IAP define is set automatically for any 5.x version (asmdef version defines). If another major version is installed, the store code is switched off and a Console warning and a build warning tell you right away; purchases are never switched off silently.
On Android the store is chosen by Assets/Resources/BillingMode.json, set to Google Play. Keep this file: without it Unity IAP uses its fake test store on Android.
| Product (default id) | Kind | Gives |
|---|---|---|
| com.yourcompany.blockbloom.coins_small / coins_medium / coins_large | Consumable | 1,000 / 6,000 / 15,000 coins |
| com.yourcompany.blockbloom.noads | Non-consumable | No banner or interstitial ads |
| com.yourcompany.blockbloom.winter_pack | Non-consumable | 5,000 coins, No Ads, 5 of each booster and the Aurora block style |
The ids in the table above (com.yourcompany.blockbloom.…) are placeholders. A store only sells products you have created there with exactly the same id, so every id must be replaced with your own, in three places that must match letter for letter:
| Where | What to do |
|---|---|
| 1. Unity: Game Config → Purchases → Products (5 entries) | Replace each Product Id, for example com.mystudio.myblocks.coins_small. Keep each entry's Kind (Coins, No Ads, Bundle) and contents. |
| 2. Google Play Console → your app → Monetize with Play → Products → One-time products (In-app products in older consoles) | Create one product per id, with the same id. Coin packs are used up by the game; No Ads and the Winter Pack are bought once. |
| 3. App Store Connect → your app → Monetization → In-App Purchases | Create one per id (Product ID = the same id): the coin packs as Consumable, No Ads and the Winter Pack as Non-Consumable. |
If you skip it, or one id doesn't match: the store doesn't know that product, the shop can't show its price and every purchase of it fails, so you sell nothing. The ids live only in the Game Config: no script needs changing.
Reminders: the Setup Checklist shows TO DO, and every build warns, while an id still starts with com.yourcompany.
- Put your own ids in the Game Config (above).
- Create the same products in Google Play Console and App Store Connect (above). Google only returns products once a build is uploaded to a testing track.
- Add your Google account as a license tester to buy without being charged; on iOS use a Sandbox account.
Each purchase is validated, delivered, saved, and only then confirmed to the store. Delivered transaction ids are kept in the save, so a purchase is never delivered twice. One-time products come back by themselves after a reinstall; payments confirmed later show “Purchase pending” and are delivered when they go through. On iOS, Settings and the shop have a Restore purchases button, as Apple requires.
Testing: with Test Purchases ticked, purchases are simulated in the editor and in development builds while the store has no products yet. Release builds always use the real store.
Receipt validation
Checking purchases on a server is optional: see Do I need my own server? at the top of this section.
- Google Play: in Google Play Console copy your app's licensing key (Monetize with Play → Monetization setup). In Unity choose Services → In-App Purchasing → Receipt Validation Obfuscator…, paste it and press Obfuscate.
IAPManagerfinds the generatedGooglePlayTangleand checks every receipt, and that it is for the product bought. Until you do, release builds refuse every Android purchase: it stays unconfirmed, so Google refunds it, and the log says[IAP] … no GooglePlayTangle key to check the receipt, purchase refused. Development builds accept it with a warning, and a build warning tells you while the key is missing. - App Store: nothing to set up. Unity IAP 5 uses StoreKit 2, which signs and verifies every App Store transaction itself, so iOS needs no key (Apple receipt obfuscation and StoreKit 1 were removed in Unity IAP 5, which is why the game needs iOS 15 or newer). A transaction that arrives without its signed data is refused in release builds.
- Require Receipt Validation (Game Config → Purchases, on by default): any receipt that is missing, damaged, for another product or can't be checked is refused in release builds. Untick it only if your own server checks every purchase (see the optional part below).
IAPManager.ServerValidation is the hook for this: when it is set, every purchase waits for your answer before it is delivered and confirmed. Parse JSON with a JSON parser (for example JsonUtility with small classes), never by searching the text.Optional: checking purchases on your own server
This example handles the cases a real server meets: a timeout, a few retries with growing pauses, error answers, and an answer that can't be read.
https://your-server.example/verify-purchase in the code below is not a real server; it only shows where your own server's address goes. The example is not part of the project: nothing is sent anywhere unless you add this script yourself, and even then it switches itself off (and logs an error) while the address is still the placeholder, so purchases keep working with the on-device checks. It starts checking purchases only once you put in the address of your own working server. Add it only when your server is running, and never publish it with the placeholder.using System;
using System.Collections;
using UnityEngine;
using UnityEngine.Networking;
using BlockBloom;
// Put it on the GameController object (or any object that lives for the whole game).
public class PurchaseServerCheck : MonoBehaviour
{
// PLACEHOLDER, not a real server: replace it with your own server's address.
// While it is still this placeholder, the script switches itself off (see Awake).
const string Url = "https://your-server.example/verify-purchase";
const int Attempts = 3; // tries before giving up for this session
const int TimeoutSeconds = 10; // per try
[Serializable] class Answer { public bool valid; public string reason; }
void Awake()
{
if (Url.Contains("your-server.example"))
{
Debug.LogError("[IAP] PurchaseServerCheck is OFF: replace the placeholder Url with your own server's address.");
return; // purchases keep working with the on-device checks only
}
IAPManager.ServerValidation = (receipt, done) => StartCoroutine(Verify(receipt, done));
}
IEnumerator Verify(PurchaseReceipt receipt, Action<bool> done)
{
// receipt: productId, transactionId, store, receipt, googleOrderId, appleSignedTransaction
byte[] body = System.Text.Encoding.UTF8.GetBytes(JsonUtility.ToJson(receipt));
for (int attempt = 1; attempt <= Attempts; attempt++)
{
using (var req = new UnityWebRequest(Url, "POST"))
{
req.uploadHandler = new UploadHandlerRaw(body);
req.downloadHandler = new DownloadHandlerBuffer();
req.SetRequestHeader("Content-Type", "application/json");
req.timeout = TimeoutSeconds;
yield return req.SendWebRequest();
if (req.result == UnityWebRequest.Result.Success)
{
Answer answer = null;
try { answer = JsonUtility.FromJson<Answer>(req.downloadHandler.text); }
catch (Exception e) { Debug.LogWarning("[IAP] Unreadable answer: " + e.Message); }
if (answer != null)
{
if (!answer.valid) Debug.LogWarning("[IAP] Refused by the server: " + answer.reason);
done(answer.valid); // the server decided: deliver (true) or refuse (false)
yield break;
}
// unreadable answer: try again like a network error
}
else
{
long code = req.responseCode; // 0 = no answer at all (offline, timeout)
bool worthRetrying = req.result == UnityWebRequest.Result.ConnectionError
|| code == 0 || code == 408 || code == 429 || code >= 500;
Debug.LogWarning($"[IAP] Purchase check failed ({attempt}/{Attempts}): {code} {req.error}");
if (!worthRetrying) break; // other 4xx: the request itself is wrong
}
}
if (attempt < Attempts) yield return new WaitForSecondsRealtime(2f * attempt); // 2 s, then 4 s
}
done(false); // no answer for now: not delivered, the purchase stays pending (see below)
}
}
What happens in each case:
- Placeholder address still in the code: the script logs an error at start and does nothing else; purchases work exactly as without it.
- Valid (
done(true)): the item is delivered, saved, and only then confirmed to the store. - Refused by your server (
done(false)withvalid: false): nothing is delivered and the purchase is never confirmed. The player sees “The purchase didn't go through”. Google Play refunds purchases that are never confirmed after 3 days. - Server unreachable or failing (after the retries): the player sees the same message, but the purchase stays pending. Unity IAP gives unconfirmed purchases back to the game at the next start, so
IAPManagerasks your server again, and the player gets the item as soon as your server answers. - No answer at all (your code never calls
done): afterIAPManager.ServerValidationTimeoutseconds (20 by default) the player gets the shop back with “Your purchase is waiting for approval”. The purchase stays unconfirmed: a latedone(true)still delivers it, and otherwise it comes back at the next start and your server is asked again. The same happens if your code throws an exception. Keep your own retries (above) shorter than this limit, or raise it:IAPManager.ServerValidationTimeout = 40f;in the sameAwake. - Call
doneexactly once per purchase, on the main thread (a coroutine is). Only the first answer counts; a second one is logged and ignored.
Your server checks the purchase with the store (Google Play Developer API purchases.products.get with the purchase token from the Google Play receipt; App Store Server API with the transaction id). It answers {"valid": true} only for a real purchase of that product that was not used before, and {"valid": false, "reason": "..."} otherwise.
Save data & cheating
SaveManager.Secret (Scripts/Runtime/Services/SaveManager.cs). You can also type your own long random text there. Never change it after release.Coins, boosters, best score, stars, themes, purchases, settings and the Classic game in progress are saved in PlayerPrefs (key blockbloom_save) as JSON signed with HMAC-SHA256 and lightly scrambled.
What the default secret means for your game
The secret is the key that signs and scrambles the save. Whoever knows it can open a save, change it and sign it again, and the game accepts the result as genuine.
| Published with the default secret | Published with your own secret | |
|---|---|---|
| Who knows the secret | Everyone who has this package: the default secret is the same in every copy sold. | Only you. It is in your project and, compiled, inside your app. |
| Can a save be forged? | Yes, easily. A few lines of code are enough to open a save, change it and sign it again. One person could share a ready-made save editor that works on every game published with the default secret. | Only by someone with reverse-engineering skills who digs the secret out of your app's files, and only for your game. Editors made for the default secret don't work. |
- What a forged save can give a cheater: any number of coins and boosters, every level open with three stars, every block style and backdrop, the No Ads and Winter Pack benefits without paying, and any best score.
- What it can't do: it only changes the game on the cheater's own phone. Block Bloom has no online play, leaderboards or shared economy, so other players are not affected. It can't create store purchases (your sales reports stay correct), can't reach your store, AdMob or other accounts, and the save holds no personal data.
- What it costs you: mainly money. Players who forge a save don't buy coins, No Ads or the Winter Pack.
- How hard it is to reach the save: it is in the app's private storage on the phone. Reading or replacing it needs a rooted Android phone, a jailbroken iPhone or backup-editing tools, which most players don't have. For those who do, the default secret makes the rest trivial.
- Limits of any secret: it protects the saved file only. Cheat apps that change numbers in memory while the game runs (on rooted or jailbroken phones) work whatever the secret is, as in almost every offline game, and a skilled person can dig any secret out of an app. Your own secret stops casual cheating and shared tools; if your economy must resist determined cheaters (for example, if you add online leaderboards), keep the coins and scores on a server.
In short: your own secret costs one click, as long as you set it before your first release. Changing it after release makes every existing save unreadable (see below).
When a save is rejected
A save that was edited, damaged, or signed with another secret is rejected at start:
- Nothing is deleted. The rejected save is kept on the phone as a backup (
blockbloom_save_broken; a second one goes toblockbloom_save_broken_2), and a new game starts. - The player is told once, on the home screen: an A fresh start message (“Your saved progress could not be read, so a new game started. A copy is kept on this phone: contact support if you need it back.”) with a Support button that opens an e-mail to your Support Email with the subject “<game name> <version> support - save reset”.
- Automatic restore: at every start, if the normal save fails but a backup is valid with the current secret, the backup is restored by itself (and the player sees “Your earlier progress was found and restored.”). So if an update changed the secret by mistake, putting the previous secret back in the next update gives every player their progress back.
- Purchases: No Ads and the Winter Pack come back from the store by themselves on Android, and with Restore purchases on iOS. Coins bought were used up when they were delivered, so the store doesn't give them back: for players who write to support, look up the order in Google Play Console or App Store Connect and decide (a refund, for example).
Daily gifts and the device clock
The daily gift and the daily ad limits follow GameClock, which never goes back: setting the clock back gives nothing, and a gift is free only on a later calendar day than the last one.
Building
Android
- File → Build Profiles → Android → Switch Platform.
- Player Settings: company and product name, package name (replace
com.yourcompany.blockbloom), version and bundle version code. The project uses IL2CPP with ARM64 and ARMv7. - Publishing Settings: create your own keystore (keep it and its passwords safe: every update must be signed with it).
- Tick Build App Bundle (Google Play) and build the .aab for Google Play.
API levels: minimum API level 24 (Android 7.0) and target API level 36 (Android 16), both set in Edit → Project Settings → Player → Android → Other Settings (Minimum API Level and Target API Level). The target is set to API 36 explicitly, not to “Automatic (highest installed)”, so every build targets API 36 whatever Android SDKs are installed on your computer. If Unity asks to update the Android SDK when you build, accept. When Google Play later requires a newer target, raise it in the same field.
iOS
- Switch to iOS, set the bundle id and team in Player Settings, build, and open the generated Xcode project (the
.xcworkspaceonce Google's plugin is in). - Add the In-App Purchase capability, set signing, and archive.
- If you use AdMob, follow Google's iOS steps (SKAdNetwork ids, the plugin's iOS settings) and see App Tracking Transparency.
Minimum iOS version: 15.0 (Player Settings → iOS → Other Settings → Target minimum iOS Version). Unity IAP 5 uses StoreKit 2, which needs iOS 15; keep it at 15.0 or higher.
Trying it in the iOS Simulator
- Player Settings → iOS → Other Settings → Target SDK: Simulator SDK. The project already sets Simulator Architecture: Universal, so the build runs on Apple silicon and Intel Macs.
- Build, open the Xcode project, choose an iPhone simulator as the destination and press Run.
- Set Target SDK back to Device SDK before you build for a real iPhone or the App Store.
In the simulator, Unity's player always runs as a development build, so it shows the on-screen placeholder ads of the editor. Release builds for real iPhones never show them.
com.yourcompany ids, missing ad ids, placeholder links, a missing receipt key and the IAP version. Tools → Block Bloom → Setup Checklist shows the same items at any time.App Tracking Transparency (iOS)
On iOS, personalised ads need Apple's tracking permission. With AdMob, publish an IDFA explainer message in AdMob (Privacy & messaging): Google's consent flow then shows Apple's prompt after its own message. Add a NSUserTrackingUsageDescription text in the plugin's iOS settings (Google Mobile Ads settings) so Xcode has it in Info.plist.
Checking the prompt on a real iPhone (during development)
Apple's prompt (Allow “Block Bloom” to track your activity across other companies' apps and websites?) appears only when everything below is in place, and only once per installation. Check it on a physical iPhone before you submit: App Review rejects apps that declare tracking when it can't find the prompt.
- AdMob: in Privacy & messaging, create and publish an IDFA explainer message for your iOS app. The message belongs to your AdMob app, so test with your own iOS App ID in the Game Config.
- Prompt text: fill in the tracking usage description in the Google Mobile Ads settings (above). After building, open the Xcode project and check the Info tab (Info.plist) for
NSUserTrackingUsageDescriptionwith your text. Also check thatAppTrackingTransparency.frameworkis linked (UnityFramework target → Build Phases → Link Binary With Libraries). Xcode usually links it by itself; if it's missing, add it with +. - The iPhone: iOS 15 or newer (the game's minimum). In Settings → Privacy & Security → Tracking (Settings → Privacy on iOS 15), turn on Allow Apps to Request to Track. If it is off, or greyed out by a child or managed Apple Account or a profile, iOS never shows the prompt and answers “not allowed” by itself.
- Run it: build for iOS in Unity, open the Xcode project, connect the iPhone, select it as the destination and press Run. On the first start you see Google's consent message (in the EEA, the UK and Switzerland), then your IDFA explainer, then Apple's prompt with your text. Ads are requested only after these messages.
- Check the result: after you answer, Settings → Privacy & Security → Tracking lists Block Bloom with a switch (on = allowed), and Settings → Block Bloom shows Allow Tracking. The Xcode console shows the game's
[Ads]lines (Reading the logs). Ads load with either answer; after Ask App Not to Track they are simply not personalised. - See it again: delete the app from the iPhone and press Run in Xcode again. The answer belongs to the installation, so reinstalling is the only way to get the prompt back.
The prompt doesn't appear? Check in this order: the Tracking setting on the phone (step 3); that the app wasn't answered before (step 6); that the IDFA explainer message is published and belongs to the App ID in your Game Config (step 1); that Info.plist has the usage description (step 2); and the Xcode console for [Ads] consent warnings.
If you don't want tracking at all, don't publish an IDFA explainer message, leave out the usage description and answer that the app doesn't track in App Store Connect (App Privacy). No prompt is shown, and AdMob serves ads that are not personalised.
Publishing checklist
Tools → Block Bloom → Setup Checklist checks items 1, 3, 4, 5 and 6 for you, live.
- New package name / bundle id, product name, company, version.
- Your own app icon and (if you like) art, sounds and texts.
- Your own save secret (Tools → Block Bloom → Generate New Save Secret), set once and kept in every update.
- Your AdMob App IDs and ad unit ids, consent messages published in AdMob (or ads switched off).
- Your product ids, created in both stores; Google Play receipt validation set up. If you added the server check (In-app purchases), your own server's address in it, never the placeholder.
- Your privacy policy, terms, store links and support e-mail in the Game Config (they ship as
example.com/yourcompanyplaceholders, and a build warning lists any that are left). - Your own keystore (Android) and signing team (iOS).
- The stores' questionnaires: content rating (the game has no violence, chat or gambling; coins are bought with real money and spent in the game only), Data safety / App Privacy (AdMob collects advertising data; the game itself sends nothing anywhere), and target audience.
- Run Tools → Block Bloom → Tests → Run Full Tests, then test on a phone: a Classic game, a few levels, a purchase (license tester / Sandbox), a rewarded ad, the daily gift, and Continue after closing the app in a Classic game.
Code overview
| Class | Role |
|---|---|
Core.Session, Core.Board, Core.Dealer, Core.Scoring | The rules (see Rules engine). |
Core.Bot | The computer player of the Level Editor and the tests. |
GameScreen | Runs a game: starts Classic or a level, takes the dropped pieces, plays the effects, boosters, second chance, saves the Classic game, the end of the game. |
BoardView, TrayView, PieceView, GoalPanel, UIBurst | The board and its animations, the tray and dragging, one piece, the goals of a level, confetti and sparkles. |
HomeScreen, LevelsScreen, LoadingScreen | The other screens: home, the level map, the loading screen. |
UIManager, UIScreen, UIPopup | Screens, popups, toasts and the Android back button. |
SaveManager, PlayerData, Wallet, Progress | The signed save, coins (and pending coins), boosters, stars and level progress. |
AdsManager, AdMobProvider | Ads and consent. |
IAPManager | Products, purchases, delivery, restore, receipt checks. |
Loc, LocalizedText | Texts and languages. |
GameConfig, LevelPack, BlockSkin, Backdrop, Themes | Settings, levels, and the current block style and backdrop. |
LevelEditorWindow, SetupChecklist, BlockBloomTests, ProjectChecks (Editor) | The Level Editor, the Setup Checklist, the tests, and the build checks. |
Troubleshooting
Common questions (no code needed)
| What you see | Why, and what to do |
|---|---|
| Progress (coins, stars, themes) is gone after closing the game |
|
| A player says the game showed “A fresh start” and started over |
|
| The daily gift doesn't appear |
|
| A block style or backdrop was bought but doesn't show |
|
| Coins that were bought didn't arrive |
|
| A booster button is grey with a lock | The player has none of that booster left and hasn't reached its unlock level yet (Turn level 5, Pick 9, Refresh 13: Game Config → Boosters → Unlock Level). New players start with a few of each, and a player who owns some (for example from the Winter Pack) can always use them. |
| A level seems impossible | Every level was won by the computer player many times, and the hardest ones are meant to take a few tries. Boosters and the “more moves” offer help. To make a level easier, open it in the Level Editor, give it more moves or a gentler dealer, and Test with the bot. |
| No sound or music |
|
| The Continue button is missing | The Classic button reads Continue only while a Classic game is unfinished: leave a game from the pause menu (Menu) and it is kept. When the game ends, the button reads Classic again. If the app was closed while the game offered its second chance, the button still reads Continue: it brings that moment back, so the score and the coins of that game still count. Levels always start fresh. |
| “Ad” placeholders show in the editor | The editor and development builds show on-screen placeholder ads until Google's plugin is imported and your own AdMob ids are in the Game Config (see Ads). Release builds never show placeholders. |
| The game is in English, but the phone is set to another language |
|
| Ads don't show up, even after setting up AdMob |
|
Reading the logs
Several answers here say “look at the log”. The game writes its messages with a tag in front, so they are easy to find: [Block Bloom], [Game], [Save], [Wallet], [IAP], [Ads].
| Where | How |
|---|---|
| Unity editor | Window → General → Console while you press Play. The full log file: in the Console's ⋮ menu, Open Editor Log. |
| Android phone, with Android Studio |
|
| Android phone, with the command line | With USB debugging on (above) and Google's platform-tools installed (they come with the Android SDK that Unity installs):adb logcat -s Unity shows the game's messages live; adb logcat -d -s Unity > log.txt saves them to a file you can send. |
| Android, inside Unity | Install the Android Logcat package (com.unity.mobile.android-logcat, Package Manager → Unity Registry), then Window → Analysis → Android Logcat. |
| iPhone / iPad, from Xcode | Run the game from Xcode (Product → Run): the messages appear in the debug area at the bottom (View → Debug Area → Activate Console). |
| iPhone / iPad, any build | Connect the device to a Mac. In Xcode: Window → Devices and Simulators, select the device, Open Console (or use the Mac's Console app with the device selected), start the game and type Block Bloom or [IAP] in the search box. |
A Development Build (File → Build Profiles) shows more detail, including the full error stack; release builds still log warnings and errors.
For developers
| Problem | Solution |
|---|---|
| Pink or missing letters after changing fonts | Create the TextMesh Pro font asset again (dynamic, so it adds the letters of every language by itself), or add a fallback font. |
| No ads on a device | Check that Google's plugin is imported (Tools → Block Bloom → Ads → AdMob Status), the ids are set, consent was given, and look at the device log. New ad units can take a while to serve ads. |
| No products in the shop on Android | Upload a build to a testing track of Google Play, create the products with the same ids, and install the app from the testing link. |
| “The store is not available right now” | The game couldn't reach the store (no internet when the game started, or Google Play's billing restarting during a Play Store update). It connects again by itself: after a short pause that grows up to a minute, when the app comes back to the front and whenever the shop opens. A purchase that went through while the store was away is delivered once it is back. If it never connects, look for [IAP] lines in the device log. |
| “no GooglePlayTangle key to check the receipt, purchase refused” | Paste your licensing key into the Receipt Validation Obfuscator (In-app purchases → Receipt validation). Until then, release builds refuse Android purchases. |
| Errors after importing another plugin next to Google Mobile Ads: duplicate files, “Multiple precompiled assemblies with the same name”, Gradle “Duplicate class” errors, CocoaPods errors |
|
| Many players lost progress after an update | The save secret changed between versions. Put the previous SaveManager.Secret back and publish an update: the rejected saves were kept on the phones and are restored by themselves at the next start (see Save data). |
| A test fails after changing the rules or a level | The dialog and the Console say which check failed. A level reported as “not won by the careful player” needs more moves or an easier dealer (Level Editor → Test with the bot). |
| Images look blurry or have wrong borders after replacing them | Tools → Block Bloom → Reset Art Import Settings. |
Updating to a new version
Each update is a complete project with a changelog that lists what changed. Your own content lives in a few places, so you can bring it into a new version without losing anything:
- Back up first. Commit your project to version control or copy its folder.
- Open the new version as a separate project and copy your own content into it. Always copy a file together with its
.metafile: Unity keeps the links between assets through them. - Your settings:
BlockBloom/Resources/GameConfig.asset(rules, economy, ad ids, products, links). If the changelog lists new Game Config fields, they appear with their default values; set them as you like. - Your levels:
BlockBloom/Levels/Levels.asset, if you edited levels. - Your look: the theme assets in
Config, and the images, sounds and fonts you replaced. Keep the file names, or assign your files again. - Your texts: take the new
strings.csvand paste your own translations and edited rows into it, so the keys added by the update are kept. - Your code changes: compare your scripts with the new ones (a diff or merge tool helps) and apply your changes again.
Safe to overwrite: anything you never changed (scripts, prefabs, the scene, the documentation). If you edited prefabs or the scene, apply your edits again on the new ones.
What needs merging by hand
| Asset type | Files | If you changed them |
|---|---|---|
| Scene | Scenes/Main.unity: the canvas with an instance of every screen and popup prefab | Rarely conflicts, as the screens themselves live in their prefabs. Keep the new scene and redo your changes in it; for big changes, Unity's Smart Merge (UnityYAMLMerge) can merge the two versions with Git. |
| Prefabs | Prefabs/UI/*: every screen, popup and card | The files most likely to conflict, because an update changes screens and popups. Take the new prefab and redo your edits; prefab files merge like the scene. |
| Scripts | Scripts/**/*.cs | Merge with a diff tool. Most often touched: GameConfig.cs (new settings), PlayerData.cs (new save fields), SaveManager.cs (keep your Secret line), Core/* (rules), GameScreen.cs. |
| Config assets | Resources/GameConfig.asset, Levels/Levels.asset, Config/*.asset (themes) | Keep yours. New settings from the update appear with their default value: set them in the Inspector. New levels from an update can be copied into your pack with the Level Editor's Copy, level by level, or by keeping the new pack. |
| Texts | Resources/Localization/strings.csv | Start from the new file and copy your edited rows in, so the new keys are kept. |
| Art, audio, fonts | Art, Audio, Fonts | Keep yours (same file names). New files from the update can be added next to them. |
| Project settings | ProjectSettings/ (package name, icons, signing), Packages/manifest.json | Keep yours; add the packages the changelog asks for. |
A safe workflow with Git
The download is a plain folder, not a Git repository: start one yourself (git init in the project folder, then commit everything) before you change anything.
- Keep the untouched package on a branch of its own (for example
vendor), and your game onmain. - For an update, check out
vendor, replace its files with the new version, and commit. - Merge
vendorintomain. Git then shows exactly which files both you and the update changed: only those need the steps above.
SaveManager.Secret in every version (copy your secret into the new SaveManager.cs): a different secret makes every existing save look edited, and players start over (their old save is kept on the phone and comes back if the next update has the previous secret again). Updates only add save fields, which start with their default values, so existing players keep their coins, boosters, stars, purchases and settings. Never rename a block style id, backdrop id or product id after release, and add new levels at the end of the pack.Before publishing the update, raise the version and the build number in Player Settings, then play once from a previous version's save to check that progress is kept.
Credits & licenses
The game, its code, the blocks, crystals, ice, board, buttons, panels, icons, backdrops, the logo, the app icon, the sounds, the music and the 300 levels are original work created by the author for Block Bloom: the pictures are drawn and the sounds synthesized by the author's own code, and the levels made by the author's level generator (see AI disclosure and where the levels come from). Some general-purpose framework scripts (UI manager, tweening, save, ads and in-app purchase managers) are shared with the author's other products on CodeCanyon. No stock images, emoji sets, clip art or sound libraries are used. The following third-party assets are included; their licenses allow commercial use:
| Asset | License |
|---|---|
| Rubik font (Black and ExtraBold), by the Rubik Project Authors | SIL Open Font License 1.1 (BlockBloom/ThirdPartyLicenses/Rubik - OFL.txt) |
| TextMesh Pro essential resources | Unity Companion License (part of Unity's uGUI package) |
| Unity IAP | Unity's package terms (installed from the Package Manager, not included in the download) |
The Google Mobile Ads plugin is not included; if you add it, Google's license (Apache 2.0) and terms apply.
AI disclosure
An AI tool was used for the code and the text, not for the art, the sounds or the levels. Block Bloom was written with the help of an AI coding assistant (Claude by Anthropic). It was used, under the author's direction, to write and review the C# code (the game, the rules engine and the computer player, the editor tools and tests, the level generator, and the code that draws the art and synthesizes the sounds), the game's texts and their translations into the ten languages, and the text of this documentation. Everything was tested in Unity and on an Android phone.
- Art: no AI image generator (such as Midjourney, DALL·E or Stable Diffusion) was used. The blocks, crystals, ice, board, backdrops, buttons, icons, logo and app icon are drawn by the author's own drawing code (a development tool, not part of the download). The font (Rubik) is a third-party asset under its own license (see Credits & licenses).
- Sounds and music: no AI audio or music generator was used. Every sound effect and the music are synthesized by the author's own audio code (also a development tool).
- Levels: made by the author's level generator from fixed seeds and tuned with the game's own computer player (how); not by an AI model.
- Computer player: it doesn't use machine learning. It is a hand-written set of rules that rates every placement on the board.
- Screenshots: the screenshots of the game are real captures from an Android phone.
Changelog & support
Version 1.0.0 - First release
Classic mode, 300 levels in 15 chapters (score, crystals, ice), Level Editor with a computer player, three boosters, second chance, daily gift, 5 block styles and 4 backdrops, AdMob-ready ads layer, Unity IAP 5 purchases, 10 languages, included tests.
Questions or problems? Open a ticket on our support desk, zaviro.net/support, or leave a comment on the item page, and include your Unity version and the platform you build for.
What support covers: Block Bloom's own code, scenes, prefabs, levels, art, sounds and documentation, including how the game works with Unity IAP and the Google Mobile Ads plugin. Third-party packages themselves (Unity IAP, the Google Mobile Ads plugin and its External Dependency Manager, RTL Text Mesh Pro, or anything else you add) are made and supported by their own authors; problems inside them are outside the support for this item.