A playable ad for a hexa-sort puzzle, built in Unity and exported to HTML5 with Luna Playworks. Made as a test assignment in 3 days.
- A tutorial hand shows the move. If the player misses the drop, the hint comes back after a delay.
- The player drags a stack of hex tiles onto the board.
- Tiles of the same color jump between neighbouring stacks in a chain reaction.
- Any stack that reaches 10 tiles of one color collapses, with particles and a camera shake.
- Each new wave of the chain plays faster (the speed-up factor is configurable), so the combo feels like it accelerates.
- When the chain ends, the end card opens with a Play Now button.
- Chain-reaction resolver (
HexManager): a coroutine-driven BFS over hex neighbours. It moves top tiles of matching color, checks for completed stacks and repeats until the board settles. - Juicy animation on DOTween: tiles flip and jump along an arc, stacks collapse by scaling down, particles are tinted to the tile color and the camera shakes. All tweens are bound to their owners and killed in
OnDestroy. - Smooth drag in 3D: the pointer ray is cast onto a horizontal plane, the stack follows with lerp smoothing and snaps back if the drop misses.
- Luna integration:
Luna.Unity.LifeCycle.GameEnded()fires when the end card opens, andLuna.Unity.Playable.InstallFullGame()handles the CTA. - Level-design editor tools:
HexGridGeneratorbuilds a hex grid with neighbour links in one click.HexTileGeneratorfills a stack from a color recipe.HexValidatorauto-positions tiles, applies color materials and repairs references on any change in the editor.
Unity 2022.3 LTS · C# · Luna Playworks 7.2 · DOTween · uGUI · Particle System
Assets/_Project/Scripts/
├── GameManager.cs # game flow: tutorial → drag → chain → end card
├── DraggableHex.cs # drag & drop of the player's stack
├── HexDropTarget.cs # drop slot and placement animation
├── HexManager.cs # chain-reaction resolver, collapse, VFX
├── Hex.cs / HexTile.cs # board cell and tile data
├── TutorialManager.cs # tutorial hand with delays
├── Packshot.cs # end card + Luna CTA
└── Utils/ # editor tools: grid / tile generators, validator
Open the project in Unity 2022.3 with the Luna Playworks plugin installed, then open the main scene and press Play. To build the HTML5 playable, use the Luna Playworks window.