This commit is contained in:
2026-06-07 20:04:33 +07:00
parent 6af1c8bf20
commit b177fc7a76
10 changed files with 693 additions and 886 deletions

View File

@@ -5,8 +5,15 @@
</component>
<component name="ChangeListManager">
<list default="true" id="d308d1cb-09fc-4331-ba20-00f7b43d1576" name="Changes" comment="">
<change beforePath="$PROJECT_DIR$/.gemini-workspace-history/active-context.md" beforeDir="false" afterPath="$PROJECT_DIR$/.gemini-workspace-history/active-context.md" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/.idea.BABA_YAGA/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/.idea.BABA_YAGA/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/BABA_YAGA_Updater/README.md" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/BABA_YAGA_Updater/sections/04_maze.md" beforeDir="false" afterPath="$PROJECT_DIR$/BABA_YAGA_Updater/sections/04_maze.md" afterDir="false" />
<change beforePath="$PROJECT_DIR$/BABA_YAGA_Updater/sections/05_networking.md" beforeDir="false" afterPath="$PROJECT_DIR$/BABA_YAGA_Updater/sections/05_networking.md" afterDir="false" />
<change beforePath="$PROJECT_DIR$/BABA_YAGA_Updater/sections/06_comeback.md" beforeDir="false" afterPath="$PROJECT_DIR$/BABA_YAGA_Updater/sections/06_comeback.md" afterDir="false" />
<change beforePath="$PROJECT_DIR$/BABA_YAGA_Updater/sections/07_roadmap.md" beforeDir="false" afterPath="$PROJECT_DIR$/BABA_YAGA_Updater/sections/07_roadmap.md" afterDir="false" />
<change beforePath="$PROJECT_DIR$/BABA_YAGA_Updater/sections/08_team_standards.md" beforeDir="false" afterPath="$PROJECT_DIR$/BABA_YAGA_Updater/sections/08_team_standards.md" afterDir="false" />
<change beforePath="$PROJECT_DIR$/BABA_YAGA_Updater/sections/09_structure.md" beforeDir="false" afterPath="$PROJECT_DIR$/BABA_YAGA_Updater/sections/09_structure.md" afterDir="false" />
<change beforePath="$PROJECT_DIR$/BABA_YAGA_Updater/sections/10_footer.md" beforeDir="false" afterPath="$PROJECT_DIR$/BABA_YAGA_Updater/sections/10_footer.md" afterDir="false" />
<change beforePath="$PROJECT_DIR$/README.md" beforeDir="false" afterPath="$PROJECT_DIR$/README.md" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
@@ -98,7 +105,7 @@
<option name="number" value="Default" />
<option name="presentableId" value="Default" />
<updated>1780826181670</updated>
<workItem from="1780826183468" duration="8401000" />
<workItem from="1780826183468" duration="10287000" />
</task>
<servers />
</component>

View File

