> For the complete documentation index, see [llms.txt](https://university-of-games.gitbook.io/welcome/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://university-of-games.gitbook.io/welcome/products/complete-game-tutorials/cannon-crunch.md).

# Cannon Crunch

Cannon Crunch — complete Unity 6 one-touch arcade game with shop, six-stage difficulty, lives, medals and monetization hooks. Docs by University of Games.

![Cannon Crunch](https://assetstorev1-prd-cdn.unity3d.com/key-image/197f00d7-a7c9-42af-b72b-6fc32f59b2e6.webp)

![Cannon Crunch gameplay](https://assetstorev1-prd-cdn.unity3d.com/package-screenshot/a961128a-06c3-4bcb-8238-d00810c5dc16.webp)

**Cannon Crunch** is a complete Unity game tutorial and finished one-touch arcade game — not a code snippet. Tap to fire the cannon, hit the target, dodge the rotating block. Everything a released casual or hyper-casual mobile game needs around that loop is already wired: main menu, pause, settings, shop, game over, persistence, progression and monetization hooks.

{% hint style="info" %}
**Who is this for?** Indie developers shipping a casual / hyper-casual mobile title, teams learning service-based Unity architecture, or anyone who wants a production-ready tap-to-shoot loop to reskin and extend — built on [Cannon Pack](https://university-of-games.gitbook.io/welcome/products/graphics-pack/cannon-pack) art.
{% endhint %}

{% hint style="success" %}
**Requirements:** Unity **6** (tested on `6000.5.4f1`) · **uGUI** only · no third-party packages · render-pipeline agnostic · portrait
{% endhint %}

{% hint style="info" %}
**Unity Asset Store:** [Cannon Crunch — Complete Game Tutorial](https://assetstore.unity.com/packages/templates/tutorials/cannon-crunch-complete-game-tutorial-217947) · Publisher: [University of Games](https://assetstore.unity.com/publishers/25633) · Package version **2.0.0**
{% endhint %}

***

## In plain language — what do you get?

A namespaced runtime assembly (`CannonPack.CannonCrunch`) with a service layer free of MonoBehaviour coupling and a full playable demo:

1. **One-touch arcade loop** — tap to fire, score on the target, lose a life on the rotating block; fire-rate cooldown is frame-rate independent.
2. **Six-stage difficulty** — editable `DifficultyProfile` asset: block speed, flip interval, speed waver and hits-per-reversal, interpolated between stages.
3. **Progression & economy** — lives, medals (bronze / silver / gold), best score, spendable lifetime points, 16-skin shop with purchase and equip.
4. **Rewards & ads hooks** — 12-hour free-lives claim, double-points bonus for rewarded video, interstitial spot every N games.
5. **Full screen flow** — splash, main menu, pause, settings, shop, game over — all wired and persisted.
6. **Clean architecture** — plain C# services (`Score`, `Audio`, `Skins`, `BonusLives`, `Background`, `Difficulty`), `IProgressRepository`, XML docs, editor skin-library tools.

***

## Quick start

{% stepper %}
{% step %}

### Import

Everything lives under `Assets/Cannon Crunch/`.
{% endstep %}

{% step %}

### Build Settings

Add both scenes: index 0 = `Scenes/SplashScreen.unity`, index 1 = `Scenes/Game.unity`.
{% endstep %}

{% step %}

### Play

Open `SplashScreen.unity` for the full flow, or `Game.unity` for the menu. Tap to shoot.
{% endstep %}

{% step %}

### First-run checklist

Sync the skin library, assign the difficulty profile, fix the known button bindings — details on [Getting Started & Recipes](https://university-of-games.gitbook.io/welcome/products/complete-game-tutorials/cannon-crunch/getting-started-and-recipes).
{% endstep %}
{% endstepper %}

Full walkthroughs and recipes: [Getting Started & Recipes](https://university-of-games.gitbook.io/welcome/products/complete-game-tutorials/cannon-crunch/getting-started-and-recipes).

***

## Features

| Area         | Highlights                                                       |
| ------------ | ---------------------------------------------------------------- |
| Gameplay     | One-touch fire, swept hit detection, six-stage difficulty curve  |
| Economy      | Medals, spendable points, 16-skin shop, free-lives cooldown      |
| Screens      | Splash, menu, pause, settings, shop, game over                   |
| Monetization | Interstitial every N games, rewarded double-points / lives hooks |
| Code         | Service layer, asmdefs, XML docs, editor sync tools              |
| Platforms    | Editor, standalone, mobile (portrait); mouse and touch           |

***

## Documentation map

| Page                                                                                                                                                   | Contents                                                                                  |
| ------------------------------------------------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------- |
| [Getting Started & Recipes](https://university-of-games.gitbook.io/welcome/products/complete-game-tutorials/cannon-crunch/getting-started-and-recipes) | Build Settings, hierarchy, bindings cheat sheet, shop buy flow, difficulty & ads recipes  |
| [Your Own Assets](https://university-of-games.gitbook.io/welcome/products/complete-game-tutorials/cannon-crunch/your-own-assets)                       | Reskin cannons, UI, HUD, splash, medals, audio                                            |
| [Services API](https://university-of-games.gitbook.io/welcome/products/complete-game-tutorials/cannon-crunch/services-api)                             | `ScoreService`, skins, difficulty, `HitOutcome`, data types, `IProgressRepository`        |
| [Gameplay & UI API](https://university-of-games.gitbook.io/welcome/products/complete-game-tutorials/cannon-crunch/gameplay-and-ui-api)                 | `UIManager`, `GameManager`, `CannonController`, `Bullet`, `Block`, `Target`, screen views |
| [Customization & Extending](https://university-of-games.gitbook.io/welcome/products/complete-game-tutorials/cannon-crunch/customization-and-extending) | Difficulty design, physics, Mathfx, stripping, troubleshooting                            |

***

## Architecture

```mermaid
flowchart LR
    Tap[Cannon button] --> Fire[CannonController]
    Fire --> Bullet[Bullet sweep]
    Bullet -->|hit| Target[Target]
    Bullet -->|hit| Block[Block]
    Target --> Score[ScoreService]
    Target --> Diff[DifficultyDirector]
    Block --> Lives[GameManager.LoseLife]
    UI[UIManager] --> Score
    UI --> Skins[CannonSkinService]
    UI --> Audio[AudioService]
    UI --> Bonus[BonusLivesService]
    Score --> Repo[IProgressRepository]
    Skins --> Repo
```

### Design principles

1. **Composition root** — `UIManager` builds services in `Awake` and presents their state; views orchestrate cross-service actions.
2. **Services without MonoBehaviour** — score, audio, skins, bonus lives, background and difficulty are plain C# — unit-testable and swappable.
3. **One hit contract** — `IBulletHittable` + `Bullet.TryConsume` so trigger and sweep paths never double-score.
4. **Data-driven pacing & catalog** — `DifficultyProfile` and `CannonSkinLibrary` ScriptableObjects; replace without editing code.
5. **Persistence boundary** — `IProgressRepository` (default: PlayerPrefs); swap for cloud/file in one line.

### Assemblies

| Property        | Value                                                                                           |
| --------------- | ----------------------------------------------------------------------------------------------- |
| Runtime         | `CannonPack.CannonCrunch`                                                                       |
| Editor          | `CannonPack.CannonCrunch.Editor`                                                                |
| Root namespaces | `CannonPack.Core` · `.Data` · `.Services` · `.Gameplay` · `.UI` · `.Utilities` · `.EditorTools` |
| References      | Unity uGUI only                                                                                 |

***

## Package layout

```
Assets/Cannon Crunch/
├── README.md / CHANGELOG.txt
├── Animations/
├── Audio/
├── Data/                CannonSkinLibrary, DifficultyProfile
├── Prefabs/             Dot.prefab
├── Scenes/              SplashScreen.unity, Game.unity
├── Scripts/
│   ├── Core/            UIManager, GameManager, SceneSingleton…
│   ├── Data/            ScriptableObjects and models
│   ├── Services/        Logic with no MonoBehaviour dependency
│   ├── Gameplay/        Cannon, Bullet, Block, Target
│   ├── UI/              One component per full-screen view
│   ├── Utilities/       Mathfx
│   └── Editor/          Skin library sync tools
└── Sprites/             AppIcons, Cannons, Gameplay, SplashScreen, UI
```

***

## What's included

| Category    | Contents                                      |
| ----------- | --------------------------------------------- |
| Scenes      | `SplashScreen.unity`, `Game.unity`            |
| Scripts     | 38 C# files across 7 namespaces               |
| Assemblies  | Runtime + editor-only                         |
| Data assets | Skin library, difficulty profile              |
| Prefabs     | `Dot.prefab` (projectile)                     |
| Art         | 16 cannons, UI/HUD sprites, medals, app icons |
| Audio       | Music, cannon, game over, button click        |
| Docs        | README, CHANGELOG + this GitBook              |

***

## Version history

{% updates format="short" %}
{% update date="2026-07-30" tags="major" %}

## 2.0.0 — Architecture rebuild

Service layer, asmdefs, `DifficultyProfile` six-stage curve, `CannonSkinLibrary`, `IProgressRepository`, swept hit detection, frame-rate-independent fire rate, canvas-relative despawn, explicit saves after purchases/rewards. Gameplay feel unchanged; serialized field and button method names preserved for upgrades.
{% endupdate %}
{% endupdates %}

***

## Related products

* [Cannon Pack](https://university-of-games.gitbook.io/welcome/products/graphics-pack/cannon-pack) — 2D cannon graphics used by this game
* [Complete Game Tutorials](https://university-of-games.gitbook.io/welcome/products/complete-game-tutorials) — more ready-made Unity projects from University of Games

***

## Support

Questions about the package? Reach us via the [Unity Asset Store publisher page](https://assetstore.unity.com/publishers/25633) or the channels listed under [Community](https://university-of-games.gitbook.io/welcome/community).
