A Unity-based grid puzzle game featuring block-matching mechanics with pseudo gravity physics. Players click on connected blocks of the same color to remove them, earning points while managing limited moves.
This project was developed as part of a Unity Game Developer technical assessment. For complete test specifications and requirements, please refer to the Senior Unity Game Developer Test.pdf document.
- Grid-Based Puzzle Gameplay: Interactive grid system with customizable dimensions
- Block Matching Mechanics: Click connected blocks of the same color to remove them
- Gravity System: Pseudo-gravity physics that makes blocks fall to fill empty spaces
- Score & Move Tracking: Score points based on blocks removed and manage limited moves
- Auto-Refill: Automatically generates new random blocks to fill empty grid positions
- Input Locking: Prevents player interactions during animations and turn resolution
The main game controller responsible for:
- Grid initialization with random colored blocks
- Block positioning and world-space calculations
- Click event handling and input management
- Flood-fill algorithm for finding connected blocks
- Turn resolution (block removal, gravity, refill)
- Input locking during animations
Manages game state including:
- Score calculation and tracking
- Move counting and limits
- Game-over conditions
Handles player inputs using Unity's new Input System:
- Block click detection
- Input action mapping
- Player interaction events
- Component-Based Design: Modular scripts following Unity best practices
- New Input System: Utilizes Unity's modern Input System for better cross-platform support
- Singleton Pattern: Used for managers to ensure single instances
- Coroutine-Based Turn Resolution: Smooth gameplay flow
- HashSet Collections: Efficient block collection for connected block detection
Project-Blocky/
├── Assets/
│ ├── Scripts/
│ │ ├── GridManager.cs # Main grid logic and game controller
│ │ ├── Block.cs # Individual block component
│ │ ├── ScoreAndMoveManager.cs # Score and move tracking
│ │ ├── InputManager.cs # Input handling
│ │ ├── Constants.cs # Game configuration constants
│ │ └── PlayerActions.cs # Generated Input System actions
│ ├── Prefabs/ # Block and UI prefabs
│ ├── Sprites/ # Visual assets
│ ├── Scenes/ # Game scenes
│ └── Settings/ # URP and project settings
├── ProjectSettings/ # Unity project configuration
└── Packages/ # Unity packages and dependencies
- Unity Engine
- C#
- Universal Render Pipeline (URP)
- New Input System
- TextMesh Pro
- Unity 6.0 LTS or later
- Visual Studio or any other C# IDE
- Clone the repository
- Open the project folder in Unity Hub
- Let Unity import all assets and packages
- Open the main scene from
Assets/Scenes/ - Press Play to start the game
- Click on any block in the grid
- All connected blocks of the same color will be removed
- Blocks above will fall down to fill empty spaces
- New blocks will spawn to fill the grid
- Score points based on the number of blocks removed
- Continue until you run out of moves
Game parameters can be modified in Constants.cs:
- Grid dimensions (rows/columns)
- Cell size and spacing
- Animation timings
Please refer to project documentation for licensing information.
Developed by Cesar Mory Jorahua as part of a Unity Game Developer technical assessment.