2026-01-09 03:14:45 +08:00
2025-12-15 02:34:59 +08:00
2026-01-07 22:52:00 +08:00
2025-12-14 09:23:38 +08:00
2025-12-14 09:23:38 +08:00
2025-12-18 01:44:50 +08:00
2026-01-09 03:14:45 +08:00

Unity Match-3: VContainer Edition

A modern Match-3 puzzle game built in Unity, focusing on clean architecture, dependency injection, and data-driven design. This project serves as a template for scalable mobile game development.

🏗 Architecture & Patterns

Dependency Injection with VContainer

This project utilizes VContainer for high-performance dependency injection. By using a LifetimeScope, we decouple our game logic (Grid Management, Scoring, Input) from the Unity Lifecycle, making the codebase more modular and easier to test.

Data-Driven Gameplay

All balancing and configuration parameters are centralized in a ScriptableObject called GameVariables. This allows designers to tweak the game feel in real-time without touching code.

Adjustable Parameters include:

  • Debug Mode
  • Tile prefabs
    • Spawnable object
    • Spawnable explosion prefab animation
    • Sprite
    • Score value
  • Grid Dimensions
  • Audio SFX
  • Special Tiles
  • Animation speed and delays

🎮 Features

  • Grid Logic: Efficient recursive algorithms for detecting matches and handling "gravity" (falling tiles).
  • Decoupled Systems: UI, Sound, and Gameplay systems communicate via injected interfaces.
  • Scriptable Configuration: Easily swap between "Easy" and "Hard" mode by swapping the GameVariables asset.

🛠 Tech Stack

  • Engine: Unity 2022.3+
  • DI Framework: VContainer
  • UniTask: C# (Task-based async for animations)
  • Data: ScriptableObjects

🚀 Getting Started

Prerequisites

  • Unity Hub & Unity 2022.3 LTS or newer.
  • VContainer package.
  • UniTask package.

Installation

  1. Open the project in Unity.
  2. Navigate to Assets/Scenes/ and open Scene_Submission
  3. Locate GameVariables asset in Assets to modify gameplay values.
Description
Match3 Game made with Unity and VContainer
Readme 4.7 MiB
Languages
C# 38.9%
ShaderLab 30.6%
GLSL 21.5%
HLSL 9%