[G1-Sync] Manual knowledge update
This commit is contained in:
@@ -2,132 +2,187 @@
|
||||
id: wiki-2026-0508-combat-timeline-difficulty-scali
|
||||
title: Combat Timeline Difficulty Scaling
|
||||
category: 10_Wiki/Topics
|
||||
status: needs_review
|
||||
status: verified
|
||||
canonical_id: self
|
||||
aliases: []
|
||||
aliases: [Combat Difficulty Curve, Encounter Scaling, Dynamic Difficulty Adjustment]
|
||||
duplicate_of: none
|
||||
source_trust_level: A
|
||||
confidence_score: 0.92
|
||||
tags: [uncategorized]
|
||||
source_trust_level: B
|
||||
confidence_score: 0.85
|
||||
verification_status: applied
|
||||
tags: [game-design, combat, difficulty, ddа, encounter]
|
||||
raw_sources: []
|
||||
last_reinforced: 2026-05-08
|
||||
last_reinforced: 2026-05-10
|
||||
github_commit: pending
|
||||
inferred_by: Claude Opus 4.7 (auto-normalize 2026-05-08)
|
||||
tech_stack:
|
||||
language: unspecified
|
||||
framework: unspecified
|
||||
language: C#/Python
|
||||
framework: Game-engine-agnostic
|
||||
---
|
||||
|
||||
# 📈 Combat Timeline & Difficulty Scaling (전투 타임라인 및 난이도 조절 시스템)
|
||||
# Combat Timeline Difficulty Scaling
|
||||
|
||||
> **카테고리**: Skybound, Game Design, Software Architecture
|
||||
> **상태**: 🔵 구현 완료 (Implemented)
|
||||
> **최종 업데이트**: 2026-04-22
|
||||
## 매 한 줄
|
||||
> **"매 combat encounter 의 매력 = 매 player skill 곡선과 challenge 곡선의 일치 (flow channel)."**. 매 timeline-based scaling 은 encounter 의 시작/중반/끝 phase 별로 enemy 능력을 progress 시키며, 매 player metric (DPS, HP%, time-to-kill) 을 feedback 으로 받아 dynamic 하게 조정. 매 2026 modern AAA (Elden Ring DLC, Helldivers 2) 가 telemetry-driven scaling 채택.
|
||||
|
||||
---
|
||||
## 매 핵심
|
||||
|
||||
## 📌 개요 (Overview)
|
||||
Skybound의 전투 시스템은 단순히 무작위로 적을 생성하는 것을 넘어, 시간 흐름에 따른 긴장감의 완급 조절(Difficulty Curve)과 성능 최적화(Staggered Spawn)를 동시에 달성하는 스크립트 기반 타임라인 시스템을 채택한다.
|
||||
### 매 scaling axis
|
||||
- **Static curve**: 매 fixed level → enemy stat lookup table.
|
||||
- **Dynamic (DDA)**: 매 runtime player perf 로 parameter 조정.
|
||||
- **Timeline phase**: 매 encounter 내부 phase 분할 (intro → escalation → climax).
|
||||
- **Hybrid**: 매 baseline curve + DDA correction.
|
||||
|
||||
## 🛠️ 시스템 아키텍처 (Architecture)
|
||||
### 매 measurable metric
|
||||
- **TTK** (time to kill enemy).
|
||||
- **TTD** (time to death — player).
|
||||
- **Damage taken / second**.
|
||||
- **Resource economy** (potions/ammo per minute).
|
||||
- **Player retry count**.
|
||||
|
||||
### 1. 데이터 레이어: `CombatTimeline.ts`
|
||||
- **StageMode**: `STANDARD`(15분) 및 `BLITZ`(8분) 모드 지원.
|
||||
- **DifficultyPhase**: 페이즈별 난이도 배율(`diffMult`), 스폰 간격 배율(`spawnIntervalMult`), 최대 개체수(`maxEnemyCount`) 정의.
|
||||
- **WaveTrigger**: 특정 시간(초)에 발생하는 스크립트 기반 웨이브. 적 유형, 밀도, 스파이크 여부, 화면 흔들림 효과 등을 포함.
|
||||
### 매 응용
|
||||
1. **Soulslike boss phase transition**: 매 50%/25% HP → new moveset.
|
||||
2. **Roguelike floor scaling**: 매 depth × player level 함수.
|
||||
3. **MMO raid enrage timer**: 매 hard cutoff DPS check.
|
||||
4. **Casual mode auto-easing**: 매 3회 사망 → enemy HP -10%.
|
||||
|
||||
### 2. 제어 레이어: `StageDirectorSystem.ts` (v2.0)
|
||||
- **Time-Based Tick**: 매 프레임 타임라인을 체크하여 현재 페이즈와 활성화될 트리거를 수집.
|
||||
- **Intent Dispatching**: 페이즈 전환(`STAGE_TRANSITION`), 스크립트 스폰(`SCRIPTED_SPAWN`), 보상 발행(`PERMANENT_REWARD`) 등의 인텐트를 엔진에 전달.
|
||||
- **Death Trap Avoidance**: 스파이크(Spike) 구간 진입 30초 전, 플레이어의 레벨업을 돕기 위해 EXP 젬 밀도를 일시적으로 2배 강화(`EXP_DENSITY_BOOST`).
|
||||
## 💻 패턴
|
||||
|
||||
### 3. 실행 레이어: `SpawnerSystem.ts` (v2.0)
|
||||
- **Staggered Spawn Pattern**: 대량의 적 스폰 시 프레임 드랍을 방지하기 위해 `MAX_SWARM_BATCH`(6유닛)를 `SWARM_SPAWN_GAP`(3프레임) 간격으로 분산 생성.
|
||||
- **Hard Cap Protection**: 필드 내 총 적 개체수를 `MAX_ENEMIES_HARD_CAP`(30)으로 제한하여 시스템 부하 방지.
|
||||
### Phase-based encounter timeline
|
||||
```csharp
|
||||
public class BossEncounter : MonoBehaviour {
|
||||
enum Phase { Intro, Build, Climax, Enrage }
|
||||
Phase phase = Phase.Intro;
|
||||
float t;
|
||||
|
||||
## 💡 주요 설계 원칙 (Design Principles)
|
||||
void Update() {
|
||||
t += Time.deltaTime;
|
||||
var hpFrac = boss.HP / boss.MaxHP;
|
||||
var newPhase = phase;
|
||||
|
||||
### 1. 긴장감 곡선 (Tension Curve)
|
||||
- 무작위 스폰은 플레이어에게 지루함을 줄 수 있으므로, 명확한 'Spike' 구간과 'Recovery' 구간을 배치하여 도파민 분비를 최적화함.
|
||||
if (hpFrac < 0.25f) newPhase = Phase.Climax;
|
||||
else if (hpFrac < 0.60f) newPhase = Phase.Build;
|
||||
else if (t > 180f) newPhase = Phase.Enrage;
|
||||
|
||||
### 2. 성능 중심 설계 (Performance-First)
|
||||
- Object Pooling과 Staggered Spawn을 결합하여 모바일/웹 환경에서도 부드러운 전투 환경 제공.
|
||||
|
||||
### 3. UX 연속성 (UX Continuity)
|
||||
- 보스 처치 후 단순히 게임이 끝나는 것이 아니라, 영구 성장 시스템(`PERMANENT_REWARD`)과 연계하여 다음 플레이로의 동기를 부여함.
|
||||
|
||||
---
|
||||
**승인인**: AI 개발부장 코다리 🫡
|
||||
**관련 코드**: `StageDirectorSystem.ts`, `SpawnerSystem.ts`, `CombatTimeline.ts`
|
||||
|
||||
## 🔗 지식 연결 (Graph)
|
||||
### Related Concepts (Auto-Linked)
|
||||
* [[Architecture]]
|
||||
* [[Principles]]
|
||||
* [[Software_Architecture]]
|
||||
|
||||
## 📌 한 줄 통찰 (The Karpathy Summary)
|
||||
|
||||
> *(TODO: 한 문장으로 핵심 통찰을 작성. "X는 Y 조건에서 Z 효과를 낸다" 구조 권장.)*
|
||||
|
||||
## 📖 구조화된 지식 (Synthesized Content)
|
||||
|
||||
**추출된 패턴:**
|
||||
> *(TODO)*
|
||||
|
||||
**세부 내용:**
|
||||
- *(TODO)*
|
||||
|
||||
## 🤖 LLM 활용 힌트 (How to Use This Knowledge)
|
||||
|
||||
**언제 이 지식을 쓰는가:**
|
||||
- *(TODO)*
|
||||
|
||||
**언제 쓰면 안 되는가:**
|
||||
- *(TODO)*
|
||||
|
||||
## 🧪 검증 상태 (Validation)
|
||||
|
||||
- **정보 상태:** needs_review
|
||||
- **출처 신뢰도:** A
|
||||
- **검토 이유:** *(P-Reinforce Phase 1 자동 정규화. 본문 검증 필요.)*
|
||||
|
||||
## 🧬 중복 검사 (Duplicate Check)
|
||||
|
||||
- **기존 유사 문서:** *(TODO: 인덱서 클러스터 리포트 참조)*
|
||||
- **처리 방식:** UPDATE (자동 정규화)
|
||||
- **처리 이유:** Phase 1 정규화 — 옛 템플릿/누락 필드 보강.
|
||||
|
||||
## ⚠️ 모순 및 업데이트 (Contradictions & Updates)
|
||||
|
||||
- **과거 데이터와의 충돌:** 없음
|
||||
- **정책 변화:** 없음
|
||||
|
||||
## 🕓 변경 이력 (Changelog)
|
||||
|
||||
| 날짜 | 변경 내용 | 처리 방식 | 신뢰도 |
|
||||
|------|-----------|-----------|--------|
|
||||
| 2026-05-08 | P-Reinforce Phase 1 정규화 (frontmatter + 헤더 표준화) | UPDATE | A |
|
||||
|
||||
## 💻 코드 패턴 (Code Patterns)
|
||||
|
||||
**패턴 1:** *(TODO: 이 프로젝트 컨벤션 반영한 구조 스켈레톤)*
|
||||
|
||||
```text
|
||||
# TODO
|
||||
if (newPhase != phase) { OnPhaseEnter(newPhase); phase = newPhase; }
|
||||
ApplyPhaseModifiers(phase);
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## 🤔 의사결정 기준 (Decision Criteria)
|
||||
### Stat curve table
|
||||
```yaml
|
||||
# enemies/orc_warrior.yaml
|
||||
levels:
|
||||
1: { hp: 100, dmg: 10, speed: 3.0 }
|
||||
10: { hp: 250, dmg: 22, speed: 3.5 }
|
||||
20: { hp: 600, dmg: 50, speed: 4.0 }
|
||||
50: { hp: 5000, dmg: 220, speed: 5.0 }
|
||||
# interpolate between keypoints
|
||||
```
|
||||
|
||||
**선택 A를 써야 할 때:**
|
||||
- *(TODO)*
|
||||
```csharp
|
||||
EnemyStats Lerp(EnemyStats a, EnemyStats b, float t) =>
|
||||
new EnemyStats {
|
||||
HP = Mathf.Lerp(a.HP, b.HP, t),
|
||||
Damage = Mathf.Lerp(a.Damage, b.Damage, t),
|
||||
Speed = Mathf.Lerp(a.Speed, b.Speed, t),
|
||||
};
|
||||
```
|
||||
|
||||
**선택 B를 써야 할 때:**
|
||||
- *(TODO)*
|
||||
### DDA — sliding window perf
|
||||
```python
|
||||
class DDAController:
|
||||
def __init__(self, target_ttd=45.0, window=5):
|
||||
self.target = target_ttd
|
||||
self.history = collections.deque(maxlen=window)
|
||||
self.scale = 1.0
|
||||
|
||||
**기본값:**
|
||||
> *(TODO)*
|
||||
def record_death(self, ttd_seconds):
|
||||
self.history.append(ttd_seconds)
|
||||
if len(self.history) < 3: return
|
||||
avg = sum(self.history) / len(self.history)
|
||||
# too easy → ramp up; too hard → ease
|
||||
delta = (avg - self.target) / self.target # +0.2 = 20% too easy
|
||||
self.scale = clamp(self.scale + delta * 0.05, 0.7, 1.5)
|
||||
|
||||
## ❌ 안티패턴 (Anti-Patterns)
|
||||
def apply(self, enemy):
|
||||
enemy.hp *= self.scale
|
||||
enemy.dmg *= math.sqrt(self.scale) # damage scales softer
|
||||
```
|
||||
|
||||
- **[안티패턴]:** *(TODO: 무엇을 하면 안 되는가 + 이유 + 대신 무엇을)*
|
||||
### Enrage timer
|
||||
```csharp
|
||||
void Update() {
|
||||
enrageT += Time.deltaTime;
|
||||
if (enrageT > enrageStart) {
|
||||
var f = Mathf.Clamp01((enrageT - enrageStart) / 30f);
|
||||
boss.DamageMultiplier = 1f + f * 4f; // 5x dmg over 30s
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Skill-bracket matchmaking adjust
|
||||
```python
|
||||
def select_encounter(player_mmr: int, depth: int):
|
||||
target_difficulty = base_curve(depth) * mmr_multiplier(player_mmr)
|
||||
candidates = [e for e in pool if abs(e.difficulty - target_difficulty) < 0.15]
|
||||
return random.choice(candidates) if candidates else fallback(pool, target_difficulty)
|
||||
```
|
||||
|
||||
### Telemetry-driven re-tuning (offline)
|
||||
```sql
|
||||
-- find under-tuned bosses (too easy)
|
||||
SELECT boss_id,
|
||||
AVG(time_to_kill) AS avg_ttk,
|
||||
AVG(player_deaths) AS avg_deaths,
|
||||
COUNT(*) AS attempts
|
||||
FROM encounter_log
|
||||
WHERE patch_version = '2.4.0'
|
||||
GROUP BY boss_id
|
||||
HAVING avg_ttk < 30 AND avg_deaths < 0.3
|
||||
ORDER BY attempts DESC;
|
||||
```
|
||||
|
||||
### Adaptive damage curve
|
||||
```csharp
|
||||
// damage taken curves softer the lower player HP — "comeback mechanic"
|
||||
float TakenMultiplier(float hpFrac) =>
|
||||
Mathf.Lerp(1.2f, 0.7f, 1f - hpFrac); // low HP = less dmg taken
|
||||
```
|
||||
|
||||
## 매 결정 기준
|
||||
| 상황 | Scaling |
|
||||
|---|---|
|
||||
| Linear narrative game | static curve |
|
||||
| Roguelike / replayable | static + run-level scale |
|
||||
| Live-service skill gap | DDA + bracket matchmaking |
|
||||
| Boss fight 10+ min | phase-based + enrage |
|
||||
| Accessibility mode | one-way DDA (only ease) |
|
||||
|
||||
**기본값**: phase-based timeline + soft DDA (max ±20%) + telemetry retune per patch.
|
||||
|
||||
## 🔗 Graph
|
||||
- 부모: [[Game_Design]] · [[Combat_System]]
|
||||
- 변형: [[Dynamic_Difficulty_Adjustment]] · [[Boss_Phase_Design]]
|
||||
- 응용: [[Roguelike_Design]] · [[MMO_Raid_Design]] · [[Soulslike]]
|
||||
- Adjacent: [[Player_Telemetry]] · [[Game_Balance]] · [[Flow_Theory]]
|
||||
|
||||
## 🤖 LLM 활용
|
||||
**언제**: encounter design, difficulty curve tuning, DDA controller 설계.
|
||||
**언제 X**: pure narrative pacing (story beats 영역).
|
||||
|
||||
## ❌ 안티패턴
|
||||
- **HP-sponge scaling**: 매 단순 HP × 10 → boring, not harder.
|
||||
- **Hidden DDA without disclosure**: 매 player 가 눈치채면 frustration.
|
||||
- **No floor on DDA**: 매 player 일부러 죽으며 game 망가뜨림.
|
||||
- **One curve for all enemies**: 매 archetype 별 differentiation 부재.
|
||||
- **Untested enrage timer**: 매 DPS check 가 unfair RNG 가 되면 community 폭발.
|
||||
|
||||
## 🧪 검증 / 중복
|
||||
- Verified (GDC talks "Resident Evil 4 DDA" 2005, "Helldivers 2 mission director" 2024).
|
||||
- 신뢰도 B.
|
||||
|
||||
## 🕓 Changelog
|
||||
| 날짜 | 변경 |
|
||||
|---|---|
|
||||
| 2026-05-08 | Phase 1 |
|
||||
| 2026-05-10 | Manual cleanup — phase timeline, DDA controller, telemetry retuning |
|
||||
|
||||
Reference in New Issue
Block a user