A 2D hyper-casual puzzle game about color matching, conveyor routing, and capacity management.
Play in Browser | Run Locally | Tests
Players dispatch color-coded collectors from waiting stacks onto a looping conveyor. Each collector removes the nearest matching block along its lane and loses one capacity per block. Collectors that finish a lap with capacity remaining enter a return queue and can be manually dispatched again.
The challenge is to clear the grid while managing limited conveyor space and avoiding a full return queue.
- Tap the front collector in a waiting column to send it onto the conveyor.
- Collectors automatically move around the waypoint loop.
- A collector consumes the nearest visible block matching its color.
- Each consumed block reduces the collector's capacity by one.
- A collector exits when its capacity reaches zero.
- A collector with capacity remaining enters the return queue after completing a lap.
- Tap a queued collector to dispatch it again when the conveyor has space.
- Clear every block to win.
- The run ends in defeat when a lap-complete collector cannot enter a full return queue.
- Four data-driven levels authored with
ScriptableObjectassets - Configurable block grids and multi-column waiting stacks
- Waypoint-based closed conveyor movement
- Perpendicular
Physics2D.RaycastNonAllocblock detection - Collector capacity, queueing, manual redispatch, and endgame rules
- Separate collector and game state machines
- New Input System support for mouse and touch input
- UGUI menus, HUD, tutorial, settings, victory, and defeat screens
- DOTween-powered collector transitions, shot recoil, and victory presentation
- Level-aware prewarmed pools for collectors and blocks
- Reusable AudioSource, projectile, particle, and celebration-effect pools
- Persistent level progression with
PlayerPrefs - Automated EditMode and PlayMode tests
| Area | Technology |
|---|---|
| Engine | Unity 2022.3.62f3 LTS |
| Language | C# |
| Rendering | Universal Render Pipeline 14 |
| Gameplay | Physics2D, ScriptableObjects |
| Input | Unity New Input System 1.11.2 |
| UI | UGUI, TextMesh Pro |
| Animation | DOTween |
| Pooling | UnityEngine.Pool.ObjectPool<T> and custom reusable pools |
| Testing | NUnit, Unity Test Framework 1.1.33 |
Pointer Input
-> Physics2D tap detection
-> Waiting or Queue validation
-> CollectorFlowCoordinator
-> Conveyor waypoint movement
-> Perpendicular lane raycast
-> Matching block consumption
-> Capacity update
-> Exit, return queue, victory, or defeat
The project separates authored data, pure gameplay rules, scene systems, and presentation:
| Component | Responsibility |
|---|---|
LevelDataSO |
Grid contents, waiting collectors, layout overrides, and path reference |
GameConfigSO |
Capacity limits, movement, raycast, pooling, layout, and feedback tuning |
LevelManager |
Level selection, loading, progression, and scene application |
CollectorFlowCoordinator |
Waiting, queue, conveyor, consumption, and exit orchestration |
ConveyorPathManager |
Waypoint cache, movement, lap completion, and conveyor capacity |
GridManager |
Block spawning, lookup, consumption, and pool release |
QueueManager |
Waiting columns and return-queue ownership |
PoolManager |
Collector and block pools with level-aware prewarming |
GameManager |
Loading, playing, pause, victory, and defeat states |
GameEvents |
Gameplay notifications consumed by UI, audio, and VFX |
Pure rules such as CapacityLogic and QueueStateLogic are separated from MonoBehaviour code so they can be tested without loading a scene.
Defeat condition: The game ends when a collector completes a lap with remaining capacity but cannot enter the full return queue.
PoolManager uses Unity's ObjectPool<T> for collectors and blocks. Before applying a level, it pre-instantiates:
- One block for each non-empty grid cell
- Enough collectors for the waiting stacks, conveyor capacity, and return queue
Released entities reset their transient state, move back under persistent pool roots, and are disabled for reuse. Audio and VFX systems use their own bounded reusable pools to avoid instantiating objects for each gameplay event.
The test suite covers:
- Collector capacity and color-matching rules
- Waiting, conveyor, and return-queue capacity guards
- Deadlock-rule edge cases
- Collector facing, dispatch, queue, and shot-recoil behavior
- Tutorial pulse behavior
- Level block-count validation
- Conveyor lap completion
- 100-cycle collector/block pool stress testing
Tests are located in:
PixelFlowCloneUnity/Assets/PixelFlowClone/Tests/EditMode
PixelFlowCloneUnity/Assets/PixelFlowClone/Tests/PlayModeNUnit
To run them:
- Open the project in Unity.
- Select Window > General > Test Runner.
- Run the EditMode and PlayMode suites.
- Unity Hub
- Unity Editor
2022.3.62f3 - WebGL Build Support only if creating a WebGL build
git clone https://github.com/Kuro1726/PixelFlowClone.git- Add
PixelFlowCloneUnityas a project in Unity Hub. - Open it with Unity
2022.3.62f3. - Open
Assets/PixelFlowClone/Scenes/SCN_Bootstrap.unity. - Enter Play Mode.
The enabled build scenes are:
SCN_Bootstrap
SCN_MainMenu
SCN_Gameplay
Editor build commands are available under the PixelFlowClone menu:
- Build WebGL Smoke (P4-17) outputs to
Builds/WebGL_Smoke - Build Windows EXE (Offline) outputs to
Builds/Windows
WebGL builds must be served through a local or hosted HTTP server rather than opened directly with file://.
PixelFlowClone/
|-- PixelFlowCloneUnity/
| |-- Assets/PixelFlowClone/
| | |-- Art/
| | |-- Audio/
| | |-- Prefabs/
| | |-- Scenes/
| | |-- ScriptableObjects/
| | |-- Scripts/
| | `-- Tests/
| |-- Packages/
| `-- ProjectSettings/
`-- docs/
The WebGL version is available on itch.io:
https://kuro1726.itch.io/pixel-flow-clone
Developed as a personal Unity game-development project by Kuro1726.