@@ -1,578 +0,0 @@
# README Template (Source of Truth)
This file serves as the master template for the project's root README.md.
Sections are modularized in the `sections/` directory.
# ![Header](https://img.shields.io/badge/PROJECT-BABA_YAGA-black?style=for-the-badge&logo=shadow)
[![Unity 6000.3.10f1](https://img.shields.io/badge/Unity-6000.3.10f1_LTS-black?logo=unity&logoColor=white)](https://unity.com/)
[![Photon Fusion](https://img.shields.io/badge/Networking-Photon_Fusion-blue?style=flat-square)](https://www.photonengine.com/fusion)
[![License: MIT](https://img.shields.io/badge/License-MIT-lightgrey?style=flat-square)](https://opensource.org/licenses/MIT)
> **"Trong bóng tối của sự ảo giác, thị giác là công cụ mạnh mẽ nhất, nhưng sự tin tưởng lại là sai lầm chết người."**
**BABA_YAGA** là một dự án game PvP không đối xứng (Asymmetric PvP) đỉnh cao, nơi người chơi bước vào một cuộc đấu trí căng thẳng trong mê cung bóng tối. Một người nắm giữ **Ánh sáng (Seeker)**, người kia điều khiển **Cạm bẫy (Trapper)**. Đây không chỉ là trò chơi trốn tìm, đây là cuộc chiến về tâm lý và khả năng đọc tình huống.
---
## ![Docs](https://img.shields.io/badge/--Mục_lục-black?style=flat-square&logo=read-the-docs&logoColor=white)
1. [Tầm nhìn Dự án (Project Vision)](#-tầm-nhìn-dự-án-project-vision)
2. [Cơ chế Trò chơi (Core Mechanics)](#-cơ-chế-trò-chơi-core-mechanics)
3. [Kiến trúc Kỹ thuật (Technical Architecture)](#-kiến-trúc-kỹ-thuật-technical-architecture)
4. [Hệ thống Mê cung (Maze Generation)](#-hệ-thống-mê-cung-maze-generation)
5. [Đồng bộ Mạng (Networking)](#-đồng-bộ-mạng-networking)
6. [Hệ thống Comeback (Comeback System)](#-hệ-thống-comeback-đa-tầng-tiered-adaptive-system)
7. [Lộ trình Phát triển (Roadmap)](#-lộ-trình-phát-triển-roadmap)
8. [Cấu trúc Thư mục (Folder Structure)](#-cấu-trúc-thư-mục-dự-án-project-folder-structure)
9. [Hướng dẫn Cài đặt (Installation)](#-hướng-dẫn-cài-đặt-installation)
---
## <img src="https://api.iconify.design/lucide/eye.svg?color=%23E0E0E0" width="20" height="20" style="vertical-align: middle;"> Tầm nhìn Dự án (Project Vision)
![Game Concept Art](https://scove-vault.duckdns.org/files/share/vakALUeH)
Dự án hướng tới việc tạo ra một trải nghiệm **"High-Stakes Hide & Seek"**. Trọng tâm không nằm ở hành động nhanh mà ở sự **kiên nhẫn****tính toán**.
* **Minimalist UI:** Giảm thiểu UI để người chơi tập trung hoàn toàn vào môi trường.
* **Spatial Audio:** Âm thanh là "bản đồ" thứ hai.
* **Dynamic Lighting:** Ánh sáng không chỉ để nhìn, mà là công cụ để lộ diện hoặc ẩn mình.
---
## <img src="https://api.iconify.design/lucide/gamepad-2.svg?color=%23E0E0E0" width="20" height="20" style="vertical-align: middle;"> Cơ chế Trò chơi (Core Mechanics)
### <img src="https://api.iconify.design/lucide/circle-dashed.svg?color=%23E0E0E0" width="20" height="20" style="vertical-align: middle;"> Sự bất đối xứng (The Asymmetry)
| Chỉ số | Seeker (Người Tìm Đường) | Trapper (Kẻ Đặt Bẫy) |
| :--- | :--- | :--- |
| **Vai trò** | Chủ động di chuyển, tìm lối thoát. | Phòng thủ, đặt bẫy, chặn đường. |
| **Tầm nhìn** | Góc nhìn thứ nhất (FPS), đèn pin giới hạn. | Góc nhìn tổng thể (Top-down) hoặc Camera an ninh. |
| **Tốc độ** | Nhanh (Sprinting: 9.0m/s). | Chậm hơn nhưng có khả năng dịch chuyển. |
| **Công cụ** | Đèn pin, Dash, Parkour. | Bẫy kẹp, Bẫy âm thanh, Khóa cửa. |
### <img src="https://api.iconify.design/lucide/refresh-cw.svg?color=%23E0E0E0" width="20" height="20" style="vertical-align: middle;"> Vòng lặp Gameplay & Kiến trúc Hệ thống (Game Loop & System Architecture)
```mermaid
graph TD
%% Định nghĩa Style cho các nhóm
classDef initStyle fill:#e1f5fe,stroke:#01579b,stroke-width:2px,color:#01579b;
classDef seekerStyle fill:#fff3e0,stroke:#e65100,stroke-width:2px,color:#e65100;
classDef trapperStyle fill:#f3e5f5,stroke:#4a148c,stroke-width:2px,color:#4a148c;
classDef netStyle fill:#eceff1,stroke:#263238,stroke-dasharray: 5 5,color:#263238;
classDef winStyle fill:#e8f5e9,stroke:#1b5e20,stroke-width:3px,color:#1b5e20;
classDef criticalStyle fill:#ffebee,stroke:#b71c1c,stroke-width:2px,color:#b71c1c;
%% Phase 1: Initialization
subgraph Initialization ["<b>1. KHỞI TẠO HỆ THỐNG (NET-SYNC)</b>"]
A["<img src="https://api.iconify.design/lucide/rocket.svg?color=%23E0E0E0" width="20" height="20" style="vertical-align: middle;"> Bắt đầu Trận đấu"] --> B{"<img src="https://api.iconify.design/lucide/handshake.svg?color=%23E0E0E0" width="20" height="20" style="vertical-align: middle;"> Matchmaking<br/>(Photon Fusion)"}
B --> C["<img src="https://api.iconify.design/lucide/masks-theater.svg?color=%23E0E0E0" width="20" height="20" style="vertical-align: middle;"> Phân vai: Seeker vs Trapper"]
C --> D["<img src="https://api.iconify.design/lucide/puzzle.svg?color=%23E0E0E0" width="20" height="20" style="vertical-align: middle;"> Maze Generator<br/>(Prims/Wilsons)"]
D --> E["<img src="https://api.iconify.design/lucide/building-2.svg?color=%23E0E0E0" width="20" height="20" style="vertical-align: middle;"> Baking NavMesh & Colliders"]
E --> F["<img src="https://api.iconify.design/lucide/user.svg?color=%23E0E0E0" width="20" height="20" style="vertical-align: middle;"> Character Auto-Setup"]
F --> G["<img src="https://api.iconify.design/lucide/map-pin.svg?color=%23E0E0E0" width="20" height="20" style="vertical-align: middle;"> Spawn Players"]
end
class Initialization,A,B,C,D,E,F,G initStyle;
%% Phase 2: Core Loop
subgraph Active_Round ["<b>2. VÒNG LẶP CHIẾN ĐẤU (CORE LOOP)</b>"]
G --> Loop((TICK: FixedUpdateNetwork))
%% Seeker Branch
subgraph Seeker_Logic ["<b><img src="https://api.iconify.design/lucide/run.svg?color=%23E0E0E0" width="20" height="20" style="vertical-align: middle;"> SEEKER (POV 1st)</b>"]
S1["<img src="https://api.iconify.design/lucide/keyboard.svg?color=%23E0E0E0" width="20" height="20" style="vertical-align: middle;"> Input: WASD/Space"] --> S2["<img src="https://api.iconify.design/lucide/run.svg?color=%23E0E0E0" width="20" height="20" style="vertical-align: middle;"> State: Move/Dash"]
S2 --> S3{"<img src="https://api.iconify.design/lucide/zap.svg?color=%23E0E0E0" width="20" height="20" style="vertical-align: middle;"> Hành động?"}
S3 -- "Sprinting" --> S4["<img src="https://api.iconify.design/lucide/volume-2.svg?color=%23E0E0E0" width="20" height="20" style="vertical-align: middle;"> Noise Up"]
S3 -- "Sneaking" --> S5["<img src="https://api.iconify.design/lucide/volume-x.svg?color=%23E0E0E0" width="20" height="20" style="vertical-align: middle;"> Noise Down"]
S3 -- "Flashlight" --> S6["<img src="https://api.iconify.design/lucide/flashlight.svg?color=%23E0E0E0" width="20" height="20" style="vertical-align: middle;"> Lộ vị trí"]
S4 & S5 & S6 --> S_Check{"<img src="https://api.iconify.design/lucide/search.svg?color=%23E0E0E0" width="20" height="20" style="vertical-align: middle;"> Check Env"}
S_Check -- "Dẫm bẫy" --> S_Trap["<img src="https://api.iconify.design/lucide/alert-triangle.svg?color=%23E0E0E0" width="20" height="20" style="vertical-align: middle;"> Bị khống chế"]
end
%% Trapper Branch
subgraph Trapper_Logic ["<b><img src="https://api.iconify.design/lucide/settings.svg?color=%23E0E0E0" width="20" height="20" style="vertical-align: middle;"> TRAPPER (STRATEGY)</b>"]
T1["<img src="https://api.iconify.design/lucide/mouse.svg?color=%23E0E0E0" width="20" height="20" style="vertical-align: middle;"> Mouse Input"] --> T2["<img src="https://api.iconify.design/lucide/map.svg?color=%23E0E0E0" width="20" height="20" style="vertical-align: middle;"> View: Heatmap/Cams"]
T2 --> T3{"<img src="https://api.iconify.design/lucide/wrench.svg?color=%23E0E0E0" width="20" height="20" style="vertical-align: middle;"> Kỹ năng?"}
T3 -- "Đặt bẫy" --> T4["<img src="https://api.iconify.design/lucide/binary.svg?color=%23E0E0E0" width="20" height="20" style="vertical-align: middle;"> Sync Trap"]
T3 -- "Scan" --> T5["<img src="https://api.iconify.design/lucide/rss.svg?color=%23E0E0E0" width="20" height="20" style="vertical-align: middle;"> Ping Seeker"]
T3 -- "Lock" --> T6["<img src="https://api.iconify.design/lucide/door-closed.svg?color=%23E0E0E0" width="20" height="20" style="vertical-align: middle;"> Khóa cửa"]
T4 & T5 & T6 --> T_Check{"<img src="https://api.iconify.design/lucide/eye.svg?color=%23E0E0E0" width="20" height="20" style="vertical-align: middle;"> Theo dõi"}
end
%% Networking Layer
subgraph Network_Sync ["<b><img src="https://api.iconify.design/lucide/globe.svg?color=%23E0E0E0" width="20" height="20" style="vertical-align: middle;"> NETWORK SYNC</b>"]
Loop --> NS1["⏩ Client Prediction"]
NS1 --> NS2["<img src="https://api.iconify.design/lucide/refresh-cw.svg?color=%23E0E0E0" width="20" height="20" style="vertical-align: middle;"> Server Reconciliation"]
NS2 --> NS3["<img src="https://api.iconify.design/lucide/package.svg?color=%23E0E0E0" width="20" height="20" style="vertical-align: middle;"> State Sync"]
end
end
class Seeker_Logic,S1,S2,S3,S4,S5,S6,S_Check seekerStyle;
class Trapper_Logic,T1,T2,T3,T4,T5,T6,T_Check trapperStyle;
class Network_Sync,NS1,NS2,NS3,Loop netStyle;
class S_Trap criticalStyle;
%% Phase 3: Results
subgraph Result_Logic ["<b>3. KẾT THÚC & THƯỞNG</b>"]
S_Check -- "Chạm Exit" --> Win_S["<img src="https://api.iconify.design/lucide/trophy.svg?color=%23E0E0E0" width="20" height="20" style="vertical-align: middle;"> SEEKER THẮNG"]
T_Check -- "Bắt được Seeker" --> Win_T["<img src="https://api.iconify.design/lucide/trophy.svg?color=%23E0E0E0" width="20" height="20" style="vertical-align: middle;"> TRAPPER THẮNG"]
Loop -- "Timer = 0" --> Win_T
Win_S & Win_T --> Post_Match["<img src="https://api.iconify.design/lucide/bar-chart-3.svg?color=%23E0E0E0" width="20" height="20" style="vertical-align: middle;"> Thống kê Rank"]
Post_Match --> Buff{"<img src="https://api.iconify.design/lucide/scale.svg?color=%23E0E0E0" width="20" height="20" style="vertical-align: middle;"> Balance Check"}
Buff -- "Thua cuộc" --> Buff_Apply["<img src="https://api.iconify.design/lucide/gem.svg?color=%23E0E0E0" width="20" height="20" style="vertical-align: middle;"> Kích hoạt Comeback Buff"]
Buff_Apply --> A
end
class Win_S,Win_T winStyle;
class Result_Logic,Post_Match,Buff,Buff_Apply initStyle;
%% Interactions (Dashed Lines)
S_Trap -.->|Cảnh báo| T_Check
S4 -.->|Sóng âm| T2
T4 -.->|Collision ẩn| S_Check
NS3 --> Loop
```
---
## <img src="https://api.iconify.design/lucide/building-2.svg?color=%23E0E0E0" width="20" height="20" style="vertical-align: middle;"> Kiến trúc Kỹ thuật (Technical Architecture)
### 1. Advanced Player & Camera State Machine
Hệ thống điều khiển nhân vật không chỉ quản lý hành động mà còn điều phối **Camera Dynamics** để tăng cường cảm giác nhập vai và đồng bộ hóa hướng nhìn qua mạng.
```mermaid
stateDiagram-v2
direction TB
state "<img src="https://api.iconify.design/lucide/flower.svg?color=%23E0E0E0" width="20" height="20" style="vertical-align: middle;"> GROUND" as Ground {
[*] --> Idle
state Idle {
I_P: <img src="https://api.iconify.design/lucide/file-text.svg?color=%23E0E0E0" width="20" height="20" style="vertical-align: middle;"> Vel < 0.1m/s
I_C: 🌡️ Breathing (0.5Hz)
}
Idle --> Moving : "Input.mag > 0.1"
state Moving {
M_P: <img src="https://api.iconify.design/lucide/footprints.svg?color=%23E0E0E0" width="20" height="20" style="vertical-align: middle;"> Speed 2-4m/s
M_C: <img src="https://api.iconify.design/lucide/wind.svg?color=%23E0E0E0" width="20" height="20" style="vertical-align: middle;"> Head Bob (1.2Hz)
}
Moving --> Sneaking : "OnSneak (Hold)"
state Sneaking {
Sn_P: <img src="https://api.iconify.design/lucide/volume-x.svg?color=%23E0E0E0" width="20" height="20" style="vertical-align: middle;"> Noise -50%
Sn_C: <img src="https://api.iconify.design/lucide/trending-down.svg?color=%23E0E0E0" width="20" height="20" style="vertical-align: middle;"> Lower Height
}
Moving --> Sprinting : "OnSprint (Hold)"
state Sneaking --> Moving : "Release Sneak"
state Sprinting {
Sp_P: <img src="https://api.iconify.design/lucide/zap.svg?color=%23E0E0E0" width="20" height="20" style="vertical-align: middle;"> Speed > 6.5m/s
Sp_C: 🌈 Dynamic FOV
}
Sprinting --> Moving : "Stamina Empty"
}
state "☁️ AIRBORNE" as Air {
state Jump {
J_P: <img src="https://api.iconify.design/lucide/arrow-up-circle.svg?color=%23E0E0E0" width="20" height="20" style="vertical-align: middle;"> AddForce Up
}
state Falling {
F_P: <img src="https://api.iconify.design/lucide/trending-down.svg?color=%23E0E0E0" width="20" height="20" style="vertical-align: middle;"> Gravity x 1.5
}
state Landing {
L_P: 📏 Impact Check
}
Jump --> Falling : "Vel.y < 0"
Falling --> Landing : "IsGrounded == true"
}
state "<img src="https://api.iconify.design/lucide/zap.svg?color=%23E0E0E0" width="20" height="20" style="vertical-align: middle;"> ACTION" as Utility {
state Dashing {
D_P: <img src="https://api.iconify.design/lucide/wind.svg?color=%23E0E0E0" width="20" height="20" style="vertical-align: middle;"> Burst 15m/s
}
state Interacting {
Int_P: <img src="https://api.iconify.design/lucide/lock.svg?color=%23E0E0E0" width="20" height="20" style="vertical-align: middle;"> Root Motion Lock
}
}
state "<img src="https://api.iconify.design/lucide/globe.svg?color=%23E0E0E0" width="20" height="20" style="vertical-align: middle;"> NETWORK" as Net {
state "Input Authority" as IA
state "State Authority" as SA
IA --> SA : "Send Input"
SA --> IA : "Reconcile"
}
%% Transitions chính
Ground --> Air : "IsGrounded == false"
Air --> Ground : "OnLand Event"
Ground --> Utility : "OnAbility"
Utility --> Ground : "Complete"
%% Notes
note left of Ground
<img src="https://api.iconify.design/lucide/sparkles.svg?color=%23E0E0E0" width="20" height="20" style="vertical-align: middle;"> Sync: Velocity
<img src="https://api.iconify.design/lucide/sparkles.svg?color=%23E0E0E0" width="20" height="20" style="vertical-align: middle;"> State: MoveState
end note
note right of Net
<img src="https://api.iconify.design/lucide/settings.svg?color=%23E0E0E0" width="20" height="20" style="vertical-align: middle;"> Photon Fusion
<img src="https://api.iconify.design/lucide/settings.svg?color=%23E0E0E0" width="20" height="20" style="vertical-align: middle;"> FixedUpdateNetwork
end note
```
### 2. Environment Scanner & Interaction
Hệ thống quét vật thể (`EnvironmentScanner.cs`) sử dụng **SphereCast****OverlapSphere** để phát hiện các đối tượng `IInteractable` trong phạm vi tương tác, đảm bảo tính chính xác ngay cả trong bóng tối.
---
## <img src="https://api.iconify.design/lucide/puzzle.svg?color=%23E0E0E0" width="20" height="20" style="vertical-align: middle;"> Hệ thống Mê cung (Maze Generation)
Trái tim của **BABA_YAGA** là hệ thống tạo mê cung đa thuật toán, mang lại sự đa dạng vô hạn.
| Algorithm | Complexity | Description |
| :--- | :--- | :--- |
| **Prims** | O(E log V) | Tạo mê cung "dày", nhiều nhánh ngắn, lý tưởng cho việc đặt bẫy. |
| **Wilsons** | O(N) | Thuật toán ngẫu nhiên hoàn hảo, không có thiên hướng cấu trúc nhất định. |
| **Recursive** | O(N) | Tạo ra các hành lang dài và sâu, tăng áp lực cho Seeker. |
| **Crawler** | O(N) | Tạo ra các không gian mở giống hang động hơn là mê cung truyền thống. |
### Quy trình khởi tạo (Maze Generation Pipeline)
```mermaid
graph TD
%% Định nghĩa Style
classDef lossStyle fill:#ffebee,stroke:#c62828,stroke-width:2px,color:#c62828;
classDef tier1Style fill:#fff8e1,stroke:#fbc02d,stroke-width:2px,color:#f57f17;
classDef tier2Style fill:#fff3e0,stroke:#fb8c00,stroke-width:2px,color:#e65100;
classDef tier3Style fill:#fbe9e7,stroke:#ff5722,stroke-width:2px,color:#bf360c;
classDef systemStyle fill:#f5f5f5,stroke:#424242,stroke-width:2px,color:#424242;
classDef winStyle fill:#e8f5e9,stroke:#2e7d32,stroke-width:2px,color:#1b5e20;
%% Quy trình chính
Start(("<img src="https://api.iconify.design/lucide/heart-off.svg?color=%23E0E0E0" width="20" height="20" style="vertical-align: middle;"> <b>PLAYER LOSES ROUND</b>")) --> Streak{{"<img src="https://api.iconify.design/lucide/bar-chart-3.svg?color=%23E0E0E0" width="20" height="20" style="vertical-align: middle;"> Check Loss Streak"}}
%% Phân tầng Buff
subgraph Buff_Pools ["<b><img src="https://api.iconify.design/lucide/flame.svg?color=%23E0E0E0" width="20" height="20" style="vertical-align: middle;"> HỆ THỐNG CÂN BẰNG ĐỘNG (COMEBACK POOLS)</b>"]
Streak -- "1 Trận" --> T1
Streak -- "2 Trận" --> T2
Streak -- "3+ Trận" --> T3
T1["<img src="https://api.iconify.design/lucide/award.svg?color=%23E0E0E0" width="20" height="20" style="vertical-align: middle;"> <b>Tier 1: Awakening</b><br/>(Small Boosts)"]
T2["<img src="https://api.iconify.design/lucide/award.svg?color=%23E0E0E0" width="20" height="20" style="vertical-align: middle;"> <b>Tier 2: Evolution</b><br/>(Tactical Advantage)"]
T3["<img src="https://api.iconify.design/lucide/award.svg?color=%23E0E0E0" width="20" height="20" style="vertical-align: middle;"> <b>Tier 3: Manifestation</b><br/>(Game Changer)"]
%% Ví dụ chỉ số (Tooltip-like)
T1 --- T1_Ex["+10% Speed<br/>+15% Stamina Regen"]
T2 --- T2_Ex["Bẫy tàng hình (Trapper)<br/>Giảm 50% tiếng ồn (Seeker)"]
T3 --- T3_Ex["Nhìn xuyên tường 5s<br/>Hồi sinh 1 lần tại chỗ"]
end
%% Giai đoạn áp dụng
T1 & T2 & T3 --> Selection{{"<img src="https://api.iconify.design/lucide/dice-5.svg?color=%23E0E0E0" width="20" height="20" style="vertical-align: middle;"> Selection Mode"}}
Selection -- "Manual" --> P1["Người chơi tự chọn 1 trong 3 Buff"]
Selection -- "Auto" --> P2["Hệ thống chọn ngẫu nhiên"]
P1 & P2 --> Apply["<img src="https://api.iconify.design/lucide/sparkles.svg?color=%23E0E0E0" width="20" height="20" style="vertical-align: middle;"> <b>Apply to Next Round Only</b><br/>(Trạng thái: Active)"]
%% Kết quả vòng đấu sau
Apply --> Result{{"<img src="https://api.iconify.design/lucide/flag.svg?color=%23E0E0E0" width="20" height="20" style="vertical-align: middle;"> New Round Result?"}}
Result -- "<img src="https://api.iconify.design/lucide/trophy.svg?color=%23E0E0E0" width="20" height="20" style="vertical-align: middle;"> WIN" --> Reset["<img src="https://api.iconify.design/lucide/rotate-ccw.svg?color=%23E0E0E0" width="20" height="20" style="vertical-align: middle;"> <b>Reset Streak</b><br/>Remove All Buffs"]
Result -- "❌ LOSS" --> Increment["<img src="https://api.iconify.design/lucide/trending-up.svg?color=%23E0E0E0" width="20" height="20" style="vertical-align: middle;"> <b>Increase Streak</b><br/>Progress to Next Tier"]
%% Vòng lặp
Reset --> NewGame(("<img src="https://api.iconify.design/lucide/gamepad-2.svg?color=%23E0E0E0" width="20" height="20" style="vertical-align: middle;"> Fair Match"))
Increment --> Start
%% Gán Style
class Start,Increment lossStyle;
class T1,T1_Ex tier1Style;
class T2,T2_Ex tier2Style;
class T3,T3_Ex tier3Style;
class Selection,P1,P2,Apply systemStyle;
class Result,Reset,NewGame winStyle;
```
---
## <img src="https://api.iconify.design/lucide/globe.svg?color=%23E0E0E0" width="20" height="20" style="vertical-align: middle;"> Đồng bộ Mạng (Networking)
Sử dụng **Photon Fusion (State Sync)** với cơ chế Client-Side Prediction để đảm bảo trải nghiệm không độ trễ.
### Network Data Flow & Synchronization
```mermaid
sequenceDiagram
autonumber
participant IR as <img src="https://api.iconify.design/lucide/mouse.svg?color=%23E0E0E0" width="20" height="20" style="vertical-align: middle;"> Input
participant CP as 🎀 Local Player
participant NT as <img src="https://api.iconify.design/lucide/globe.svg?color=%23E0E0E0" width="20" height="20" style="vertical-align: middle;"> Fusion Net
participant S as <img src="https://api.iconify.design/lucide/crown.svg?color=%23E0E0E0" width="20" height="20" style="vertical-align: middle;"> Server
participant RP as <img src="https://api.iconify.design/lucide/users.svg?color=%23E0E0E0" width="20" height="20" style="vertical-align: middle;"> Proxies
%% --- GIAI ĐOẠN 1 ---
Note over IR, CP: [PHASE 1] Thu thập Input
IR->>CP: OnMove / OnJump / OnSprint
CP->>CP: <img src="https://api.iconify.design/lucide/package.svg?color=%23E0E0E0" width="20" height="20" style="vertical-align: middle;"> Pack NetworkInputData
%% --- GIAI ĐOẠN 2 ---
Note over CP: [PHASE 2] Dự đoán (Prediction)
CP->>CP: <img src="https://api.iconify.design/lucide/run.svg?color=%23E0E0E0" width="20" height="20" style="vertical-align: middle;"> Run Client-Side Physics
CP->>NT: <img src="https://api.iconify.design/lucide/mail.svg?color=%23E0E0E0" width="20" height="20" style="vertical-align: middle;"> Send Input (Tick N)
%% --- GIAI ĐOẠN 3 ---
Note over NT, S: [PHASE 3] Truyền tin mạng
NT->>S: UDP Packet Delivery
Note right of S: SERVER SIMULATION
S->>S: <img src="https://api.iconify.design/lucide/file-text.svg?color=%23E0E0E0" width="20" height="20" style="vertical-align: middle;"> Validate & Update State
S-->>NT: <img src="https://api.iconify.design/lucide/megaphone.svg?color=%23E0E0E0" width="20" height="20" style="vertical-align: middle;"> Snapshot (Tick N)
%% --- GIAI ĐOẠN 4 ---
Note over NT, CP: [PHASE 4] Hồi đáp & Đồng bộ
NT-->>CP: State Snapshot
Note over CP: <img src="https://api.iconify.design/lucide/refresh-cw.svg?color=%23E0E0E0" width="20" height="20" style="vertical-align: middle;"> RECONCILIATION
CP->>CP: Fix Position if Error > Threshold
%% --- GIAI ĐOẠN 5 ---
Note over NT, RP: [PHASE 5] Proxy Update
NT-->>RP: State Snapshot
Note over RP: <img src="https://api.iconify.design/lucide/film.svg?color=%23E0E0E0" width="20" height="20" style="vertical-align: middle;"> INTERPOLATION (Lerp)
%% --- GIAI ĐOẠN 6 ---
Note over CP, RP: [PHASE 6] Hiển thị (Render)
CP->>CP: Update Camera Shake/VFX
RP->>RP: Smooth Mesh Movement
```
---
## <img src="https://api.iconify.design/lucide/scale.svg?color=%23E0E0E0" width="20" height="20" style="vertical-align: middle;"> Hệ thống Comeback Đa tầng (Tiered Adaptive System)
Để đảm bảo mỗi trận đấu đều kịch tính đến giây cuối cùng, BABA_YAGA áp dụng hệ thống **"Despair Mechanics"**. Người chơi có chuỗi thua càng dài sẽ nhận được quyền năng từ mê cung càng lớn, tạo ra những khoảnh khắc lật kèo kinh điển.
### <img src="https://api.iconify.design/lucide/trending-up.svg?color=%23E0E0E0" width="20" height="20" style="vertical-align: middle;"> Phân tầng Buff theo Chuỗi Thua (Tiered Progression)
| Chuỗi Thua | Phân tầng | Tên gọi | Quyền năng & Cơ chế |
| :--- | :--- | :--- | :--- |
| **1 Trận** | Tier 1 | *Awakening* | Chọn 1 Buff cơ bản (Tăng tốc +15% hoặc Mở rộng tầm nhìn +20%). |
| **2 Trận** | Tier 2 | *Evolution* | Nhận 1 Buff chủ động (Kỹ năng nhấn nút) + 1 Buff bị động (Nâng cấp chỉ số). |
| **3+ Trận** | Tier 3 | *Manifestation* | **Ultimate Skill:** Kỹ năng thay đổi luật chơi trong 30s. Mê cung sẽ hỗ trợ bạn trực tiếp. |
---
### <img src="https://api.iconify.design/lucide/run.svg?color=%23E0E0E0" width="20" height="20" style="vertical-align: middle;"> Seeker: Ý chí Sinh tồn (Survival Evolution)
Khi Seeker liên tục thất bại, các giác quan của họ sẽ tiến hóa vượt bậc để chống lại bóng tối:
* **Tier 1 - Sixth Sense (Linh cảm):** Seeker bắt đầu nghe thấy tiếng tim đập của chính mình nhanh hơn khi Trapper đang ở gần (bán kính 15m), giúp định vị mà không cần nhìn.
* **Tier 2 - Shadow Step (Bước chân hư vô):** Di chuyển hoàn toàn không gây ra tiếng động (Noise Meter = 0) trong 20 giây đầu của trận đấu. Cho phép Seeker thiết lập vị trí an toàn sớm.
* **Tier 2 - Trap Reflex (Phản xạ tột độ):** Seeker có 50% cơ hội tự động vô hiệu hóa bẫy kẹp đầu tiên dẫm phải. Nếu thành công, Seeker sẽ được tăng 50% tốc độ chạy trong 3s.
* **Tier 3 - Ultimate: Chrono Dash:** Trong 15 giây, Seeker có thể thực hiện Dash không giới hạn (No Cooldown) và trở nên miễn nhiễm with mọi loại khống chế. Lúc này, Seeker là kẻ săn lùng lối thoát.
---
### <img src="https://api.iconify.design/lucide/eye.svg?color=%23E0E0E0" width="20" height="20" style="vertical-align: middle;"> Trapper: Quyền năng Bóng tối (Dark Rituals)
Khi Trapper để xổng mất con mồi, mê cung sẽ hiến tế sự ổn định của nó để ban cho Trapper những quyền năng thao túng cực hạn:
* **Tier 1 - Paranoia Echo (Tiếng vọng ảo giác):** Tự động tạo ra 3 nguồn âm thanh bước chân giả chạy xung quanh Seeker để gây nhiễu loạn khả năng định hướng bằng âm thanh của họ.
* **Tier 2 - Global Blackout (Bóng tối bao trùm):** Kích hoạt khiến đèn pin của Seeker bị nhiễu (Flicker) hoặc tắt hoàn toàn trong 8 giây. Đây là thời điểm vàng để Trapper thu hẹp khoảng cách.
* **Tier 2 - Ghosting (Dịch chuyển không gian):** Trapper nhận khả năng đi xuyên qua các cánh cửa đã bị khóa hoặc các bức tường mỏng (Destructible Walls) trong 15 giây.
* **Tier 3 - Ultimate: Eye of the Abyss:** Hiển thị vị trí thực của Seeker xuyên tường (Wallhack) dưới dạng bóng đen trong 20 giây. Seeker không thể trốn chạy, chỉ có thể cầu nguyện.
---
## <img src="https://api.iconify.design/lucide/rocket.svg?color=%23E0E0E0" width="20" height="20" style="vertical-align: middle;"> Lộ trình Phát triển (Roadmap)
<!-- START_UPDATES -->
<!-- END_UPDATES -->
- [x] **Phase 1: Foundation**
- [x] Player State Machine (Idle, Move, Run, Jump).
- [x] Maze Generation (Multi-algorithm).
- [x] Photon Fusion Integration.
- [ ] **Phase 2: Gameplay Core**
- [ ] Role Selection (Seeker vs Trapper).
- [ ] Trap Placement System.
- [ ] Sound & Visual Detection (Noise Meter).
---
## <img src="https://api.iconify.design/lucide/users.svg?color=%23E0E0E0" width="20" height="20" style="vertical-align: middle;"> Đội ngũ Phát triển & Phân chia Nhiệm vụ (The Team & WBS)
Dự án được thực hiện bởi nhóm 3 thành viên với các vai trò chuyên biệt, đảm bảo tính chuyên môn hóa cao trong quy trình sản xuất Game.
| Thành viên | Vai trò | Trách nhiệm chi tiết (Work Breakdown Structure) |
| :--- | :--- | :--- |
| **Scove** | **Trưởng nhóm / World Architect** | - Nghiên cứu & triển khai thuật toán Maze (Prims, Wilsons, Crawler).<br/>- Thiết kế hệ thống **Mesh Generation** (Tạo tường, sàn, trần tự động).<br/>- Đảm bảo tính **Solvability** (Mê cung luôn có lối thoát khả thi).<br/>- Xây dựng logic **Comeback Đa tầng** (Despair Mechanics).<br/>- Review Code toàn cục & Quản lý kiến trúc State Machine. |
| **Duy** | **Phó nhóm / Lead Network Engineer** | - Quản lý hạ tầng **Photon Fusion** (Matchmaking, Session, Relay).<br/>- Đồng bộ hóa trạng thái mạng (`Networked Properties`) cho bẫy, cửa, đèn.<br/>- Xử lý logic phân vai (Role Assignment) & Điều phối Game State.<br/>- Tối ưu hóa băng thông & Xử lý Reconciliation/Interpolation mạng. |
| **Tuấn** | **Mechanics Developer & Tech Artist** | - Hệ thống **Noise Meter** & Ánh sáng động (Flashlight/Battery System).<br/>- Logic bẫy (Traps): Snare (kẹp), Alarm (báo động), Sound (giả thanh).<br/>- Hệ thống **Camera Dynamics** (FOV Kick, Shake, Tilt, Motion Blur).<br/>- Quản lý hiệu ứng hình ảnh (VFX) & Âm thanh không gian (3D Spatial Audio).<br/>- Thiết kế HUD cho Seeker & Trapper; UI Menu & UX Flow. |
---
## <img src="https://api.iconify.design/lucide/ruler.svg?color=%23E0E0E0" width="20" height="20" style="vertical-align: middle;"> Tiêu chuẩn Kỹ thuật Nâng cao (Non-functional Requirements)
Mỗi thành viên phải tuân thủ nghiêm ngặt các tiêu chuẩn kỹ thuật sau để đảm bảo dự án đạt chất lượng AAA-Indie:
### <img src="https://api.iconify.design/lucide/globe.svg?color=%23E0E0E0" width="20" height="20" style="vertical-align: middle;"> Networking & Synchronization (Duy)
* **RTT Optimization:** Duy trì Round Trip Time < 150ms; tối ưu hóa kích thước gói tin bằng `[Networked]``Reliable RPCs`.
* **State Authority:** Mọi logic Thắng/Thua và Trigger bẫy phải được xác thực hoàn toàn tại **Server** để ngăn chặn gian lận.
* **Interpolation Smoothing:** Đảm bảo di chuyển của đối thủ (Remote Proxies) mượt mà ngay cả khi mất gói tin (Packet Loss).
### <img src="https://api.iconify.design/lucide/building-2.svg?color=%23E0E0E0" width="20" height="20" style="vertical-align: middle;"> World Generation & Performance (Scove)
* **Algorithmic Complexity:** Thuật toán tạo mê cung phải đạt hiệu năng O(N) hoặc O(N log N) để tránh treo Editor/Runtime.
* **Draw Call Batching:** Tối ưu hóa Mesh mê cung để đạt mức Draw Calls thấp nhất (Sử dụng Static Batching & GPU Instancing).
* **NavMesh Runtime:** Tự động bake NavMesh sau khi Maze tạo xong để hỗ trợ AI và các tính năng hỗ trợ Trapper.
### <img src="https://api.iconify.design/lucide/binary.svg?color=%23E0E0E0" width="20" height="20" style="vertical-align: middle;"> Gameplay & Physics (Tuấn)
* **Input Latency:** Xử lý Input thông qua `FixedUpdateNetwork` để đồng bộ hoàn hảo với Server Simulation.
* **Physics Matrix:** Tối ưu hóa Collision Matrix; sử dụng Collider đơn giản (Box/Capsule) cho các hành lang mê cung lắt léo.
* **State Integrity:** Mỗi State trong State Machine phải độc lập, không được can thiệp trực tiếp vào biến nội bộ của State khác.
### <img src="https://api.iconify.design/lucide/palette.svg?color=%23E0E0E0" width="20" height="20" style="vertical-align: middle;"> Visuals & UI/UX (Tuấn)
* **Rendering (Unity 6):** Tận dụng **URP (Universal Render Pipeline)** và Render Graph để tạo hiệu ứng bóng tối chất lượng cao.
* **Asset Compression:** Texture sử dụng chuẩn nén ASTC/DXT5; Mesh polycount tối ưu cho môi trường di động và PC tầm trung.
* **UX Consistency:** Tín hiệu phản hồi (VFX/SFX/Haptic) phải nhất quán để người chơi nhận biết ngay lập tức các sự kiện trong game.
---
## 📂 Cấu trúc Thư mục Dự án (Project Folder Structure)
Dự án được tổ chức theo tiêu chuẩn công nghiệp (Standard Industry Practices), tách biệt rõ ràng giữa logic Code, Assets và Configuration.
```text
📦 BABA_YAGA
├── 🌸 Assets/ (Trái tim của trò chơi)
│ ├── 📜 Scripts/ (Phép thuật điều khiển logic)
│ │ ├── 🏷️ Attributes/ # Tùy biến Inspector
│ │ ├── 🎥 Camera Controller/
│ │ ├── 🛠️ Debug/
│ │ ├── 🌐 Fusion/
│ │ │ └── 🚀 BasicSpawner.cs
│ │ ├── 🏗️ GameSetup/
│ │ │ ├── 🌀 Maze/ # Mê cung
│ │ │ │ ├── 🐾 Crawler.cs
│ │ │ │ ├── 🌳 Prims.cs
│ │ │ │ ├── 🧵 Wilsons.cs
│ │ │ │ └── 🗺️ Maze.cs
│ │ │ └── 🧍 CharacterAutoSetup.cs
│ │ ├── 鼠标 Interactables/
│ │ │ ├── 🚪 DoorInteractable.cs
│ │ │ ├── 💡 LampInteractable.cs
│ │ │ └── 💎 BaseInteractable.cs
│ │ ├── 📐 Interface/
│ │ ├── 🏃‍♀️ Player Controller/
│ │ │ ├── 🧠 PlayerStateMachine.cs
│ │ │ ├── ⌨️ InputReader.cs
│ │ │ └── 🎭 States/
│ │ ├── ⚡ Optimization/
│ │ ├── 🖥️ UI/
│ │ └── 🎆 VFX/
│ ├── 🧸 Prefabs/
│ ├── 📖 document/
│ ├── 🎬 Scenes/
│ ├── 🎨 Materials/
│ ├── 👸 Models/
│ ├── 💃 Animation/
│ ├── 🔌 Photon/
│ ├── 🅰️ TextMesh Pro/
│ └── ⚙️ Settings/
├── 🛠️ ProjectSettings/
│ ├── 🏷️ TagManager.asset
│ ├── 🌍 DynamicsManager.asset
│ └── 📡 MultiplayerManager.asset
├── 📦 Packages/
└── 📝 README.md # Creator (。•̀ᴗ-)✧
```
---
## <img src="https://api.iconify.design/lucide/handshake.svg?color=%23E0E0E0" width="20" height="20" style="vertical-align: middle;"> Hướng dẫn Cài đặt & Khởi chạy (Installation & Setup)
Để trải nghiệm **BABA_YAGA** một cách mượt mà nhất, vui lòng thực hiện theo các bước chi tiết dưới đây:
### 1. Yêu cầu Hệ thống
* **Unity Editor:** Phiên bản **6000.3.10f1 (Unity 6)** trở lên.
* **Hệ điều hành:** Windows 10/11 hoặc macOS (M1/M2/Intel).
* **Disk Space:** Tối thiểu 5GB trống để chứa Project và Library.
### 2. Tải về & Mở dự án
1. **Clone Repository:**
```bash
git clone https://github.com/OnlyScove/BABA_YAGA.git
```
2. Mở **Unity Hub**, chọn **Add** -> **Add project from disk**.
3. Tìm đến thư mục vừa clone và nhấn **Open**. Chờ Unity Hub tải các Packages cần thiết (có thể mất vài phút).
### 3. Cấu hình Photon Fusion (Bắt buộc)
Trò chơi yêu cầu **AppID** hợp lệ để hoạt động qua mạng:
1. Đăng nhập vào [Photon Engine Dashboard](https://dashboard.photonengine.com/).
2. Tạo một ứng dụng mới với loại App là **Fusion**.
3. Sao chép **App ID** vừa tạo.
4. Trong Unity Editor, đi đến: `Photon` -> `Fusion` -> `Network Project Settings`.
5. Dán App ID vào mục **App Id Fusion** (cho cả Realtime và Fusion).
6. Đảm bảo **Network Mode** được đặt là `Client/Server` (để hỗ trợ State Authority).
### 4. Khởi chạy Trò chơi
1. Mở Scene chính tại: `Assets/Scenes/Main Scene.unity`.
2. Sử dụng **Smart Bootstrapper** (nằm ở thanh Menu trên cùng) để tự động cấu hình Runner.
3. Nhấn nút **Play** trong Unity Editor.
4. Để test Multiplayer, bạn có thể build ra file `.exe` hoặc sử dụng công cụ **ParrelSync** (nếu đã cài) để chạy hai instance cùng lúc.
---
## <img src="https://api.iconify.design/lucide/heart.svg?color=%23E0E0E0" width="20" height="20" style="vertical-align: middle;"> Support & Community
<p align="center">
<a href="https://github.com/scove303">
<img src="https://img.shields.io/github/stars/OnlyScove/BABA_YAGA?style=for-the-badge&logo=github&color=yellow" alt="Stars">
</a>
<a href="https://scove-vault.duckdns.org/scove">
<img src="https://img.shields.io/github/forks/OnlyScove/BABA_YAGA?style=for-the-badge&logo=github&color=blue" alt="Forks">
</a>
<a href="https://scove-vault.duckdns.org/scove">
<img src="https://img.shields.io/github/followers/OnlyScove?style=for-the-badge&logo=github&color=green" alt="Follow">
</a>
</p>
<p align="center">
<a href="https://www.buymeacoffee.com/yourname">
<img src="https://img.shields.io/badge/Buy%20Me%20A%20Coffee-Donate-orange?style=for-the-badge&logo=buy-me-a-coffee&logoColor=white" alt="Buy Me A Coffee">
</a>
<a href="https://discord.gg/4xCYJvF4S2">
<img src="https://img.shields.io/badge/Discord-Join%20Community-7289DA?style=for-the-badge&logo=discord&logoColor=white" alt="Discord">
</a>
<a href="https://ko-fi.com/yourname">
<img src="https://img.shields.io/badge/Ko--fi-Support-red?style=for-the-badge&logo=ko-fi&logoColor=white" alt="Ko-fi">
</a>
</p>
<p align="center">
<img src="https://scove-vault.duckdns.org/files/share/hARx-n28" alt="Visitors">
</p>
---
**© 2026 SCOVANIA STUDIOS.**
*Baba_Yaga is more than a game, it's a social experiment.*
---
**Connect with us:**
[![Twitter](https://img.shields.io/badge/Twitter-1DA1F2?style=for-the-badge&logo=twitter&logoColor=white)](https://x.com/Scovy303)

View File

@@ -1,138 +1,90 @@
## <img src="https://api.iconify.design/lucide/layers.svg?color=%23B026FF" width="28" height="28" style="vertical-align: middle;"> Hệ thống Mê cung (Procedural Maze Generation)
## <img src="https://api.iconify.design/lucide/globe.svg?color=%2333CCFF" width="28" height="28" style="vertical-align: middle;"> Kiến trúc Mạng (Advanced Netcode Architecture)
> Trái tim của **BABA_YAGA** là bộ máy kiến tạo môi trường ngẫu nhiên đa thuật toán (Multi-Algorithm Procedural Engine). Môi trường sẽ không bao giờ lặp lại, tước đoạt hoàn toàn khả năng ghi nhớ bản đồ của người chơi và ép họ phải dựa vào các giác quan sinh tồn.
> Để đảm bảo tính công bằng trong một tựa game mang nặng yếu tố hành động lén lút và phản xạ ngàn cân treo sợi tóc, **BABA_YAGA** sử dụng **Photon Fusion (State Sync)** làm lõi đồng bộ. Hệ thống được tinh chỉnh để mô phỏng cảm giác "Độ trễ bằng 0" (Zero-Latency Feel) thông qua kiến trúc mạng tất định (Deterministic Network).
<br>
<table width="100%" border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse; border: none;">
<tr>
<!-- Prims -->
<td width="50%" style="padding: 15px; background: rgba(176,38,255,0.05); border-bottom: 1px solid rgba(255,255,255,0.05); border-right: 1px solid rgba(255,255,255,0.05);">
<strong style="color: #E0E0E0;"><img src="https://api.iconify.design/lucide/network.svg?color=%23B026FF" width="18" style="vertical-align: middle;"> Prim's Algorithm</strong>
<span style="color: #888; font-size: 12px; float: right;">| O(E log V)</span><br>
<p style="font-size: 13px; color: #999; margin-top: 8px;">Tạo cấu trúc mê cung "dày đặc", nhiều nhánh cụt đan xen. Tuyệt vời để Trapper thiết lập các choke-points (điểm thắt nút) và đặt bẫy bất ngờ.</p>
<tr style="border: none;">
<td width="33%" align="center" style="border: none; padding: 15px; background: rgba(51,204,255,0.05); border-radius: 8px 0 0 8px; border-bottom: 2px solid rgba(51,204,255,0.3);">
<img src="https://api.iconify.design/lucide/fast-forward.svg?color=%2333CCFF" width="28" height="28" />
<br><br>
<strong style="color: #E0E0E0;">Client-Side Prediction</strong>
<br>
<p style="font-size: 13px; color: #999; margin-top: 5px;">Mô phỏng trước các chuyển động của người chơi trên Local Client, loại bỏ hoàn toàn độ trễ Input Delay khi di chuyển hoặc lướt.</p>
</td>
<!-- Wilsons -->
<td width="50%" style="padding: 15px; background: rgba(176,38,255,0.02); border-bottom: 1px solid rgba(255,255,255,0.05);">
<strong style="color: #E0E0E0;"><img src="https://api.iconify.design/lucide/shuffle.svg?color=%2333CCFF" width="18" style="vertical-align: middle;"> Wilson's Algorithm</strong>
<span style="color: #888; font-size: 12px; float: right;">| O(N)</span><br>
<p style="font-size: 13px; color: #999; margin-top: 8px;">Sử dụng <i>Loop-Erased Random Walks</i> tạo ra cây khung ngẫu nhiên hoàn hảo, triệt tiêu mọi thiên hướng cấu trúc dự đoán được của Seeker.</p>
<td width="33%" align="center" style="border: none; padding: 15px; background: rgba(255,51,51,0.05); border-bottom: 2px solid rgba(255,51,51,0.3);">
<img src="https://api.iconify.design/lucide/shield-check.svg?color=%23FF3333" width="28" height="28" />
<br><br>
<strong style="color: #E0E0E0;">Server Authority</strong>
<br>
<p style="font-size: 13px; color: #999; margin-top: 5px;">Máy chủ nắm quyền quyết định cuối cùng. Ngăn chặn triệt để các hành vi gian lận như Speedhack, Teleport hay thao túng Hitbox.</p>
</td>
</tr>
<tr>
<!-- Recursive Backtracker -->
<td style="padding: 15px; background: rgba(176,38,255,0.02); border-right: 1px solid rgba(255,255,255,0.05);">
<strong style="color: #E0E0E0;"><img src="https://api.iconify.design/lucide/git-merge.svg?color=%23FF3333" width="18" style="vertical-align: middle;"> Recursive Backtracker</strong>
<span style="color: #888; font-size: 12px; float: right;">| O(N)</span><br>
<p style="font-size: 13px; color: #999; margin-top: 8px;">Kiến tạo các hành lang sâu, dài và quanh co. Gia tăng tối đa áp lực tâm lý cho Seeker khi phải đi dạo trong các đường hầm không lối rẽ.</p>
</td>
<!-- Crawler -->
<td style="padding: 15px; background: rgba(176,38,255,0.05);">
<strong style="color: #E0E0E0;"><img src="https://api.iconify.design/lucide/spider.svg?color=%23FFD700" width="18" style="vertical-align: middle;"> Cellular Crawler</strong>
<span style="color: #888; font-size: 12px; float: right;">| O(N)</span><br>
<p style="font-size: 13px; color: #999; margin-top: 8px;">Thuật toán đục khoét ngẫu nhiên tạo ra các không gian mở (Open Arenas) giống hang động tự nhiên, phá vỡ cấu trúc dạng Grid (lưới) cứng nhắc.</p>
<td width="33%" align="center" style="border: none; padding: 15px; background: rgba(255,215,0,0.05); border-radius: 0 8px 8px 0; border-bottom: 2px solid rgba(255,215,0,0.3);">
<img src="https://api.iconify.design/lucide/history.svg?color=%23FFD700" width="28" height="28" />
<br><br>
<strong style="color: #E0E0E0;">Lag Compensation</strong>
<br>
<p style="font-size: 13px; color: #999; margin-top: 5px;">Rewind trạng thái Hitbox trên Server về đúng thời điểm Client thực hiện thao tác (Ping), đảm bảo tính chính xác cho các cú vồ/bẫy.</p>
</td>
</tr>
</table>
<br>
### <img src="https://api.iconify.design/lucide/cpu.svg?color=%23E0E0E0" width="22" height="22" style="vertical-align: middle;"> Quy trình Khởi tạo (Maze Generation Pipeline)
### <img src="https://api.iconify.design/lucide/workflow.svg?color=%23E0E0E0" width="22" height="22" style="vertical-align: middle;"> Vòng xoay Dữ liệu Mạng (Network Data Flow Pipeline)
> Biểu đồ dưới đây mô tả luồng xử lý thông tin tại mỗi **Tick (Khung hình mạng)**. Việc phân tách rõ ràng giữa *Logical State* (trạng thái mạng) và *Visual Presentation* (hiển thị hình ảnh) giúp khung hình của game (FPS) không bị khóa vào Tickrate của Server.
*(Lưu ý: Các trích xuất HTML trong sơ đồ đã được chuẩn hóa để tương thích hoàn toàn với bộ phân tích Markdown)*
```mermaid
graph TD
%% Định nghĩa Style Dark Theme
classDef initStyle fill:#1a1025,stroke:#B026FF,stroke-width:2px,color:#E0E0E0;
classDef algoStyle fill:#0d1b2a,stroke:#33CCFF,stroke-width:2px,color:#33CCFF;
classDef matrixStyle fill:#331100,stroke:#FFD700,stroke-width:2px,color:#FFD700;
classDef unityStyle fill:#111111,stroke:#888888,stroke-dasharray: 5 5,color:#E0E0E0;
classDef readyStyle fill:#003311,stroke:#00FF55,stroke-width:2px,color:#00FF55;
Start["<img src='https://api.iconify.design/lucide/server.svg?color=%23E0E0E0' width='20'> Server Match Init"] --> Cfg["<img src='https://api.iconify.design/lucide/settings-2.svg?color=%23E0E0E0' width='20'> Seed & Ruleset Config"]
Cfg --> Engine{"<img src='https://api.iconify.design/lucide/cpu.svg?color=%23E0E0E0' width='20'> Algorithm Selector"}
subgraph Generators ["<b>CORE ALGORITHMS (DATA MATRIX)</b>"]
Engine -- "High Density" --> A1["<img src='https://api.iconify.design/lucide/share-2.svg?color=%2333CCFF' width='16'> Prim's Algorithm"]
Engine -- "True Random" --> A2["<img src='https://api.iconify.design/lucide/shuffle.svg?color=%2333CCFF' width='16'> Wilson's Algorithm"]
Engine -- "Long Paths" --> A3["<img src='https://api.iconify.design/lucide/git-merge.svg?color=%2333CCFF' width='16'> Recursive Backtracker"]
end
A1 & A2 & A3 --> Matrix["<img src='https://api.iconify.design/lucide/grid.svg?color=%23FFD700' width='20'> Logical 2D Grid Matrix<br>(0: Wall, 1: Path, 2: Room)"]
subgraph Environment ["<b>UNITY 3D INSTANTIATION</b>"]
Matrix --> Wall["<img src='https://api.iconify.design/lucide/box.svg?color=%23E0E0E0' width='16'> Spawn Walls/Floors"]
Wall --> Props["<img src='https://api.iconify.design/lucide/lamp.svg?color=%23E0E0E0' width='16'> Scatter Props & Traps"]
Props --> NavMesh["<img src='https://api.iconify.design/lucide/layers.svg?color=%23E0E0E0' width='16'> Bake Runtime NavMesh"]
end
NavMesh --> Sync["<img src='https://api.iconify.design/lucide/wifi.svg?color=%23E0E0E0' width='20'> Network Sync State"]
Sync --> Ready["<img src='https://api.iconify.design/lucide/play-circle.svg?color=%2300FF55' width='20'> MATCH READY"]
class Start,Cfg initStyle;
class Engine,A1,A2,A3 algoStyle;
class Matrix matrixStyle;
class Wall,Props,NavMesh unityStyle;
class Sync,Ready readyStyle;
<img src="https://api.iconify.design/lucide/activity.svg?color=%23FF3333" width="28" height="28" style="vertical-align: middle;"> Hệ thống Comeback (Tiered Adaptive System)
Để duy trì tính cạnh tranh và giảm thiểu sự chán nản, BABA_YAGA tích hợp một hệ thống cân bằng động ngầm. Khi một người chơi rơi vào chuỗi thua (Loss Streak), hệ thống sẽ cung cấp các đặc quyền sinh tồn tăng dần theo từng cấp bậc.
<br>
```
```mermaid
graph TD
%% Định nghĩa Style Dark Theme cho hệ thống Comeback
classDef lossStyle fill:#2b0000,stroke:#FF3333,stroke-width:2px,color:#FF3333;
classDef tier1Style fill:#332200,stroke:#FFD700,stroke-width:2px,color:#FFD700;
classDef tier2Style fill:#331a00,stroke:#FF8C00,stroke-width:2px,color:#FF8C00;
classDef tier3Style fill:#4d0000,stroke:#FF0000,stroke-width:2px,color:#FF4500;
classDef systemStyle fill:#111111,stroke:#888888,stroke-width:2px,color:#E0E0E0;
classDef winStyle fill:#003311,stroke:#00FF55,stroke-width:2px,color:#00FF55;
%% Quy trình chính
Start(("<img src='https://api.iconify.design/lucide/heart-crack.svg?color=%23FF3333' width='20'> <b>PLAYER LOSES ROUND</b>")) --> Streak{{"<img src='https://api.iconify.design/lucide/bar-chart-3.svg?color=%23E0E0E0' width='20'> Check Loss Streak"}}
%% Phân tầng Buff
subgraph Buff_Pools ["<b><img src='https://api.iconify.design/lucide/flame.svg?color=%23FF8C00' width='20'> HỆ THỐNG CÂN BẰNG ĐỘNG (COMEBACK POOLS)</b>"]
Streak -- "1 Trận" --> T1
Streak -- "2 Trận" --> T2
Streak -- "3+ Trận" --> T3
T1["<img src='https://api.iconify.design/lucide/award.svg?color=%23FFD700' width='16'> <b>Tier 1: Awakening</b><br/>(Small Boosts)"]
T2["<img src='https://api.iconify.design/lucide/shield-alert.svg?color=%23FF8C00' width='16'> <b>Tier 2: Evolution</b><br/>(Tactical Advantage)"]
T3["<img src='https://api.iconify.design/lucide/skull.svg?color=%23FF0000' width='16'> <b>Tier 3: Manifestation</b><br/>(Game Changer)"]
%% Ví dụ chỉ số
T1 --- T1_Ex["+10% Speed<br/>+15% Stamina Regen"]
T2 --- T2_Ex["Bẫy tàng hình (Trapper)<br/>Giảm 50% tiếng ồn (Seeker)"]
T3 --- T3_Ex["Wallhack (Nhìn xuyên) 5s<br/>Hồi sinh 1 lần tại chỗ"]
end
%% Giai đoạn áp dụng
T1 & T2 & T3 --> Selection{{"<img src='https://api.iconify.design/lucide/dice-5.svg?color=%23E0E0E0' width='20'> Selection Mode"}}
sequenceDiagram
autonumber
Selection -- "Manual" --> P1["Người chơi tự chọn 1 trong 3 Buff"]
Selection -- "Auto" --> P2["Hệ thống chọn ngẫu nhiên"]
P1 & P2 --> Apply["<img src='https://api.iconify.design/lucide/sparkles.svg?color=%23E0E0E0' width='20'> <b>Apply to Next Round Only</b><br/>(Trạng thái: Active)"]
%% Khai báo các thực thể
participant IR as <img src='https://api.iconify.design/lucide/mouse-pointer-2.svg?color=%23FFD700' width='20' style='vertical-align: middle;'> Input
participant CP as <img src='https://api.iconify.design/lucide/monitor.svg?color=%2333CCFF' width='20' style='vertical-align: middle;'> Local Client
participant NT as <img src='https://api.iconify.design/lucide/router.svg?color=%23E0E0E0' width='20' style='vertical-align: middle;'> Fusion Net
participant S as <img src='https://api.iconify.design/lucide/server.svg?color=%23FF3333' width='20' style='vertical-align: middle;'> Server Auth
participant RP as <img src='https://api.iconify.design/lucide/ghost.svg?color=%23888888' width='20' style='vertical-align: middle;'> Proxies
%% Kết quả vòng đấu sau
Apply --> Result{{"<img src='https://api.iconify.design/lucide/flag.svg?color=%23E0E0E0' width='20'> New Round Result?"}}
%% --- GIAI ĐOẠN 1 ---
Note over IR, CP: [PHASE 1] Data Sampling (Thu thập)
IR->>CP: Hành động (Move / Ability / Interact)
CP->>CP: Đóng gói NetworkInputStruct
Result -- "<img src='https://api.iconify.design/lucide/trophy.svg?color=%2300FF55' width='20'> WIN" --> Reset["<img src='https://api.iconify.design/lucide/rotate-ccw.svg?color=%2300FF55' width='20'> <b>Reset Streak</b><br/>Remove All Buffs"]
Result -- "❌ LOSS" --> Increment["<img src='https://api.iconify.design/lucide/trending-up.svg?color=%23FF3333' width='20'> <b>Increase Streak</b><br/>Progress to Next Tier"]
%% --- GIAI ĐOẠN 2 ---
Note over CP: [PHASE 2] Client Prediction (Dự đoán)
CP->>CP: Thực thi Physics & Kinematics tức thì (Tick N)
CP->>NT: Transmit Input Payload (Gửi lên mạng)
%% Vòng lặp
Reset --> NewGame(("<img src='https://api.iconify.design/lucide/gamepad-2.svg?color=%2300FF55' width='20'> Fair Match"))
Increment --> Start
%% --- GIAI ĐOẠN 3 ---
Note over NT, S: [PHASE 3] Server Validation (Xác thực)
NT->>S: UDP Reliable Packet Delivery
Note right of S: SERVER TICK SIMULATION
S->>S: Validate Ruleset & Apply Physics State
S-->>NT: Broadcast Global State Snapshot (Tick N)
%% Gán Style
class Start,Increment lossStyle;
class T1,T1_Ex tier1Style;
class T2,T2_Ex tier2Style;
class T3,T3_Ex tier3Style;
class Selection,P1,P2,Apply systemStyle;
class Result,Reset,NewGame winStyle;
%% --- GIAI ĐOẠN 4 ---
Note over NT, CP: [PHASE 4] Reconciliation (Điều chỉnh bù trừ)
NT-->>CP: Nhận State Snapshot Feed
Note over CP: ERROR CORRECTION PROTOCOL
CP->>CP: Detect Desync -> Snap Transform -> Resimulate Ticks
%% --- GIAI ĐOẠN 5 ---
Note over NT, RP: [PHASE 5] Proxy Update (Cập nhật thực thể bên thứ 3)
NT-->>RP: Nhận State Snapshot Feed
Note over RP: NETWORK INTERPOLATION
RP->>RP: Lerp Position/Rotation (Bù nội suy mượt mà)
%% --- GIAI ĐOẠN 6 ---
Note over CP, RP: [PHASE 6] Visual Render (Hiển thị)
CP->>CP: Trigger Camera Shake / Local VFX
RP->>RP: Cập nhật Animation Parameters & Mesh
<div align="right">
<img src="https://api.iconify.design/lucide/activity-square.svg?color=%23555555" width="14" style="vertical-align: middle;">
<small><i>Hệ thống được thiết lập chạy ở <b>60 Ticks/Second</b>, băng thông ước tính <b><10kb/s</b> mỗi Client.</i></small>
</div>
```

View File

@@ -1,48 +1,90 @@
## <img src="https://api.iconify.design/lucide/globe.svg?color=%23E0E0E0" width="20" height="20" style="vertical-align: middle;"> Đồng bộ Mạng (Networking)
## <img src="https://api.iconify.design/lucide/globe-2.svg?color=%2333CCFF" width="28" height="28" style="vertical-align: middle;"> Kiến trúc Netcode (Deterministic Networking)
Sử dụng **Photon Fusion (State Sync)** với cơ chế Client-Side Prediction để đảm bảo trải nghiệm không độ trễ.
<div align="center">
<img src="https://img.shields.io/badge/ENGINE-PHOTON_FUSION_2.0-0055FF?style=for-the-badge&logo=purescript&logoColor=white" />
<img src="https://img.shields.io/badge/TOPOLOGY-CLIENT_HOSTED_SERVER-FF3333?style=for-the-badge&logo=server&logoColor=white" />
<img src="https://img.shields.io/badge/TICKRATE-60_Hz-00FF55?style=for-the-badge&logo=activity&logoColor=black" />
</div>
> Tựa game với nhịp độ sinh tồn căng thẳng không có chỗ cho sự sai lệch (Desync). **BABA_YAGA** vận hành trên kiến trúc **State Sync (Đồng bộ Trạng thái)** kết hợp quy trình **Dự đoán phía Client (Client-Side Prediction)** và **Bù trừ Độ trễ (Lag Compensation)**, mang lại cảm giác phản hồi tức thì "Zero-Latency" ngay cả ở mức Ping 100ms+.
<br>
<table width="100%" border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse; border: none;">
<tr>
<td width="50%" style="padding: 15px; background: rgba(51,204,255,0.05); border-left: 3px solid #33CCFF; border-bottom: 1px solid rgba(255,255,255,0.05);">
<strong style="color: #33CCFF;"><img src="https://api.iconify.design/lucide/fast-forward.svg?color=%2333CCFF" width="18" style="vertical-align: middle;"> Client-Side Prediction (Dự đoán cục bộ)</strong><br>
<p style="font-size: 13px; color: #AAA; margin-top: 8px;">Người chơi nội bộ (Local Player) thực thi các lệnh di chuyển, lướt, rọi đèn pin <b>ngay lập tức</b> mà không cần đợi Server cho phép. Tạo cảm giác điều khiển mượt mà như game Offline.</p>
</td>
<td width="50%" style="padding: 15px; background: rgba(255,51,51,0.05); border-left: 3px solid #FF3333; border-bottom: 1px solid rgba(255,255,255,0.05);">
<strong style="color: #FF3333;"><img src="https://api.iconify.design/lucide/shield-check.svg?color=%23FF3333" width="18" style="vertical-align: middle;"> Server Reconciliation (Thuật toán Đối chiếu)</strong><br>
<p style="font-size: 13px; color: #AAA; margin-top: 8px;">Máy chủ vẫn nắm quyền tối thượng (Authority). Nếu Client dự đoán sai (do va chạm với bẫy hoặc bị kẹt), Server sẽ ép Client "Rollback" về trạng thái chuẩn trong tích tắc (Snap Correction).</p>
</td>
</tr>
</table>
<br>
### <img src="https://api.iconify.design/lucide/satellite-dish.svg?color=%23E0E0E0" width="22" height="22" style="vertical-align: middle;"> Network Data Flow (Luồng Đồng bộ Hóa)
> Sơ đồ biểu diễn vòng đời của một **Network Tick** từ khi người chơi nhấn phím đến khi hình ảnh được kết xuất (Render) trên màn hình của những người chơi khác.
### Network Data Flow & Synchronization
```mermaid
sequenceDiagram
autonumber
participant IR as <img src="https://api.iconify.design/lucide/mouse.svg?color=%23E0E0E0" width="20" height="20" style="vertical-align: middle;"> Input
participant CP as 🎀 Local Player
participant NT as <img src="https://api.iconify.design/lucide/globe.svg?color=%23E0E0E0" width="20" height="20" style="vertical-align: middle;"> Fusion Net
participant S as <img src="https://api.iconify.design/lucide/crown.svg?color=%23E0E0E0" width="20" height="20" style="vertical-align: middle;"> Server
participant RP as <img src="https://api.iconify.design/lucide/users.svg?color=%23E0E0E0" width="20" height="20" style="vertical-align: middle;"> Proxies
%% Phân vùng không gian hệ thống (Sử dụng Box Grouping)
box rgba(51, 204, 255, 0.05) "⚡ LOCAL ENVIRONMENT (Client Auth)"
participant IR as <img src='https://api.iconify.design/lucide/mouse-pointer-click.svg?color=%2333CCFF' width='20' style='vertical-align: middle;'> Input
participant CP as <img src='https://api.iconify.design/lucide/cpu.svg?color=%2333CCFF' width='20' style='vertical-align: middle;'> Local Player
end
box rgba(255, 51, 51, 0.05) "👑 SERVER ENVIRONMENT (State Auth)"
participant NT as <img src='https://api.iconify.design/lucide/router.svg?color=%23FF3333' width='20' style='vertical-align: middle;'> Network Layer
participant S as <img src='https://api.iconify.design/lucide/server.svg?color=%23FF3333' width='20' style='vertical-align: middle;'> Server Tick
end
box rgba(255, 215, 0, 0.05) "👁️ REMOTE OBSERVERS"
participant RP as <img src='https://api.iconify.design/lucide/users.svg?color=%23FFD700' width='20' style='vertical-align: middle;'> Proxies
end
%% --- GIAI ĐOẠN 1 ---
Note over IR, CP: [PHASE 1] Thu thập Input
IR->>CP: OnMove / OnJump / OnSprint
CP->>CP: <img src="https://api.iconify.design/lucide/package.svg?color=%23E0E0E0" width="20" height="20" style="vertical-align: middle;"> Pack NetworkInputData
Note over IR, CP: [PHASE 1] DATA ACQUISITION
IR->>CP: OnMove / OnAbility (Raw Input)
CP->>CP: <img src='https://api.iconify.design/lucide/package-plus.svg?color=%2333CCFF' width='16' style='vertical-align: middle;'> Pack NetworkInputStruct
%% --- GIAI ĐOẠN 2 ---
Note over CP: [PHASE 2] Dự đoán (Prediction)
CP->>CP: <img src="https://api.iconify.design/lucide/run.svg?color=%23E0E0E0" width="20" height="20" style="vertical-align: middle;"> Run Client-Side Physics
CP->>NT: <img src="https://api.iconify.design/lucide/mail.svg?color=%23E0E0E0" width="20" height="20" style="vertical-align: middle;"> Send Input (Tick N)
Note over CP: [PHASE 2] FORWARD PREDICTION
CP->>CP: <img src='https://api.iconify.design/lucide/zap.svg?color=%2333CCFF' width='16' style='vertical-align: middle;'> Run Local Kinematics (Tick N)
CP->>NT: <img src='https://api.iconify.design/lucide/send.svg?color=%2333CCFF' width='16' style='vertical-align: middle;'> Transmit Input Payload
%% --- GIAI ĐOẠN 3 ---
Note over NT, S: [PHASE 3] Truyền tin mạng
NT->>S: UDP Packet Delivery
Note right of S: SERVER SIMULATION
S->>S: <img src="https://api.iconify.design/lucide/file-text.svg?color=%23E0E0E0" width="20" height="20" style="vertical-align: middle;"> Validate & Update State
S-->>NT: <img src="https://api.iconify.design/lucide/megaphone.svg?color=%23E0E0E0" width="20" height="20" style="vertical-align: middle;"> Snapshot (Tick N)
rect rgba(255, 51, 51, 0.1)
Note over NT, S: [PHASE 3] SERVER VALIDATION (Simulation)
NT->>S: Deliver UDP Packet
S->>S: <img src='https://api.iconify.design/lucide/shield-alert.svg?color=%23FF3333' width='16' style='vertical-align: middle;'> Validate Rules & Apply Physics
S-->>NT: <img src='https://api.iconify.design/lucide/broadcast.svg?color=%23FF3333' width='16' style='vertical-align: middle;'> Broadcast State Snapshot (Tick N)
end
%% --- GIAI ĐOẠN 4 ---
Note over NT, CP: [PHASE 4] Hồi đáp & Đồng bộ
NT-->>CP: State Snapshot
Note over CP: <img src="https://api.iconify.design/lucide/refresh-cw.svg?color=%23E0E0E0" width="20" height="20" style="vertical-align: middle;"> RECONCILIATION
CP->>CP: Fix Position if Error > Threshold
Note over NT, CP: [PHASE 4] RECONCILIATION PROTOCOL
NT-->>CP: State Snapshot (Global Truth)
CP->>CP: <img src='https://api.iconify.design/lucide/scale.svg?color=%23E0E0E0' width='16' style='vertical-align: middle;'> Check Desync (Threshold)
CP->>CP: <img src='https://api.iconify.design/lucide/rotate-ccw.svg?color=%23FF3333' width='16' style='vertical-align: middle;'> Snap Pos & Resimulate if Error
%% --- GIAI ĐOẠN 5 ---
Note over NT, RP: [PHASE 5] Proxy Update
Note over NT, RP: [PHASE 5] PROXY INTERPOLATION
NT-->>RP: State Snapshot
Note over RP: <img src="https://api.iconify.design/lucide/film.svg?color=%23E0E0E0" width="20" height="20" style="vertical-align: middle;"> INTERPOLATION (Lerp)
RP->>RP: <img src='https://api.iconify.design/lucide/spline.svg?color=%23FFD700' width='16' style='vertical-align: middle;'> Lerp Position / Rotation Smoothly
%% --- GIAI ĐOẠN 6 ---
Note over CP, RP: [PHASE 6] Hiển thị (Render)
CP->>CP: Update Camera Shake/VFX
RP->>RP: Smooth Mesh Movement
```
Note over CP, RP: [PHASE 6] VISUAL RENDERING
CP->>CP: <img src='https://api.iconify.design/lucide/video.svg?color=%2333CCFF' width='16' style='vertical-align: middle;'> Update Local VFX / Camera Shake
RP->>RP: <img src='https://api.iconify.design/lucide/ghost.svg?color=%23FFD700' width='16' style='vertical-align: middle;'> Update Animator & Mesh Transforms
<br>
<div align="center">
<img src="https://api.iconify.design/lucide/shield-alert.svg?color=%23555555" width="16" style="vertical-align: middle;">
<small style="color: #888;"><i>Tất cả Logic Va chạm (Collision) và Phát hiện Âm thanh (Noise Detection) được phân tách hoàn toàn khỏi luồng Render đồ họa, ngăn chặn hiện tượng rách hình ảnh (Tearing) do lag mạng.</i></small>
</div>
```

View File

@@ -1,33 +1,128 @@
## <img src="https://api.iconify.design/lucide/scale.svg?color=%23E0E0E0" width="20" height="20" style="vertical-align: middle;"> Hệ thống Comeback Đa tầng (Tiered Adaptive System)
## <img src="https://api.iconify.design/lucide/scale.svg?color=%23FF3333" width="28" height="28" style="vertical-align: middle;"> Hệ thống Cân bằng Thích ứng (Tiered "Despair" Mechanics)
Để đảm bảo mỗi trận đấu đều kịch tính đến giây cuối cùng, BABA_YAGA áp dụng hệ thống **"Despair Mechanics"**. Người chơi có chuỗi thua càng dài sẽ nhận được quyền năng từ mê cung càng lớn, tạo ra những khoảnh khắc lật kèo kinh điển.
<div align="center">
<img src="https://raw.githubusercontent.com/andreasbm/readme/master/assets/lines/rainbow.png" width="100%" height="2px" style="filter: grayscale(100%) contrast(200%) sepia(100%) hue-rotate(300deg) saturate(500%);">
</div>
### <img src="https://api.iconify.design/lucide/trending-up.svg?color=%23E0E0E0" width="20" height="20" style="vertical-align: middle;"> Phân tầng Buff theo Chuỗi Thua (Tiered Progression)
> Để duy trì trạng thái **"Căng thẳng tột độ" (High-Stakes)** đến những giây phút cuối cùng, kiến trúc của **BABA_YAGA** tích hợp một động cơ cân bằng ngầm mang tên **"Despair Mechanics"**. Khi một thực thể bị đẩy vào chuỗi thất bại liên tiếp, Mê cung sẽ bẻ cong các quy tắc vật lý và logic thông thường để ban cho họ những đặc quyền sinh tồn phi mã, tạo ra những khoảnh khắc lật kèo (Comeback) chấn động mạng lưới.
| Chuỗi Thua | Phân tầng | Tên gọi | Quyền năng & Cơ chế |
| :--- | :--- | :--- | :--- |
| **1 Trận** | Tier 1 | *Awakening* | Chọn 1 Buff cơ bản (Tăng tốc +15% hoặc Mở rộng tầm nhìn +20%). |
| **2 Trận** | Tier 2 | *Evolution* | Nhận 1 Buff chủ động (Kỹ năng nhấn nút) + 1 Buff bị động (Nâng cấp chỉ số). |
| **3+ Trận** | Tier 3 | *Manifestation* | **Ultimate Skill:** Kỹ năng thay đổi luật chơi trong 30s. Mê cung sẽ hỗ trợ bạn trực tiếp. |
<br>
### <img src="https://api.iconify.design/lucide/trending-up.svg?color=%23E0E0E0" width="22" height="22" style="vertical-align: middle;"> Phân tầng Bù trừ theo Chuỗi Thua (Progression Hierarchy)
<table width="100%" border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse; text-align: center;">
<tr>
<td width="33%" style="padding: 15px; background: rgba(255,255,255,0.03); border-right: 2px solid #222; border-radius: 8px 0 0 8px;">
<img src="https://api.iconify.design/lucide/battery-low.svg?color=%23888888" width="32" height="32" /><br><br>
<img src="https://img.shields.io/badge/LOSS_STREAK-1_ROUND-888888?style=flat-square" /><br>
<h3 style="color: #E0E0E0; margin: 10px 0 5px 0;">TIER 1: Awakening</h3>
<p style="font-size: 12px; color: #999;">Khởi động giao thức sinh tồn cơ bản. Lựa chọn 1 Buff thụ động (Nâng cấp chỉ số Base Stats như Tốc độ / Tầm nhìn).</p>
</td>
<td width="33%" style="padding: 15px; background: rgba(255,255,255,0.05); border-right: 2px solid #222;">
<img src="https://api.iconify.design/lucide/battery-medium.svg?color=%23FF8C00" width="32" height="32" /><br><br>
<img src="https://img.shields.io/badge/LOSS_STREAK-2_ROUNDS-FF8C00?style=flat-square" /><br>
<h3 style="color: #FF8C00; margin: 10px 0 5px 0;">TIER 2: Evolution</h3>
<p style="font-size: 12px; color: #999;">Tiến hóa cơ sở hạ tầng. Nhận đồng thời 1 Kỹ năng Chủ động (Active Skill) và 1 Đặc quyền Thụ động (Passive Perk).</p>
</td>
<td width="33%" style="padding: 15px; background: rgba(255,0,0,0.05); border-radius: 0 8px 8px 0;">
<img src="https://api.iconify.design/lucide/battery-warning.svg?color=%23FF0000" width="32" height="32" /><br><br>
<img src="https://img.shields.io/badge/LOSS_STREAK-3+_ROUNDS-FF0000?style=flat-square" /><br>
<h3 style="color: #FF3333; margin: 10px 0 5px 0;">TIER 3: Manifestation</h3>
<p style="font-size: 12px; color: #999;">Ghi đè hệ thống (Override Ruleset). Kích hoạt <strong>Ultimate Skill</strong> thay đổi hoàn toàn cục diện trận đấu trong thời gian ngắn.</p>
</td>
</tr>
</table>
<br>
---
### <img src="https://api.iconify.design/lucide/run.svg?color=%23E0E0E0" width="20" height="20" style="vertical-align: middle;"> Seeker: Ý chí Sinh tồn (Survival Evolution)
### <img src="https://api.iconify.design/lucide/fingerprint.svg?color=%23FFD700" width="24" height="24" style="vertical-align: middle;"> THE SEEKER: Thức Tỉnh Bản Năng (Survival Evolution)
Khi Seeker liên tục thất bại, các giác quan của họ sẽ tiến hóa vượt bậc để chống lại bóng tối:
Khi Seeker liên tục bị bóng tối nuốt chửng, hệ thần kinh của họ sẽ bị ép buộc tiến hóa vượt giới hạn để chống lại môi trường khắc nghiệt:
* **Tier 1 - Sixth Sense (Linh cảm):** Seeker bắt đầu nghe thấy tiếng tim đập của chính mình nhanh hơn khi Trapper đang ở gần (bán kính 15m), giúp định vị mà không cần nhìn.
* **Tier 2 - Shadow Step (Bước chân hư vô):** Di chuyển hoàn toàn không gây ra tiếng động (Noise Meter = 0) trong 20 giây đầu của trận đấu. Cho phép Seeker thiết lập vị trí an toàn sớm.
* **Tier 2 - Trap Reflex (Phản xạ tột độ):** Seeker có 50% cơ hội tự động vô hiệu hóa bẫy kẹp đầu tiên dẫm phải. Nếu thành công, Seeker sẽ được tăng 50% tốc độ chạy trong 3s.
* **Tier 3 - Ultimate: Chrono Dash:** Trong 15 giây, Seeker có thể thực hiện Dash không giới hạn (No Cooldown) và trở nên miễn nhiễm with mọi loại khống chế. Lúc này, Seeker là kẻ săn lùng lối thoát.
<table width="100%" border="0" cellpadding="0" cellspacing="0" style="border:collapse; border: none;">
<tr>
<td width="25%" style="padding: 12px; border-bottom: 1px solid #333; vertical-align: top;">
<img src="https://img.shields.io/badge/TIER_1-SIXTH_SENSE-FFD700?style=for-the-badge" />
</td>
<td style="padding: 12px; border-bottom: 1px solid #333; vertical-align: top;">
<strong style="color: #E0E0E0;">Acoustic Resonance (Cộng hưởng Hạ âm)</strong><br>
<span style="font-size: 14px; color: #AAA;">Kích hoạt khả năng cảm nhận tần số thấp. Seeker có thể nghe thấy nhịp tim đập dồn dập của chính mình khi Trapper tiến vào bán kính 15m, đóng vai trò như một radar sinh học mà không cần sử dụng thị giác.</span>
</td>
</tr>
<tr>
<td style="padding: 12px; border-bottom: 1px solid #333; vertical-align: top;">
<img src="https://img.shields.io/badge/TIER_2-SHADOW_STEP-FF8C00?style=for-the-badge" />
</td>
<td style="padding: 12px; border-bottom: 1px solid #333; vertical-align: top;">
<strong style="color: #E0E0E0;">Kinematic Void (Bước chân Hư vô)</strong><br>
<span style="font-size: 14px; color: #AAA;">Triệt tiêu hoàn toàn ma sát vật lý. Seeker không phát ra bất kỳ sóng âm nào (Noise Meter = 0) khi di chuyển trong 20 giây đầu tiên, cho phép thiết lập điểm mù chiến thuật (Blindspot) từ sớm.</span>
</td>
</tr>
<tr>
<td style="padding: 12px; border-bottom: 1px solid #333; vertical-align: top;">
<img src="https://img.shields.io/badge/TIER_2-TRAP_REFLEX-FF8C00?style=for-the-badge" />
</td>
<td style="padding: 12px; border-bottom: 1px solid #333; vertical-align: top;">
<strong style="color: #E0E0E0;">Neural Overdrive (Phản xạ Tột độ)</strong><br>
<span style="font-size: 14px; color: #AAA;">Có 50% cơ hội ghi đè (Bypass) cơ chế kích hoạt của bẫy cơ học đầu tiên vô tình chạm phải. Nếu bypass thành công, hệ thống bơm Adrenaline sẽ kích hoạt, cộng dồn 50% vận tốc bứt tốc trong 3 giây.</span>
</td>
</tr>
<tr>
<td style="padding: 12px; background: rgba(255,215,0,0.05); vertical-align: top;">
<img src="https://img.shields.io/badge/ULTIMATE-CHRONO_DASH-FF0000?style=for-the-badge" />
</td>
<td style="padding: 12px; background: rgba(255,215,0,0.05); vertical-align: top;">
<strong style="color: #FFD700; text-transform: uppercase;">Temporal Displacement (Phá vỡ Thời Không)</strong><br>
<span style="font-size: 14px; color: #AAA;">Trong 15 giây, thể lực (Stamina) bị khóa ở mức vô hạn. Seeker có thể <code>Dash</code> liên tục (Zero Cooldown) và đạt trạng thái <strong style="color: #FFF;">I-Frame</strong> (Miễn nhiễm khống chế). Lúc này, luật chơi đảo chiều: Seeker là kẻ săn lùng lối thoát.</span>
</td>
</tr>
</table>
<br>
---
### <img src="https://api.iconify.design/lucide/eye.svg?color=%23E0E0E0" width="20" height="20" style="vertical-align: middle;"> Trapper: Quyền năng Bóng tối (Dark Rituals)
### <img src="https://api.iconify.design/lucide/cpu.svg?color=%23FF3333" width="24" height="24" style="vertical-align: middle;"> THE TRAPPER: Hiến Tế Không Gian (Dark Rituals)
Khi Trapper để xổng mất con mồi, mê cung sẽ hiến tế sự ổn định của nó để ban cho Trapper những quyền năng thao túng cực hạn:
Khi Trapper để mất quyền kiểm soát, Mê cung sẽ tự động phân rã sự ổn định của nó, cấp cho Trapper quyền truy cập vào các giao thức thao túng môi trường cực hạn:
* **Tier 1 - Paranoia Echo (Tiếng vọng ảo giác):** Tự động tạo ra 3 nguồn âm thanh bước chân giả chạy xung quanh Seeker để gây nhiễu loạn khả năng định hướng bằng âm thanh của họ.
* **Tier 2 - Global Blackout (Bóng tối bao trùm):** Kích hoạt khiến đèn pin của Seeker bị nhiễu (Flicker) hoặc tắt hoàn toàn trong 8 giây. Đây là thời điểm vàng để Trapper thu hẹp khoảng cách.
* **Tier 2 - Ghosting (Dịch chuyển không gian):** Trapper nhận khả năng đi xuyên qua các cánh cửa đã bị khóa hoặc các bức tường mỏng (Destructible Walls) trong 15 giây.
* **Tier 3 - Ultimate: Eye of the Abyss:** Hiển thị vị trí thực của Seeker xuyên tường (Wallhack) dưới dạng bóng đen trong 20 giây. Seeker không thể trốn chạy, chỉ có thể cầu nguyện.
<table width="100%" border="0" cellpadding="0" cellspacing="0" style="border:collapse; border: none;">
<tr>
<td width="25%" style="padding: 12px; border-bottom: 1px solid #333; vertical-align: top;">
<img src="https://img.shields.io/badge/TIER_1-PARANOIA_ECHO-FF3333?style=for-the-badge" />
</td>
<td style="padding: 12px; border-bottom: 1px solid #333; vertical-align: top;">
<strong style="color: #E0E0E0;">Aural Hallucination (Nhiễu loạn Nhận thức)</strong><br>
<span style="font-size: 14px; color: #AAA;">Phát xạ 3 luồng tín hiệu âm thanh ảo đa hướng xung quanh Seeker. Các tín hiệu này can thiệp trực tiếp vào hệ thống Spatial Audio, tạo ảo giác về tiếng bước chân dồn dập nhằm đánh sập khả năng định vị của con mồi.</span>
</td>
</tr>
<tr>
<td style="padding: 12px; border-bottom: 1px solid #333; vertical-align: top;">
<img src="https://img.shields.io/badge/TIER_2-GLOBAL_BLACKOUT-FF8C00?style=for-the-badge" />
</td>
<td style="padding: 12px; border-bottom: 1px solid #333; vertical-align: top;">
<strong style="color: #E0E0E0;">Photon Suppression (Triệt tiêu Quang năng)</strong><br>
<span style="font-size: 14px; color: #AAA;">Hấp thụ toàn bộ ánh sáng trong khu vực. Đèn pin của Seeker sẽ bị ép vào trạng thái nhiễu loạn (Flicker) hoặc sập nguồn hoàn toàn trong 8 giây. Đây là khung cửa tử thần (Kill-window) hoàn hảo để thu hẹp khoảng cách.</span>
</td>
</tr>
<tr>
<td style="padding: 12px; border-bottom: 1px solid #333; vertical-align: top;">
<img src="https://img.shields.io/badge/TIER_2-GHOSTING-FF8C00?style=for-the-badge" />
</td>
<td style="padding: 12px; border-bottom: 1px solid #333; vertical-align: top;">
<strong style="color: #E0E0E0;">Quantum Phase (Phi vật chất hóa)</strong><br>
<span style="font-size: 14px; color: #AAA;">Tạm thời vô hiệu hóa Layer Collision của Trapper. Cấp khả năng đi xuyên qua các cánh cửa đã bị khóa mã hoặc các cấu trúc tường mỏng (Destructible Walls) trong 15 giây, bỏ qua mọi rào cản vật lý.</span>
</td>
</tr>
<tr>
<td style="padding: 12px; background: rgba(255,51,51,0.05); vertical-align: top;">
<img src="https://img.shields.io/badge/ULTIMATE-EYE_OF_ABYSS-FF0000?style=for-the-badge" />
</td>
<td style="padding: 12px; background: rgba(255,51,51,0.05); vertical-align: top;">
<strong style="color: #FF3333; text-transform: uppercase;">Abyssal Omniscience (Nhãn quan Lưỡi Hái)</strong><br>
<span style="font-size: 14px; color: #AAA;">Đồng bộ hóa trực tiếp với mạng lưới lõi của mê cung. Render vị trí thời gian thực của Seeker xuyên qua mọi vật cản (Absolute Wallhack) dưới dạng bóng tối (Silhouette) trong 20 giây. Không có góc khuất, không có lối thoát.</span>
</td>
</tr>
</table>

View File

@@ -1,13 +1,80 @@
## <img src="https://api.iconify.design/lucide/rocket.svg?color=%23E0E0E0" width="20" height="20" style="vertical-align: middle;"> Lộ trình Phát triển (Roadmap)
## <img src="https://api.iconify.design/lucide/milestone.svg?color=%2333CCFF" width="28" height="28" style="vertical-align: middle;"> Lộ trình Triển khai (Development Roadmap)
> Tiến trình xây dựng kiến trúc **BABA_YAGA**. Dự án được phát triển theo mô hình Agile, ưu tiên hoàn thiện độ ổn định của lõi Netcode (Networking) trước khi mở rộng các module Meta-game và Visuals.
<br>
<!-- START_UPDATES -->
<!-- Hệ thống tự động cập nhật có thể chèn log vào đây -->
<!-- END_UPDATES -->
- [x] **Phase 1: Foundation**
- [x] Player State Machine (Idle, Move, Run, Jump).
- [x] Maze Generation (Multi-algorithm).
- [x] Photon Fusion Integration.
- [ ] **Phase 2: Gameplay Core**
- [ ] Role Selection (Seeker vs Trapper).
- [ ] Trap Placement System.
- [ ] Sound & Visual Detection (Noise Meter).
<table width="100%" border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse; border: none;">
<!-- ==================== PHASE 1 ==================== -->
<tr>
<td width="40px" align="center" style="vertical-align: top; padding-top: 5px;">
<img src="https://api.iconify.design/lucide/check-circle-2.svg?color=%2300FF55" width="32" height="32" />
<br>
<img src="https://api.iconify.design/lucide/more-vertical.svg?color=%23333333" width="24" height="40" />
</td>
<td style="padding-bottom: 30px; border: none;">
<h3 style="margin: 0; color: #00FF55; text-transform: uppercase;">Phase 1: Architecture Foundation</h3>
<img src="https://img.shields.io/badge/STATUS-DEPLOYED-00FF55?style=flat-square" style="margin-top: 5px; margin-bottom: 12px;"/>
<table border="0" style="border: none; width: 100%;">
<tr>
<td style="border: none; padding: 4px 0;"><img src="https://api.iconify.design/lucide/check.svg?color=%2300FF55" width="16" style="vertical-align: middle;"> <strong style="color: #E0E0E0;">Kinematic State Machine:</strong> Xử lý mượt mà chuỗi trạng thái nội suy (Idle, Move, Sprint, Airborne).</td>
</tr>
<tr>
<td style="border: none; padding: 4px 0;"><img src="https://api.iconify.design/lucide/check.svg?color=%2300FF55" width="16" style="vertical-align: middle;"> <strong style="color: #E0E0E0;">Procedural Generation Engine:</strong> Tích hợp thành công lõi sinh mê cung đa thuật toán (Multi-Algorithm).</td>
</tr>
<tr>
<td style="border: none; padding: 4px 0;"><img src="https://api.iconify.design/lucide/check.svg?color=%2300FF55" width="16" style="vertical-align: middle;"> <strong style="color: #E0E0E0;">Netcode Synchronization:</strong> Khởi tạo thành công mạng lưới Photon Fusion State Sync.</td>
</tr>
</table>
</td>
</tr>
<!-- ==================== PHASE 2 ==================== -->
<tr>
<td width="40px" align="center" style="vertical-align: top; padding-top: 5px;">
<!-- Biểu tượng xoay (Animation mô phỏng trạng thái đang xử lý) -->
<img src="https://api.iconify.design/lucide/loader.svg?color=%23FFD700" width="32" height="32" />
<br>
<img src="https://api.iconify.design/lucide/more-vertical.svg?color=%23333333" width="24" height="40" />
</td>
<td style="padding-bottom: 30px; border: none;">
<h3 style="margin: 0; color: #FFD700; text-transform: uppercase;">Phase 2: Asymmetric Core Loop</h3>
<img src="https://img.shields.io/badge/STATUS-ACTIVE_RUNTIME-FFD700?style=flat-square" style="margin-top: 5px; margin-bottom: 12px;"/>
<table border="0" style="border: none; width: 100%;">
<tr>
<td style="border: none; padding: 4px 0;"><img src="https://api.iconify.design/lucide/circle-dashed.svg?color=%23FFD700" width="16" style="vertical-align: middle;"> <strong style="color: #E0E0E0;">Net-Role Arbitration:</strong> Hệ thống phân quyền và lựa chọn vai trò mạng (Seeker vs Trapper).</td>
</tr>
<tr>
<td style="border: none; padding: 4px 0;"><img src="https://api.iconify.design/lucide/circle-dashed.svg?color=%23FFD700" width="16" style="vertical-align: middle;"> <strong style="color: #E0E0E0;">Spatial Trap Placement:</strong> Xây dựng logic kích hoạt và đặt bẫy dựa trên tọa độ không gian (Grid/Free-form).</td>
</tr>
<tr>
<td style="border: none; padding: 4px 0;"><img src="https://api.iconify.design/lucide/circle-dashed.svg?color=%23FFD700" width="16" style="vertical-align: middle;"> <strong style="color: #E0E0E0;">Acoustic & Visual Matrix:</strong> Thuật toán phát hiện âm thanh (Noise Meter) và triệt tiêu tầm nhìn (Line-of-Sight Culling).</td>
</tr>
</table>
</td>
</tr>
<!-- ==================== PHASE 3 ==================== -->
<tr>
<td width="40px" align="center" style="vertical-align: top; padding-top: 5px;">
<img src="https://api.iconify.design/lucide/lock.svg?color=%23555555" width="28" height="28" />
</td>
<td style="border: none;">
<h3 style="margin: 0; color: #555555; text-transform: uppercase;">Phase 3: Meta-Game & Polish</h3>
<img src="https://img.shields.io/badge/STATUS-LOCKED_ENCRYPTED-222222?style=flat-square" style="margin-top: 5px; margin-bottom: 12px;"/>
<table border="0" style="border: none; width: 100%;">
<tr>
<td style="border: none; padding: 4px 0;"><img src="https://api.iconify.design/lucide/minus.svg?color=%23555555" width="16" style="vertical-align: middle;"> <span style="color: #555;">Tiered Adaptive System (Hệ thống Comeback).</span></td>
</tr>
<tr>
<td style="border: none; padding: 4px 0;"><img src="https://api.iconify.design/lucide/minus.svg?color=%23555555" width="16" style="vertical-align: middle;"> <span style="color: #555;">Advanced Audio HRTF Integration.</span></td>
</tr>
</table>
</td>
</tr>
</table>

View File

@@ -1,35 +1,138 @@
## <img src="https://api.iconify.design/lucide/users.svg?color=%23E0E0E0" width="20" height="20" style="vertical-align: middle;"> Đội ngũ Phát triển & Phân chia Nhiệm vụ (The Team & WBS)
## <img src="https://api.iconify.design/lucide/users-2.svg?color=%2333CCFF" width="28" height="28" style="vertical-align: middle;"> Bộ máy Kỹ thuật (Core Engineering Team & WBS)
Dự án được thực hiện bởi nhóm 3 thành viên với các vai trò chuyên biệt, đảm bảo tính chuyên môn hóa cao trong quy trình sản xuất Game.
> Dự án được phát triển và vận hành bởi một **Micro-Studio 3 thành viên**. Để đạt được chất lượng tiệm cận AAA-Indie trong một thời gian giới hạn, chúng tôi áp dụng mô hình chuyên môn hóa sâu (Deep Specialization) theo từng phân hệ kỹ thuật lõi.
| Thành viên | Vai trò | Trách nhiệm chi tiết (Work Breakdown Structure) |
| :--- | :--- | :--- |
| **Scove** | **Trưởng nhóm / World Architect** | - Nghiên cứu & triển khai thuật toán Maze (Prims, Wilsons, Crawler).<br/>- Thiết kế hệ thống **Mesh Generation** (Tạo tường, sàn, trần tự động).<br/>- Đảm bảo tính **Solvability** (Mê cung luôn có lối thoát khả thi).<br/>- Xây dựng logic **Comeback Đa tầng** (Despair Mechanics).<br/>- Review Code toàn cục & Quản lý kiến trúc State Machine. |
| **Duy** | **Phó nhóm / Lead Network Engineer** | - Quản lý hạ tầng **Photon Fusion** (Matchmaking, Session, Relay).<br/>- Đồng bộ hóa trạng thái mạng (`Networked Properties`) cho bẫy, cửa, đèn.<br/>- Xử lý logic phân vai (Role Assignment) & Điều phối Game State.<br/>- Tối ưu hóa băng thông & Xử lý Reconciliation/Interpolation mạng. |
| **Tuấn** | **Mechanics Developer & Tech Artist** | - Hệ thống **Noise Meter** & Ánh sáng động (Flashlight/Battery System).<br/>- Logic bẫy (Traps): Snare (kẹp), Alarm (báo động), Sound (giả thanh).<br/>- Hệ thống **Camera Dynamics** (FOV Kick, Shake, Tilt, Motion Blur).<br/>- Quản lý hiệu ứng hình ảnh (VFX) & Âm thanh không gian (3D Spatial Audio).<br/>- Thiết kế HUD cho Seeker & Trapper; UI Menu & UX Flow. |
<br>
<!-- TEAM DOSSIERS (BẢNG HỒ SƠ NHÂN SỰ) -->
<table width="100%" border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse; border: none;">
<!-- SCOVE -->
<tr>
<td width="30%" align="center" style="padding: 20px; background: rgba(176,38,255,0.05); border-left: 4px solid #B026FF; border-bottom: 2px solid #222;">
<img src="https://api.iconify.design/lucide/hexagon.svg?color=%23B026FF" width="48" height="48" /><br><br>
<strong style="color: #E0E0E0; font-size: 18px;">SCOVE</strong><br>
<img src="https://img.shields.io/badge/Project_Lead-B026FF?style=flat-square" style="margin-top: 5px;"/><br>
<img src="https://img.shields.io/badge/World_Architect-222222?style=flat-square" style="margin-top: 2px;"/>
</td>
<td width="70%" style="padding: 20px; background: rgba(255,255,255,0.02); border-bottom: 2px solid #222;">
<h4 style="margin: 0 0 10px 0; color: #B026FF;">Phân rã Công việc (Work Breakdown Structure)</h4>
<ul style="color: #AAA; font-size: 14px; margin: 0; padding-left: 15px; line-height: 1.6;">
<li><img src="https://api.iconify.design/lucide/cpu.svg?color=%23B026FF" width="14" style="vertical-align: middle;"> Triển khai kiến trúc thuật toán Maze lõi (Prims, Wilsons, Crawler).</li>
<li><img src="https://api.iconify.design/lucide/box.svg?color=%23B026FF" width="14" style="vertical-align: middle;"> Xây dựng bộ máy <strong>Mesh Generation</strong> kiến tạo môi trường 3D tự động.</li>
<li><img src="https://api.iconify.design/lucide/check-circle.svg?color=%23B026FF" width="14" style="vertical-align: middle;"> Giám sát tính <strong>Solvability</strong> (Đảm bảo Mê cung luôn có đường thoát khả thi).</li>
<li><img src="https://api.iconify.design/lucide/scale.svg?color=%23B026FF" width="14" style="vertical-align: middle;"> Thiết kế toán học cho hệ thống <strong>Comeback Đa tầng</strong> (Despair Mechanics).</li>
<li><img src="https://api.iconify.design/lucide/code-2.svg?color=%23B026FF" width="14" style="vertical-align: middle;"> Code Review toàn cục & Quản lý vòng đời State Machine tổng.</li>
</ul>
</td>
</tr>
<!-- DUY -->
<tr>
<td width="30%" align="center" style="padding: 20px; background: rgba(51,204,255,0.05); border-left: 4px solid #33CCFF; border-bottom: 2px solid #222;">
<img src="https://api.iconify.design/lucide/globe-2.svg?color=%2333CCFF" width="48" height="48" /><br><br>
<strong style="color: #E0E0E0; font-size: 18px;">DUY</strong><br>
<img src="https://img.shields.io/badge/Co--Lead-33CCFF?style=flat-square&color=33CCFF" style="margin-top: 5px;"/><br>
<img src="https://img.shields.io/badge/Network_Engineer-222222?style=flat-square" style="margin-top: 2px;"/>
</td>
<td width="70%" style="padding: 20px; background: rgba(255,255,255,0.01); border-bottom: 2px solid #222;">
<h4 style="margin: 0 0 10px 0; color: #33CCFF;">Phân rã Công việc (Work Breakdown Structure)</h4>
<ul style="color: #AAA; font-size: 14px; margin: 0; padding-left: 15px; line-height: 1.6;">
<li><img src="https://api.iconify.design/lucide/server.svg?color=%2333CCFF" width="14" style="vertical-align: middle;"> Xây dựng & Quản lý hạ tầng <strong>Photon Fusion</strong> (Matchmaking, Session Relay).</li>
<li><img src="https://api.iconify.design/lucide/wifi.svg?color=%2333CCFF" width="14" style="vertical-align: middle;"> Cấu trúc hóa <code>[Networked Properties]</code> cho thực thể động (Bẫy, Cửa, Trạng thái đèn).</li>
<li><img src="https://api.iconify.design/lucide/shield-check.svg?color=%2333CCFF" width="14" style="vertical-align: middle;"> Thiết lập logic phân vai mạng (Role Assignment) và Server Game State.</li>
<li><img src="https://api.iconify.design/lucide/activity.svg?color=%2333CCFF" width="14" style="vertical-align: middle;"> Tối ưu hóa băng thông & Viết thuật toán bù trừ nội suy (Reconciliation/Lerp).</li>
</ul>
</td>
</tr>
<!-- TUẤN -->
<tr>
<td width="30%" align="center" style="padding: 20px; background: rgba(255,51,51,0.05); border-left: 4px solid #FF3333;">
<img src="https://api.iconify.design/lucide/gamepad-2.svg?color=%23FF3333" width="48" height="48" /><br><br>
<strong style="color: #E0E0E0; font-size: 18px;">TUẤN</strong><br>
<img src="https://img.shields.io/badge/Mechanics_Dev-FF3333?style=flat-square" style="margin-top: 5px;"/><br>
<img src="https://img.shields.io/badge/Tech_Artist-222222?style=flat-square" style="margin-top: 2px;"/>
</td>
<td width="70%" style="padding: 20px; background: rgba(255,255,255,0.02);">
<h4 style="margin: 0 0 10px 0; color: #FF3333;">Phân rã Công việc (Work Breakdown Structure)</h4>
<ul style="color: #AAA; font-size: 14px; margin: 0; padding-left: 15px; line-height: 1.6;">
<li><img src="https://api.iconify.design/lucide/volume-2.svg?color=%23FF3333" width="14" style="vertical-align: middle;"> Lập trình hệ thống <strong>Noise Meter</strong> & Quản lý quang năng (Flashlight/Battery).</li>
<li><img src="https://api.iconify.design/lucide/target.svg?color=%23FF3333" width="14" style="vertical-align: middle;"> Xây dựng Logic bẫy Trapper: Snare (Khống chế), Alarm (Báo động), Decoy (Giả thanh).</li>
<li><img src="https://api.iconify.design/lucide/video.svg?color=%23FF3333" width="14" style="vertical-align: middle;"> Phát triển <strong>Camera Dynamics</strong> (FOV Kick, Screen Shake, Tilt, Motion Blur).</li>
<li><img src="https://api.iconify.design/lucide/sparkles.svg?color=%23FF3333" width="14" style="vertical-align: middle;"> Tích hợp 3D Spatial Audio & Hiệu ứng thị giác (VFX) tương tác môi trường.</li>
<li><img src="https://api.iconify.design/lucide/layout-template.svg?color=%23FF3333" width="14" style="vertical-align: middle;"> Thiết kế trải nghiệm HUD & Luồng UI/UX (Menu, State transitions).</li>
</ul>
</td>
</tr>
</table>
<br>
---
## <img src="https://api.iconify.design/lucide/ruler.svg?color=%23E0E0E0" width="20" height="20" style="vertical-align: middle;"> Tiêu chuẩn Kỹ thuật Nâng cao (Non-functional Requirements)
## <img src="https://api.iconify.design/lucide/ruler.svg?color=%23FFD700" width="28" height="28" style="vertical-align: middle;"> Giao thức Chất lượng (Strict Engineering Protocols)
Mỗi thành viên phải tuân thủ nghiêm ngặt các tiêu chuẩn kỹ thuật sau để đảm bảo dự án đạt chất lượng AAA-Indie:
> Bộ tiêu chuẩn **NFR (Non-functional Requirements)** bắt buộc. Mọi dòng code được Commit (Merge Request) đều phải vượt qua bài kiểm tra chéo dựa trên 4 trụ cột kỹ thuật dưới đây.
### <img src="https://api.iconify.design/lucide/globe.svg?color=%23E0E0E0" width="20" height="20" style="vertical-align: middle;"> Networking & Synchronization (Duy)
* **RTT Optimization:** Duy trì Round Trip Time < 150ms; tối ưu hóa kích thước gói tin bằng `[Networked]``Reliable RPCs`.
* **State Authority:** Mọi logic Thắng/Thua và Trigger bẫy phải được xác thực hoàn toàn tại **Server** để ngăn chặn gian lận.
* **Interpolation Smoothing:** Đảm bảo di chuyển của đối thủ (Remote Proxies) mượt mà ngay cả khi mất gói tin (Packet Loss).
<br>
### <img src="https://api.iconify.design/lucide/building-2.svg?color=%23E0E0E0" width="20" height="20" style="vertical-align: middle;"> World Generation & Performance (Scove)
* **Algorithmic Complexity:** Thuật toán tạo mê cung phải đạt hiệu năng O(N) hoặc O(N log N) để tránh treo Editor/Runtime.
* **Draw Call Batching:** Tối ưu hóa Mesh mê cung để đạt mức Draw Calls thấp nhất (Sử dụng Static Batching & GPU Instancing).
* **NavMesh Runtime:** Tự động bake NavMesh sau khi Maze tạo xong để hỗ trợ AI và các tính năng hỗ trợ Trapper.
<!-- BẢNG GRID 2x2 CHO TIÊU CHUẨN KỸ THUẬT -->
<table width="100%" border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse; border: none;">
### <img src="https://api.iconify.design/lucide/binary.svg?color=%23E0E0E0" width="20" height="20" style="vertical-align: middle;"> Gameplay & Physics (Tuấn)
* **Input Latency:** Xử lý Input thông qua `FixedUpdateNetwork` để đồng bộ hoàn hảo với Server Simulation.
* **Physics Matrix:** Tối ưu hóa Collision Matrix; sử dụng Collider đơn giản (Box/Capsule) cho các hành lang mê cung lắt léo.
* **State Integrity:** Mỗi State trong State Machine phải độc lập, không được can thiệp trực tiếp vào biến nội bộ của State khác.
<!-- HÀNG 1 -->
<tr>
<!-- CỘT 1: NETWORKING -->
<td width="50%" style="padding: 15px; background: rgba(51,204,255,0.02); border-right: 2px solid #222; border-bottom: 2px solid #222;">
<h3 style="margin: 0 0 10px 0; color: #33CCFF;">
<img src="https://api.iconify.design/lucide/network.svg?color=%2333CCFF" width="20" style="vertical-align: middle;"> Net-Sync <i>(Assigned to: Duy)</i>
</h3>
<div style="font-size: 13px; color: #AAA; line-height: 1.6;">
<strong style="color: #E0E0E0;">» RTT Optimization:</strong> Duy trì Round Trip Time < 150ms. Tối ưu kích thước Payload mạng qua <code>[Networked]</code> và <code>Reliable RPCs</code>.<br>
<strong style="color: #E0E0E0;">» Absolute Server Auth:</strong> Mọi logic Thắng/Thua, Gây sát thương, Kích hoạt bẫy <b>bắt buộc</b> phải được xác thực trên Server để chống Hack/Desync.<br>
<strong style="color: #E0E0E0;">» Proxy Smoothing:</strong> Nội suy (Interpolate) chuyển động của Remote Players để bù đắp hiện tượng Jitter do Packet Loss.
</div>
</td>
### <img src="https://api.iconify.design/lucide/palette.svg?color=%23E0E0E0" width="20" height="20" style="vertical-align: middle;"> Visuals & UI/UX (Tuấn)
* **Rendering (Unity 6):** Tận dụng **URP (Universal Render Pipeline)** và Render Graph để tạo hiệu ứng bóng tối chất lượng cao.
* **Asset Compression:** Texture sử dụng chuẩn nén ASTC/DXT5; Mesh polycount tối ưu cho môi trường di động và PC tầm trung.
* **UX Consistency:** Tín hiệu phản hồi (VFX/SFX/Haptic) phải nhất quán để người chơi nhận biết ngay lập tức các sự kiện trong game.
<!-- CỘT 2: WORLD GEN -->
<td width="50%" style="padding: 15px; background: rgba(176,38,255,0.02); border-bottom: 2px solid #222;">
<h3 style="margin: 0 0 10px 0; color: #B026FF;">
<img src="https://api.iconify.design/lucide/layers.svg?color=%23B026FF" width="20" style="vertical-align: middle;"> World & Perf <i>(Assigned to: Scove)</i>
</h3>
<div style="font-size: 13px; color: #AAA; line-height: 1.6;">
<strong style="color: #E0E0E0;">» Algorithmic Constraints:</strong> Thuật toán tạo hình mê cung phải bị giới hạn ở độ phức tạp <code>O(N)</code> hoặc <code>O(N log N)</code> tránh chặn luồng Main Thread.<br>
<strong style="color: #E0E0E0;">» Draw Call Budget:</strong> Mesh mê cung sau khi sinh ra phải gộp (Static Batching / GPU Instancing) để giữ số lượng Draw Calls ở mức vi mô.<br>
<strong style="color: #E0E0E0;">» Dynamic NavMesh:</strong> Bake tự động NavMesh <i>tại Runtime</i> sau khi chốt Seed mê cung, phục vụ AI Trapper hoặc kỹ năng đặc biệt.
</div>
</td>
</tr>
<!-- HÀNG 2 -->
<tr>
<!-- CỘT 3: GAMEPLAY -->
<td width="50%" style="padding: 15px; background: rgba(255,51,51,0.02); border-right: 2px solid #222;">
<h3 style="margin: 0 0 10px 0; color: #FF3333;">
<img src="https://api.iconify.design/lucide/swords.svg?color=%23FF3333" width="20" style="vertical-align: middle;"> Mechanics <i>(Assigned to: Tuấn)</i>
</h3>
<div style="font-size: 13px; color: #AAA; line-height: 1.6;">
<strong style="color: #E0E0E0;">» Deterministic Input:</strong> Polling Input phải được dời vào hàm <code>FixedUpdateNetwork</code> để đồng bộ hoàn hảo với Tickrate của Server.<br>
<strong style="color: #E0E0E0;">» Physics Matrix:</strong> Quy hoạch chặt chẽ Layer Collision Matrix. Khuyến khích dùng Box/Capsule Colliders cho môi trường lắt léo để giảm tải CPU.<br>
<strong style="color: #E0E0E0;">» FSM Integrity:</strong> Mỗi State trong Kinematic FSM là một Sandbox độc lập, nghiêm cấm tiêm/thay đổi biến (Mutate) chéo giữa các trạng thái.
</div>
</td>
<!-- CỘT 4: VISUALS -->
<td width="50%" style="padding: 15px; background: rgba(255,215,0,0.02);">
<h3 style="margin: 0 0 10px 0; color: #FFD700;">
<img src="https://api.iconify.design/lucide/palette.svg?color=%23FFD700" width="20" style="vertical-align: middle;"> Render & UX <i>(Assigned to: Tuấn)</i>
</h3>
<div style="font-size: 13px; color: #AAA; line-height: 1.6;">
<strong style="color: #E0E0E0;">» URP 6.0 Pipeline:</strong> Khai thác tối đa Render Graph của Unity 6 để tạo ra Light-baking & Shadow-mapping chân thực cao với chi phí thấp.<br>
<strong style="color: #E0E0E0;">» Asset Compression:</strong> Chuẩn hóa mọi Texture về định dạng ASTC/DXT5. Polycount phải được kiểm duyệt khắt khe cho PC tầm trung.<br>
<strong style="color: #E0E0E0;">» UX Consistency:</strong> Các phản hồi thị giác/thính giác (Máu me, Cảnh báo bẫy, Tiếng tim đập) phải đồng nhất về cường độ, tạo phản xạ có điều kiện cho User.
</div>
</td>
</tr>
</table>

View File

@@ -1,48 +1,93 @@
## 📂 Cấu trúc Thư mục Dự án (Project Folder Structure)
## <img src="https://api.iconify.design/lucide/folder-tree.svg?color=%2333CCFF" width="28" height="28" style="vertical-align: middle;"> Cấu trúc Thư mục (Workspace Architecture)
Dự án được tổ chức theo tiêu chuẩn công nghiệp (Standard Industry Practices), tách biệt rõ ràng giữa logic Code, Assets và Configuration.
> Cấu trúc không gian làm việc của **BABA_YAGA** tuân thủ nghiêm ngặt mô hình **Quy chuẩn Công nghiệp (Standard Industry Practices)**. Sự phân tách rạch ròi giữa Dữ liệu tĩnh (Assets), Lõi Logic (Core Scripts) và Cấu hình hệ thống (Configs) đảm bảo khả năng mở rộng (Scalability) và triệt tiêu Conflict khi làm việc nhóm.
```text
📦 BABA_YAGA
├── 🌸 Assets/ (Trái tim của trò chơi)
│ ├── 📜 Scripts/ (Phép thuật điều khiển logic)
│ │ ├── 🏷️ Attributes/ # Tùy biến Inspector
│ │ ├── 🎥 Camera Controller/
│ │ ├── 🛠️ Debug/
│ │ ├── 🌐 Fusion/
│ │ │ └── 🚀 BasicSpawner.cs
│ │ ├── 🏗️ GameSetup/
│ │ │ ├── 🌀 Maze/ # Mê cung
│ │ │ │ ├── 🐾 Crawler.cs
│ │ │ │ ├── 🌳 Prims.cs
│ │ │ │ ├── 🧵 Wilsons.cs
│ │ │ │ └── 🗺️ Maze.cs
│ │ │ └── 🧍 CharacterAutoSetup.cs
│ │ ├── 鼠标 Interactables/
│ │ │ ├── 🚪 DoorInteractable.cs
│ │ │ ├── 💡 LampInteractable.cs
│ │ │ └── 💎 BaseInteractable.cs
│ │ ├── 📐 Interface/
│ │ ├── 🏃‍♀️ Player Controller/
│ │ │ ├── 🧠 PlayerStateMachine.cs
│ │ │ ├── ⌨️ InputReader.cs
│ │ │ └── 🎭 States/
│ │ ├── ⚡ Optimization/
│ │ ├── 🖥️ UI/
│ │ └── 🎆 VFX/
│ ├── 🧸 Prefabs/
│ ├── 📖 document/
│ ├── 🎬 Scenes/
│ ├── 🎨 Materials/
│ ├── 👸 Models/
│ ├── 💃 Animation/
│ ├── 🔌 Photon/
│ ├── 🅰️ TextMesh Pro/
│ └── ⚙️ Settings/
├── 🛠️ ProjectSettings/
│ ├── 🏷️ TagManager.asset
│ ├── 🌍 DynamicsManager.asset
│ └── 📡 MultiplayerManager.asset
├── 📦 Packages/
└── 📝 README.md # Creator (。•̀ᴗ-)✧
```
<br>
<div style="background: rgba(0,0,0,0.15); padding: 20px; border-radius: 8px; border: 1px solid rgba(255,255,255,0.05); font-family: monospace; line-height: 2.2;">
<img src="https://api.iconify.design/lucide/box.svg?color=%23E0E0E0" width="18" style="vertical-align: middle;"> **BABA_YAGA_PROJECT/**
&nbsp;&nbsp;&nbsp;&nbsp;<img src="https://api.iconify.design/lucide/folder-open.svg?color=%2333CCFF" width="16" style="vertical-align: middle;"> **Assets/** <span style="color: #888; font-size: 13px;"><i>— Trái tim của trò chơi</i></span>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img src="https://api.iconify.design/lucide/code-2.svg?color=%2333CCFF" width="16" style="vertical-align: middle;"> **Scripts/** <span style="color: #888; font-size: 13px;"><i>— Phép thuật điều khiển logic</i></span>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img src="https://api.iconify.design/lucide/tags.svg?color=%2333CCFF" width="16" style="vertical-align: middle;"> **Attributes/** <span style="color: #666; font-size: 12px;">(Tùy biến Inspector)</span>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img src="https://api.iconify.design/lucide/video.svg?color=%2333CCFF" width="16" style="vertical-align: middle;"> **Camera Controller/**
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img src="https://api.iconify.design/lucide/bug.svg?color=%2333CCFF" width="16" style="vertical-align: middle;"> **Debug/**
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img src="https://api.iconify.design/lucide/network.svg?color=%2333CCFF" width="16" style="vertical-align: middle;"> **Fusion/**
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img src="https://api.iconify.design/lucide/file-code-2.svg?color=%2300FF55" width="14" style="vertical-align: middle;"> `BasicSpawner.cs`
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img src="https://api.iconify.design/lucide/settings-2.svg?color=%2333CCFF" width="16" style="vertical-align: middle;"> **GameSetup/**
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img src="https://api.iconify.design/lucide/git-merge.svg?color=%2333CCFF" width="16" style="vertical-align: middle;"> **Maze/** <span style="color: #666; font-size: 12px;">(Thuật toán Mê cung)</span>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img src="https://api.iconify.design/lucide/file-code-2.svg?color=%2300FF55" width="14" style="vertical-align: middle;"> `Maze.cs`
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img src="https://api.iconify.design/lucide/file-code-2.svg?color=%2300FF55" width="14" style="vertical-align: middle;"> `Crawler.cs`
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img src="https://api.iconify.design/lucide/file-code-2.svg?color=%2300FF55" width="14" style="vertical-align: middle;"> `Prims.cs`
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img src="https://api.iconify.design/lucide/file-code-2.svg?color=%2300FF55" width="14" style="vertical-align: middle;"> `Wilsons.cs`
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img src="https://api.iconify.design/lucide/file-code-2.svg?color=%2300FF55" width="14" style="vertical-align: middle;"> `CharacterAutoSetup.cs`
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img src="https://api.iconify.design/lucide/mouse-pointer-click.svg?color=%2333CCFF" width="16" style="vertical-align: middle;"> **Interactables/**
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img src="https://api.iconify.design/lucide/file-code-2.svg?color=%2300FF55" width="14" style="vertical-align: middle;"> `BaseInteractable.cs`
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img src="https://api.iconify.design/lucide/file-code-2.svg?color=%2300FF55" width="14" style="vertical-align: middle;"> `DoorInteractable.cs`
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img src="https://api.iconify.design/lucide/file-code-2.svg?color=%2300FF55" width="14" style="vertical-align: middle;"> `LampInteractable.cs`
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img src="https://api.iconify.design/lucide/braces.svg?color=%2333CCFF" width="16" style="vertical-align: middle;"> **Interface/**
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img src="https://api.iconify.design/lucide/zap.svg?color=%2333CCFF" width="16" style="vertical-align: middle;"> **Optimization/**
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img src="https://api.iconify.design/lucide/gamepad-2.svg?color=%2333CCFF" width="16" style="vertical-align: middle;"> **Player Controller/**
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img src="https://api.iconify.design/lucide/file-code-2.svg?color=%2300FF55" width="14" style="vertical-align: middle;"> `PlayerStateMachine.cs`
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img src="https://api.iconify.design/lucide/file-code-2.svg?color=%2300FF55" width="14" style="vertical-align: middle;"> `InputReader.cs`
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img src="https://api.iconify.design/lucide/layers.svg?color=%2333CCFF" width="16" style="vertical-align: middle;"> **States/**
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img src="https://api.iconify.design/lucide/layout-template.svg?color=%2333CCFF" width="16" style="vertical-align: middle;"> **UI/**
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img src="https://api.iconify.design/lucide/sparkles.svg?color=%2333CCFF" width="16" style="vertical-align: middle;"> **VFX/**
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img src="https://api.iconify.design/lucide/archive.svg?color=%2333CCFF" width="16" style="vertical-align: middle;"> **Prefabs/**
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img src="https://api.iconify.design/lucide/book-open.svg?color=%2333CCFF" width="16" style="vertical-align: middle;"> **document/**
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img src="https://api.iconify.design/lucide/film.svg?color=%2333CCFF" width="16" style="vertical-align: middle;"> **Scenes/**
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img src="https://api.iconify.design/lucide/palette.svg?color=%2333CCFF" width="16" style="vertical-align: middle;"> **Materials/**
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img src="https://api.iconify.design/lucide/shapes.svg?color=%2333CCFF" width="16" style="vertical-align: middle;"> **Models/**
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img src="https://api.iconify.design/lucide/activity.svg?color=%2333CCFF" width="16" style="vertical-align: middle;"> **Animation/**
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img src="https://api.iconify.design/lucide/plug.svg?color=%2333CCFF" width="16" style="vertical-align: middle;"> **Photon/**
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img src="https://api.iconify.design/lucide/type.svg?color=%2333CCFF" width="16" style="vertical-align: middle;"> **TextMesh Pro/**
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img src="https://api.iconify.design/lucide/settings.svg?color=%2333CCFF" width="16" style="vertical-align: middle;"> **Settings/**
&nbsp;&nbsp;&nbsp;&nbsp;<img src="https://api.iconify.design/lucide/wrench.svg?color=%2333CCFF" width="16" style="vertical-align: middle;"> **ProjectSettings/**
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img src="https://api.iconify.design/lucide/file-json.svg?color=%23FFD700" width="14" style="vertical-align: middle;"> `TagManager.asset`
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img src="https://api.iconify.design/lucide/file-json.svg?color=%23FFD700" width="14" style="vertical-align: middle;"> `DynamicsManager.asset`
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img src="https://api.iconify.design/lucide/file-json.svg?color=%23FFD700" width="14" style="vertical-align: middle;"> `MultiplayerManager.asset`
&nbsp;&nbsp;&nbsp;&nbsp;<img src="https://api.iconify.design/lucide/package.svg?color=%2333CCFF" width="16" style="vertical-align: middle;"> **Packages/**
&nbsp;&nbsp;&nbsp;&nbsp;<img src="https://api.iconify.design/lucide/file-text.svg?color=%23E0E0E0" width="14" style="vertical-align: middle;"> `README.md` <span style="color: #666; font-size: 12px;">— Creator (。•̀ᴗ-)✧</span>
</div>

View File

@@ -1,73 +1,113 @@
## <img src="https://api.iconify.design/lucide/handshake.svg?color=%23E0E0E0" width="20" height="20" style="vertical-align: middle;"> Hướng dẫn Cài đặt & Khởi chạy (Installation & Setup)
## <img src="https://api.iconify.design/lucide/terminal-square.svg?color=%2333CCFF" width="28" height="28" style="vertical-align: middle;"> Giao thức Triển khai (Deployment Protocol)
Để trải nghiệm **BABA_YAGA** một cách mượt mà nhất, vui lòng thực hiện theo các bước chi tiết dưới đây:
> Hướng dẫn thiết lập môi trường phát triển và kết nối mạng lưới cho **BABA_YAGA**. Khuyến nghị sử dụng công cụ **ParrelSync** để tối ưu hóa quy trình kiểm thử Multiplayer (Mô phỏng Host/Client) ngay trên một Editor duy nhất.
### 1. Yêu cầu Hệ thống
* **Unity Editor:** Phiên bản **6000.3.10f1 (Unity 6)** trở lên.
* **Hệ điều hành:** Windows 10/11 hoặc macOS (M1/M2/Intel).
* **Disk Space:** Tối thiểu 5GB trống để chứa Project và Library.
<br>
### 2. Tải về & Mở dự án
1. **Clone Repository:**
```bash
git clone https://github.com/OnlyScove/BABA_YAGA.git
```
2. Mở **Unity Hub**, chọn **Add** -> **Add project from disk**.
3. Tìm đến thư mục vừa clone và nhấn **Open**. Chờ Unity Hub tải các Packages cần thiết (có thể mất vài phút).
<!-- SYSTEM REQUIREMENTS TABLE -->
<table width="100%" border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse; border: none;">
<tr>
<td width="33%" align="center" style="padding: 15px; background: rgba(255,255,255,0.02); border-right: 1px solid rgba(255,255,255,0.05); border-radius: 8px 0 0 8px;">
<img src="https://api.iconify.design/lucide/cpu.svg?color=%23888888" width="24" style="vertical-align: middle;"><br><br>
<strong style="color: #E0E0E0;">Engine Core</strong><br>
<span style="color: #33CCFF; font-size: 13px;">Unity 6000.3.10f1+</span>
</td>
<td width="33%" align="center" style="padding: 15px; background: rgba(255,255,255,0.02); border-right: 1px solid rgba(255,255,255,0.05);">
<img src="https://api.iconify.design/lucide/monitor.svg?color=%23888888" width="24" style="vertical-align: middle;"><br><br>
<strong style="color: #E0E0E0;">Architecture</strong><br>
<span style="color: #E0E0E0; font-size: 13px;">Win 10/11 | macOS (M/Intel)</span>
</td>
<td width="33%" align="center" style="padding: 15px; background: rgba(255,255,255,0.02); border-radius: 0 8px 8px 0;">
<img src="https://api.iconify.design/lucide/hard-drive.svg?color=%23888888" width="24" style="vertical-align: middle;"><br><br>
<strong style="color: #E0E0E0;">Storage Budget</strong><br>
<span style="color: #E0E0E0; font-size: 13px;">~5.0 GB (Repo + Library)</span>
</td>
</tr>
</table>
### 3. Cấu hình Photon Fusion (Bắt buộc)
Trò chơi yêu cầu **AppID** hợp lệ để hoạt động qua mạng:
1. Đăng nhập vào [Photon Engine Dashboard](https://dashboard.photonengine.com/).
2. Tạo một ứng dụng mới với loại App là **Fusion**.
3. Sao chép **App ID** vừa tạo.
4. Trong Unity Editor, đi đến: `Photon` -> `Fusion` -> `Network Project Settings`.
5. Dán App ID vào mục **App Id Fusion** (cho cả Realtime và Fusion).
6. Đảm bảo **Network Mode** được đặt là `Client/Server` (để hỗ trợ State Authority).
<br>
### 4. Khởi chạy Trò chơi
1. Mở Scene chính tại: `Assets/Scenes/Main Scene.unity`.
2. Sử dụng **Smart Bootstrapper** (nằm ở thanh Menu trên cùng) để tự động cấu hình Runner.
3. Nhấn nút **Play** trong Unity Editor.
4. Để test Multiplayer, bạn có thể build ra file `.exe` hoặc sử dụng công cụ **ParrelSync** (nếu đã cài) để chạy hai instance cùng lúc.
### <img src="https://api.iconify.design/lucide/download-cloud.svg?color=%23E0E0E0" width="22" height="22" style="vertical-align: middle;"> 1. Khởi tạo Không gian mạng (Repository Clone)
---
```bash
# Clone mã nguồn dự án từ kho lưu trữ chính thức
git clone https://github.com/OnlyScove/BABA_YAGA.git
## <img src="https://api.iconify.design/lucide/heart.svg?color=%23E0E0E0" width="20" height="20" style="vertical-align: middle;"> Support & Community
Mở Unity Hub ➝ Chọn Add ➝ Add project from disk.
Trỏ đường dẫn đến thư mục BABA_YAGA vừa clone. Lần chạy đầu tiên (Import Asset Pipeline & Library) có thể mất từ 3 - 5 phút.
```
<br>
<img src="https://api.iconify.design/lucide/key.svg?color=%23FFD700" width="22" height="22" style="vertical-align: middle;"> 2. Khớp mã Máy chủ Photon (Fusion AppID Config)
<table width="100%" border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse; border: none; margin-top: 10px;">
<tr>
<td width="60px" align="center" style="background: rgba(255, 215, 0, 0.1); border-left: 3px solid #FFD700; border-radius: 0;">
<img src="https://api.iconify.design/lucide/shield-alert.svg?color=%23FFD700" width="28" height="28">
</td>
<td style="padding: 12px 15px; background: rgba(255,255,255,0.02);">
<p style="margin: 0 0 8px 0; color: #E0E0E0; font-size: 14px;">Trò chơi yêu cầu kết nối đến cụm máy chủ Relay của Photon để xử lý State Sync. Bạn bắt buộc phải cung cấp một AppID hợp lệ:</p>
<ol style="margin: 0; padding-left: 20px; color: #AAA; font-size: 13px; line-height: 1.6;">
<li>Truy cập và đăng nhập vào <a href="https://dashboard.photonengine.com/" style="color: #FFD700; text-decoration: none;">Photon Engine Dashboard</a>.</li>
<li>Khởi tạo một Application mới (Loại App: <b>Fusion</b>) và sao chép mã <b>App ID</b>.</li>
<li>Trong Unity Editor, điều hướng tới: <code>Tools ➝ Photon ➝ Fusion ➝ Network Project Settings</code>.</li>
<li>Dán App ID vào trường <b>App Id Fusion</b> (Áp dụng cho cả Realtime & Fusion).</li>
<li>Đảm bảo <b>Network Mode</b> được thiết lập là <code>Client/Server</code> để bật tính năng State Authority.</li>
</ol>
</td>
</tr>
</table>
<br>
<img src="https://api.iconify.design/lucide/play-circle.svg?color=%2300FF55" width="22" height="22" style="vertical-align: middle;"> 3. Khởi chạy Trình mô phỏng (Launch Simulation)
Mở Scene trung tâm tại: Assets/Scenes/Main Scene.unity.
Nhấp vào Smart Bootstrapper (Nằm trên thanh Menu Top-bar của Unity) để tự động hóa quy trình tiêm (Inject) cấu hình Network Runner.
Nhấn nút Play <img src="https://api.iconify.design/lucide/play.svg?color=%2300FF55" width="14" style="vertical-align: middle;"> trong Editor.
Để test thực tế: Khuyến nghị Build ra file .exe độc lập, hoặc sử dụng hệ thống ParrelSync Clone Editor để chạy 2 Instances song song.
<div align="center">
<img src="https://api.iconify.design/lucide/radio-tower.svg?color=%23B026FF" width="28" height="28" style="vertical-align: middle;"> Trung tâm Tín hiệu (Community & Support)
<p align="center">
<a href="https://github.com/scove303">
<img src="https://img.shields.io/github/stars/OnlyScove/BABA_YAGA?style=for-the-badge&logo=github&color=yellow" alt="Stars">
</a>
<a href="https://scove-vault.duckdns.org/scove">
<img src="https://img.shields.io/github/forks/OnlyScove/BABA_YAGA?style=for-the-badge&logo=github&color=blue" alt="Forks">
</a>
<a href="https://scove-vault.duckdns.org/scove">
<img src="https://img.shields.io/github/followers/OnlyScove?style=for-the-badge&logo=github&color=green" alt="Follow">
</a>
<a href="https://github.com/OnlyScove/BABA_YAGA">
<img src="https://img.shields.io/github/stars/OnlyScove/BABA_YAGA?style=for-the-badge&logo=github&color=FFD700" alt="Stars">
</a>
<a href="https://scove-vault.duckdns.org/scove">
<img src="https://img.shields.io/github/forks/OnlyScove/BABA_YAGA?style=for-the-badge&logo=git&color=33CCFF" alt="Forks">
</a>
<a href="https://scove-vault.duckdns.org/scove">
<img src="https://img.shields.io/github/followers/OnlyScove?style=for-the-badge&logo=github&color=00FF55" alt="Follow">
</a>
</p>
<p align="center">
<a href="https://www.buymeacoffee.com/yourname">
<img src="https://img.shields.io/badge/Buy%20Me%20A%20Coffee-Donate-orange?style=for-the-badge&logo=buy-me-a-coffee&logoColor=white" alt="Buy Me A Coffee">
</a>
<a href="https://discord.gg/4xCYJvF4S2">
<img src="https://img.shields.io/badge/Discord-Join%20Community-7289DA?style=for-the-badge&logo=discord&logoColor=white" alt="Discord">
</a>
<a href="https://ko-fi.com/yourname">
<img src="https://img.shields.io/badge/Ko--fi-Support-red?style=for-the-badge&logo=ko-fi&logoColor=white" alt="Ko-fi">
</a>
<a href="https://discord.gg/4xCYJvF4S2">
<img src="https://img.shields.io/badge/COMMUNITY-DISCORD_SERVER-5865F2?style=for-the-badge&logo=discord&logoColor=white" alt="Discord">
</a>
<a href="https://ko-fi.com/yourname">
<img src="https://img.shields.io/badge/SUPPORT_US-KO--FI-FF5E5B?style=for-the-badge&logo=ko-fi&logoColor=white" alt="Ko-fi">
</a>
<a href="https://www.buymeacoffee.com/yourname">
<img src="https://img.shields.io/badge/DONATE-BUY_ME_A_COFFEE-FFDD00?style=for-the-badge&logo=buy-me-a-coffee&logoColor=black" alt="Buy Me A Coffee">
</a>
</p>
<br>
<img src="https://scove-vault.duckdns.org/files/share/hARx-n28" alt="Network Visitors" style="border-radius: 4px; opacity: 0.8;">
<br><br>
<!-- SEPARATOR LINE -->
<img src="https://raw.githubusercontent.com/andreasbm/readme/master/assets/lines/rainbow.png" width="80%" height="2px" style="filter: grayscale(100%) contrast(200%) sepia(100%) hue-rotate(300deg) saturate(500%);">
<p align="center">
<img src="https://scove-vault.duckdns.org/files/share/hARx-n28" alt="Visitors">
</p>
<br><br>
<!-- BRANDING FOOTER -->
<img src="https://api.iconify.design/lucide/fingerprint.svg?color=%23555555" width="48" height="48" />
<br>
<strong style="color: #E0E0E0; font-size: 16px; letter-spacing: 2px;">© 2026 SCOVANIA STUDIOS</strong>
<br>
<i style="color: #888; font-size: 13px;">"Baba_Yaga is more than a game, it's a social experiment."</i>
---
**© 2026 SCOVANIA STUDIOS.**
*Baba_Yaga is more than a game, it's a social experiment.*
---
**Connect with us:**
[![Twitter](https://img.shields.io/badge/Twitter-1DA1F2?style=for-the-badge&logo=twitter&logoColor=white)](https://x.com/Scovy303)
<br><br>
<a href="https://x.com/Scovy303">
<img src="https://img.shields.io/badge/DIRECTOR-@SCOVY303-000000?style=for-the-badge&logo=x&logoColor=white" alt="X/Twitter">
</a>
</div>
```

View File

@@ -397,6 +397,40 @@ Khi Trapper để xổng mất con mồi, mê cung sẽ hiến tế sự ổn đ
## <img src="https://api.iconify.design/lucide/rocket.svg?color=%23E0E0E0" width="20" height="20" style="vertical-align: middle;"> Lộ trình Phát triển (Roadmap)
<!-- START_UPDATES -->
| Category | Task | Status | Progress | Notes |
| :--- | :--- | :--- | :--- | :--- |
| **** | Phase 1: Game Concept & Design | `` | `` | |
| **** | 1.1 | `Finalize Game Concept & Gameplay Direction` | `TEAM` | 15/05/2026 |
| **** | 1.3 | `Design UI Style, Horror Theme & Moodboard` | `Phương` | 18/05/2026 |
| **** | 1.4 | `Prototype Maze Layout & Environment Concept` | `Phương` | 20/05/2026 |
| **** | 1.5 | `Plan Multiplayer Structure & Networking Logic` | `Duy,Phương` | 24/05/2026 |
| **** | Phase 2: Core Multiplayer & Player Systems | `` | `` | |
| **** | 2.1 | `Setup Unity Project & Fusion Multiplayer` | `Phương` | 01/06/2026 |
| **** | 2.2 | `Develop Lobby System & Room Management` | `Phương` | 04/06/2026 |
| **** | 2.3 | `Develop Online Connection & Matchmaking` | `Phương` | 08/06/2026 |
| **** | 2.4 | `Develop Player Spawn & Synchronization` | `Duy,Phương` | 10/06/2026 |
| **** | 2.5 | `Develop Random Role Assignment (Seeker / Runner)` | `Duy` | 14/06/2026 |
| **** | 2.6 | `Develop Character Movement System` | `Tuấn` | 15/06/2026 |
| **** | 2.7 | `Develop Camera & Flashlight System` | `Tuấn` | 18/06/2026 |
| **** | 2.8 | `Develop Environment Interaction System` | `Tuấn` | 22/06/2026 |
| **** | Phase 3: Gameplay Features & Environment | `` | `` | |
| **** | 3.1 | `Develop Trap System` | `Duy` | 01/07/2026 |
| **** | 3.2 | `Develop Item System (Battery, Mini Map, Buffs)` | `Duy` | 05/07/2026 |
| **** | 3.3 | `Develop Gameplay Mechanics & Match Flow` | `Duy, Tuấn` | 10/07/2026 |
| **** | 3.4 | `Develop Maze Generation System` | `Duy` | 01/07/2026 |
| **** | 3.5 | `Design Environment Assets & Maze Details` | `Tuấn` | 10/07/2026 |
| **** | 3.6 | `Implement Horror Lighting & Fog Effects` | `Phương` | 18/07/2026 |
| **** | 3.7 | `Develop UI HUD & Ingame Interface` | `Phương` | 15/07/2026 |
| **** | 3.8 | `Develop Win/Lose Screen & Match Result UI` | `Phương` | 24/07/2026 |
| **** | Phase 4: Polish, Testing & Finalization | `` | `` | |
| **** | 4.1 | `Integrate Sound Effects & Background Music` | `Tuấn` | 01/08/2026 |
| **** | 4.2 | `Multiplayer Testing & Synchronization Check` | `Tuấn` | 04/08/2026 |
| **** | 4.3 | ![Bug](https://img.shields.io/badge/-FIXING-d73a49?style=flat-square) | `Duy,Phương` | 07/08/2026 |
| **** | 4.4 | `UI Polish & Optimization` | `Phương` | 09/08/2026 |
| **** | 4.5 | `Create Game Design Document (GDD)` | `Duy,Phương` | 09/08/2026 |
| **** | 4.6 | `Final Build, Demo & Presentation Preparation` | `TEAM` | 12/08/2026 |
<!-- END_UPDATES -->
- [x] **Phase 1: Foundation**