A Block-Shooting Puzzle Game — Unity Template
Version 1.0 | Unity 6+
This asset is designed as a template and starting point for your own game development. It provides the core systems, architecture, and tools needed to build a block-shooting puzzle game. You are expected to customize, extend, and modify this template to create your unique game. This is not a complete, ready-to-publish game — it's a foundation for developers to build upon.
Block Blaster Jam is a cannon-based puzzle game where players load colored cannons into slots and shoot projectiles at a grid of color-matched blocks. Destroy all blocks and obstacles to clear the level. The game features dynamic grid sizes, stacked floor blocks, 2×2 obstacles, a queue-based cannon system, a built-in level editor, an automatic level generator, a booster system, and full AdMob ad integration.
Tap queue cannons to load them into firing slots. Shoot colored projectiles at matching blocks on the grid. Strategic slot management is key to winning.
Full Unity Editor window for designing levels with visual grid painting — place colored blocks, set floor stacks, configure cannons, obstacles, and locked slots.
Batch-generate hundreds of levels with configurable difficulty curves, grid sizes, color pools, floor stacking, hidden cannons, and obstacle densities.
Three in-game boosters — Shuffle, Bomb, and Unlock — with tutorial popups, usage tracking, and progressive unlocking.
Ragendom Monetization module with banner, interstitial, and rewarded video ads. Includes a Dummy provider for editor testing.
Ships with 50 pre-generated levels with a progressive difficulty curve, ready to play out of the box. Generate hundreds more with one click.
Assets/Block Blaster Jam/Scenes/GameNew.unityOnce in Play mode, tap a cannon in the queue area to load it into an empty slot. Then tap a block on the grid that matches the cannon's color to fire a projectile. When all blocks and obstacles are destroyed, the level is cleared and the next level loads automatically. Use arrow keys to skip between levels during testing.
Each level is a grid of colored blocks with cannons in a queue below. The goal is to destroy every block and obstacle on the grid by shooting color-matched projectiles from cannons.
The game supports ten block colors:
| BlockType | Color | Approximate Hex |
|---|---|---|
Red (1) |
Red | #FA5258 |
Yellow (2) |
Yellow | #FCD626 |
Blue (3) |
Blue | #3D8CF5 |
Green (4) |
Green | #4DD966 |
Orange (5) |
Orange | #FF9926 |
Purple (6) |
Purple | #9E52F0 |
Pink (7) |
Pink | #FF78A8 |
Cyan (8) |
Cyan | #2ED6E0 |
Lime (9) |
Lime | #ADF533 |
Magenta (10) |
Magenta | #E640B8 |
When a projectile hits a matching block, the block shrinks to zero scale over 0.2 seconds while spawning colored explosion particles. Neighboring blocks receive a shake effect for visual feedback. Stacked-floor blocks lose one floor per hit, with each floor being removed individually before the block dies.
All scripts use the HypercasualGameEngine namespace.
| Script | Description |
|---|---|
BlastGameManager |
Main game controller. Loads level data, manages game state (Playing/Won/Lost), handles input (tap-to-fire), checks win/lose conditions, and coordinates all managers. Attached to the root game object. |
BlastBoardManager |
Manages the block grid with dynamic rows/columns. Handles gravity (blocks fall to fill gaps), reserve blocks spawning from the top, obstacle grid tracking, block accessibility checks, and bomb-radius destruction. |
BlastSlotManager |
Controls cannon firing slots and the queue system. Handles loading cannons from queue to slots, locked slot mechanics, slot unlock animations, cannon input, and Fisher-Yates queue shuffling. |
BlastBlock |
Individual block entity. Manages block color, floor stacking (1–5 floors), HP, damage/death, gravity fall animation with landing bounce, neighbor shake effects, and bomb-targeting flash. |
BlastCannon |
Cannon entity with ammo count, color type, firing logic, and hidden/reveal mechanics. Shows "?" when hidden until moved to the front queue row. |
BlastProjectile |
Projectile flight from cannon to target block or obstacle. Handles arc trajectory, impact detection, and damage dealing. |
BlastObstacle |
2×2 merged gray block with HP. Occupies 4 grid cells, displays HP text, takes damage from any cannon color as fallback, and has its own gravity system. |
BoosterManager |
Manages three boosters (Shuffle, Bomb, Unlock) with progressive unlocking, use counts, tutorial popups, and button UI states (locked/active/depleted). |
LevelData |
Serializable data structures for levels: grid data, floor data, reserves, queue columns, cannon info, obstacles, locked slots, and booster counts. Includes BlockType enum and BlastColors palette. |
LevelManager |
Static class that loads level JSONs from Resources/Levels/, tracks the current level index via PlayerPrefs, and provides methods to advance, go back, or jump to any level. |
SoundManager |
Singleton audio system with named methods: PlayBlockDestroy(), PlayObstacleHit(), PlayFloorRemove(), PlayCannonFire(), PlayCannonPlace(), PlayCannonDead(), PlayLevelWin(), PlayLevelFail(), PlayBoosterUse(), PlaySlotUnlock(), PlayButtonClick(). |
LoseWinPanelManager |
Manages the Win and Lose UI panels. Auto-finds child panels by name. Supports auto-loading the next level after a configurable delay on win. |
| Script | Description |
|---|---|
BlastMeshHelper |
Static utility that loads the smooth-cube FBX mesh from Resources, caches it, and provides CreateMeshObject() for procedural block creation. |
BlastParticleManager |
Manages colored explosion and effect particles spawned on block/obstacle destruction. |
CameraSwitcher |
Switches the camera between multiple parent transforms (for multi-game setups). Persists the selected index via PlayerPrefs. |
DeveloperModeButton |
Toggles a developer settings panel on click. Auto-finds a child named DeveloperSettingsPanel if no reference is assigned. |
DeveloperSettingsController |
Developer panel with buttons for level navigation (next, previous, reload, trigger win/lose) and ad testing (show/hide banner, show/request interstitial, show/request rewarded). |
| Script | Description |
|---|---|
LevelEditorWindow |
Unity Editor window (Tools > Blast Level Editor) for visually designing levels with a grid painter. |
LevelGenerator |
Unity Editor window (Tools > Blast Auto Level Generator) for batch-generating levels with configurable parameters. |
BlockBlasterJamWelcomePopup |
Welcome popup that appears once per editor session with Asset Store review link and cross-promotion. Has a "don't show again" toggle. |
In the Unity menu bar, go to Tools > Blast Level Editor. This opens a dedicated Editor window — no need to enter Play mode.
| Setting | Effect |
|---|---|
| Paint Type (1–10) | Select which BlockType color to paint on the grid |
| Paint Floors (1–5) | Set the floor stack height for painted blocks |
| Click Cell | Place a block with the selected color and floor count, or click an existing block to clear it |
All levels are stored as individual JSON files in Assets/Resources/Levels/ with the naming convention Level_1.json, Level_2.json, etc. They are loaded at runtime via Resources.LoadAll.
The Automatic Level Generator is an Editor tool that batch-generates levels procedurally with a configurable difficulty curve that interpolates from easy to hard across the batch.
In the Unity menu bar, go to Tools > Blast Auto Level Generator. This opens a settings window where you can configure all parameters before generating.
| Setting | Description |
|---|---|
| Levels to Generate | How many new level files to create. New levels are appended after existing ones (never overwrites). |
| Grid Cols / Rows (Min & Max) | Range for randomizing the grid dimensions (default: 5–9 cols, 5–12 rows). |
| Color Pool | 10 toggleable colors (R, Y, B, G, O, P, Pk, C, L, M). Select which colors can appear. Colors per level: 2–5. |
| Empty Cell % (easy → hard) | Percentage of grid cells left empty. Easy: 5% → Hard: 0%. More empty = easier. |
| Reserves per Column (easy → hard) | Reserve blocks that spawn from above. Easy: 6 → Hard: 2. |
| Ammo per Cannon (easy → hard) | Shots each cannon gets. Easy: 25 → Hard: 8. |
| Slot Count (easy → hard) | Number of cannon slots available. Easy: 2 → Hard: 5. |
| Locked Slots (easy → hard) | Slots that start locked. Easy: 0 → Hard: 2. |
| Floor Stack Chance (easy → hard) | Probability of multi-floor blocks. Easy: 0% → Hard: 40%. Floor range: 1–3. |
| Hidden Cannon Chance (easy → hard) | Probability that queue cannons are hidden. Easy: 0% → Hard: 50%. |
| Obstacle Count (easy → hard) | Number of 2×2 obstacles. Easy: 0 → Hard: 3. HP range: 3–10. |
| Booster Uses (easy → hard) | Uses per booster per level. Easy: 2 → Hard: 1. |
| Queue Columns / Cannons per Column | Queue layout: 3–4 columns, 2–4 cannons each. |
Resources/Levels/The generator never overwrites existing level files. It always starts numbering from the next available index (e.g., if Level_50 exists, new levels start from Level_51). Use the "Delete All Levels" button (with confirmation) to clear all levels before regenerating.
The game includes three booster abilities that players can activate during gameplay. Each booster has a configurable number of uses per level and an optional tutorial popup that appears on first use. Boosters are progressively unlocked as the player advances through levels.
| Booster | Unlock | Effect | Activation |
|---|---|---|---|
| Shuffle | Level 1 | Randomizes all cannons across queue columns using Fisher-Yates shuffle. Useful when cannon colors don't match accessible blocks. | Tap the shuffle button. Instant effect. |
| Bomb | Level 2 | Destroys all blocks within a 0.8-unit radius of the tapped cell. Ignores color matching. Great for clearing clusters. | Tap the bomb button to enter targeting mode (button highlights blue). Then tap a cell on the grid. Press Escape to cancel. |
| Unlock | Level 3 | Unlocks the next locked cannon slot (left to right). Opens up more firing positions. | Tap the unlock button. Instant effect with unlock animation. Only visible if the level has locked slots. |
Press the U key during gameplay to unlock all boosters immediately. This is useful for testing.
This project includes a Ragendom Monetization module for integrating AdMob ads (banners, interstitials, and rewarded videos). The ad system supports both real AdMob ads on device and a built-in Dummy ad provider for testing in the Unity Editor.
Full setup and configuration instructions for the ad system are provided in a separate documentation file located at:
That documentation covers AdMob app IDs, ad unit IDs, UMP/GDPR consent, test devices, and all monetization settings.
If you prefer a video walkthrough over reading documentation, watch the full ads setup tutorial here:
▶ Watch Ads Setup Tutorial on YouTube
The ad system consists of the following key components in the scene:
MonetizationInitModule component. It initializes the ad system on Awake using the assigned MonetizationSettings asset.Assets/RagendomAds/Modules/Monetization/MonetizationSettings.asset. Contains all ad provider configuration, timing, and consent settings.Dummy provider for editor testing.| Ad Type | Description |
|---|---|
| Banner | A small ad strip displayed at the top or bottom of the screen. Show and hide at any time. |
| Interstitial | A full-screen ad. Must be requested (loaded) first, then shown when ready. Supports cooldown timers and conditions. |
| Rewarded Video | A full-screen video ad that grants a reward on completion. Must be requested first, then shown. Always available regardless of no-ads purchases. |
By default, the ad system uses the Dummy provider, which displays test UI overlays in the Editor (a green "TEST BANNER" bar, dark "TEST INTERSTITIAL" overlay, and blue "TEST REWARDED VIDEO" overlay). This lets you verify the ad flow without needing a real device or AdMob account.
The Developer Settings Panel (accessible via the gear icon in-game) includes ad control buttons for testing: Show/Hide Banner, Show/Request Interstitial, and Show/Request Rewarded Video.
Open LevelData.cs and add entries to both the BlockType enum and the color arrays in BlastColors:
New colors are automatically available in the Level Editor and Auto Level Generator.
The grid, blocks, and board are rendered procedurally in BlastBoardManager.cs. Key settings:
blockSize — Size of each block in world units (default: 0.28)blockSpacing — Gap between blocks (default: 0)fallSpeed — Gravity fall speed (default: 8 units/sec)BlastGameManagerBlock rendering uses smooth-cube meshes loaded from BlastMeshHelper. You can customize:
cube-smooth-3.fbx in Resources/ with your own meshBlastMeshHelper.GetDefaultMaterial() creates a URP/Lit material with 0.759 smoothnessBlastBlock.Init()BlastBlock.Die()New boosters can be added by following the existing pattern in BoosterManager.cs:
GameHUD_Panel/BottomHolder/Booster-Button-N)OnXxxClicked() handler methodLevelData and update both editorsEach level is a JSON file with the following structure (simplified):
Grid data is flattened row-major: index = row * cols + col. gridData[0] is the top-left cell. BlockType values 1–10 correspond to the enum (Red=1 through Magenta=10), 0 = empty.
| Issue | Solution |
|---|---|
| No levels load / blank grid | Ensure JSON level files exist in Assets/Resources/Levels/ with the naming convention Level_1.json, Level_2.json, etc. Use the Auto Level Generator to create levels. |
| Blocks appear as plain cubes (no smooth mesh) | Ensure cube-smooth-3.fbx exists in Assets/Resources/. The fallback is a primitive cube. |
| Locked slots show no lock icon | Ensure lock-icon.png exists in Assets/Resources/. |
| Purple/missing materials on WebGL | The game uses URP/Lit shaders. Ensure the OutlineOnly shader and URP pipeline assets are included in your build settings. |
| Dev panel buttons don't respond | If you added a Canvas component to the panel (e.g., for sorting order), you must also add a GraphicRaycaster component to the same object. |
| Level Editor shows empty grid | Click "Reload from Disk" in the Level Editor, or ensure the Resources/Levels/ folder exists. |
Resources/Levels/ folder regularlyIf you get stuck or have any issues, feel free to reach out to us at ragendom@gmail.com. We are happy to help!