I developed a similar mechanic project that is live in the Karaca mobile app. You can explore it here:
👉 Mobile Karaca App - Bubble Blast
Welcome to the Color Block-Based Game System! This project is a visually engaging, performance-optimized, and dynamic game system built with Unity. 🧱✨
👉 Match Villians Clone - Playable Demo
- Open the
GameScenelocated inAssets/_Scenes/GameScene. - Navigate to the Board object to adjust:
- Animation durations or speeds.
- Go to the Game Manager object to configure:
- Number of rows and columns for the board.
- The number of different block colors.
- Hit the Play button in Unity to start the game! 🚀
The game provides a playing field of colored blocks, where players interact to eliminate groups of the same color while earning points. 🎯
- Unity Game Engine: Version 6000.0.32f1
- C#
- Third-Party Libraries:
- DOTween (for animations)
- Cysharp UniTask (for asynchronous operations)
-
Blocks and Cells 🧱
- Each block has a unique color and is placed in cells.
- Positions dynamically update with visual effects.
-
Flood Fill Mechanism 🌊
- Groups blocks of the same color for elimination.
-
Pooling Management 🔄
- Optimizes memory usage with an
ObjectPool<T>structure.
- Optimizes memory usage with an
-
Animations 🎥
- Smooth animations for movement, scaling, and effects.
-
Board Layout 🎲
- Dynamically arranged cells and blocks with automatic refills for empty spaces.
-
Shuffle Mechanism (With Clusters) 🔀
- Groups blocks by color and shuffles them when no moves are possible.
- Unity Profiler: Optimized CPU, GPU, and memory usage.
- Object Pooling: Efficient memory management by recycling objects.
- DOTween: Smooth and reusable animations.
- Asynchronous Operations: Improved user experience by minimizing delays.
- Classes:
Block: Manages block properties and cell interactions.BlockVisual: Adjusts visual elements.BlockAnimation: Controls movement and scaling animations.
- Act as containers for blocks.
- Utilize
FloodFillHelperto group blocks of the same color.
- Dynamically creates and arranges cells.
- Processes all interactions asynchronously.
- Refills empty cells with new blocks.
- Includes animations for clearing areas.
- Move Control:
- Detects possible moves; initiates shuffling if none exist.
- Cluster Grouping:
- Groups blocks by color using
Dictionary<BlockColor, List<Block>>.
- Groups blocks by color using
- Random Shuffling:
- Redistributes grouped blocks randomly.
- Result:
- Creates a refreshed board layout for continued gameplay.
-
Engaging User Experience 🌟
- Colorful visuals, shuffle mechanisms, and animations.
-
Performance Optimization 🚀
- Efficient resource utilization with Object Pooling and asynchronous programming.
-
Dynamic Gameplay 💫
- Prevents stagnation with a seamless shuffle process.
Feel free to explore the project and contribute! 🎮✨
