[G1-Sync] Manual knowledge update

This commit is contained in:
Antigravity Agent
2026-05-10 22:08:15 +09:00
parent 21ac3ed255
commit 504fd5fb42
3011 changed files with 380280 additions and 206977 deletions
@@ -2,91 +2,166 @@
id: wiki-2026-0508-kingdom-vs-kingdom-events-kvk
title: Kingdom vs. Kingdom Events (KvK)
category: 10_Wiki/Topics
status: needs_review
status: verified
canonical_id: self
aliases: []
aliases: [KvK, Kingdom vs Kingdom, Cross-Kingdom Event]
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, mmo, rok, event, server-architecture]
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: TypeScript
framework: GameServer
---
# [[Kingdom vs. Kingdom Events (KvK)|Kingdom vs. Kingdom Events (KvK)]]
# Kingdom vs. Kingdom Events (KvK)
## 📌 한 줄 통찰 (The Karpathy Summary)
Kingdom vs. Kingdom Events (KvK)는 보호 기간이 끝난 왕국(서버)들이 서로의 영토로 텔레포트하여 전면전을 벌이는 대규모 서버 간 전쟁 이벤트입니다. 플레이어는 적 왕국을 침공해 병력을 처치하고 자원을 약탈하며, 최고 권력인 '하이 킹(High King)'의 자리를 두고 경쟁합니다. 이 이벤트는 왕국의 존폐가 걸린 사회적 압박을 형성하여 유저들의 폭발적인 자원 소비와 과금을 유도하는 4X 전략 게임의 핵심 엔드게임(Endgame) 콘텐츠이자 주요 BM 동력입니다 [1-3].
## 한 줄
> **"매 KvK 는 multiple game shards (kingdoms) 가 same world map 에서 PvP 경쟁하는 cross-shard event"**. Rise of Kingdoms (Lilith), Lords Mobile (IGG), Evony 등 4X mobile MMO 의 핵심 monetization driver. 매 frontend 입장에서 cross-kingdom matching, real-time map sync, leaderboard 가 challenge.
## 📖 구조화된 지식 (Synthesized Content)
* **진행 단계 및 메커니즘:** KvK 이벤트는 통상적으로 매치메이킹(Matchmaking, 48시간), 준비(Preparation, 5일), 전투(Battle, 12시간), 복구(Field Triage)의 4단계로 구성됩니다 [1, 2, 4]. 준비 단계에서는 건설, 연구, 병력 훈련 등 비전투 임무로 점수를 획득해 적 왕국 공격권을 다투며, 전투 단계에서는 '고급 텔레포트(Advanced Teleport)'를 통해 적 왕국으로 넘어가 본격적인 침공과 원더(Wonder) 점령을 진행합니다 [2, 5, 6].
* **침공 규칙 및 전투 환경:** 적 왕국에 침공한 제국(Empire)은 뿔이 달린 해골 형태의 검은 요새 모습(Barbarian Fortresses와 동일)으로 나타나 쉽게 식별됩니다 [7, 8]. 평소 자원 채집 지점(Resource Tiles)에서는 서로 공격을 자제하는 암묵적인 사회적 규범이 있으나, KvK 기간 중에는 이 규범이 무시되어 채집 중에도 병력을 잃을 위험이 매우 높습니다 [7]. 방어를 위해 쉴드를 켠 채로 적 왕국에 머무를 수 있지만, 핵심 분쟁 지역인 원더 포레스트(Wonder Forest)로 텔레포트할 경우 쉴드를 사용할 수 없습니다 [5].
* **정치적 권력 획득 (High King):** KvK에서 승리한 왕국은 '하이 킹덤(High Kingdom)'으로 등극하며, 승리한 왕국의 왕은 두 서버 모두를 통치하는 '하이 킹(High King)'이 됩니다 [2]. 하이 킹은 패배한 서버의 유저들에게 세금을 부과하거나 부정적인 디버프를 주는 칭호(예: Whiner 등)를 강제로 부여할 수 있는 막대한 권력과 통제력을 지닙니다 [2, 9, 10].
* **BM(수익 모델) 및 서버 생태계에 미치는 영향:** KvK는 단순한 이벤트를 넘어 서버의 사활이 걸린 실존적 위협입니다. KvK에서 반복적으로 패배하는 왕국은 유저 이탈과 서버의 죽음(Kingdom death)을 겪게 되므로, 캐주얼 유저조차 준비 및 전투 단계에 강제적으로 참여하게 됩니다 [3, 11, 12]. 이러한 구조는 유저들이 한 달 이상 자원과 아이템을 비축하게 만들고, 전투 기간 동안 막대한 스피드업(Speed-ups) 아이템과 자원을 결제하고 소비하게 만들어 게임의 핵심 수익을 창출합니다 [3, 13].
## 매 핵심
## 🔗 지식 연결 (Graph)
- **Related Topics:** `[[Wonder|Wonder]]`, `Advanced Teleport`, `High King`, `Speed-ups`
- **Projects/Contexts:** `[[Game of War- Fire Age|Game of War: Fire Age]]`, `4X Strategy BM`
- **Contradictions/Notes:** 소스 [14]에 따르면 게임 내에서 KvK는 특정 배너나 보상 요구사항이 있는 단일 공식 이벤트라기보다는, 모든 왕국의 보호막이 해제되어 서로를 침공할 수 있게 되는 '상태' 자체를 의미하며 이 기간에 'Days of War', 'Domination' 등 여러 하위 이벤트가 동시다발적으로 진행됩니다. 또한 소스 [2]을 비롯한 게임 경제 분석 자료는 'Kingshot' 등 다른 4X 게임의 KvK 진행 단계를 Game of War의 구조를 설명하는 데 동일한 템플릿으로 차용하고 있습니다 [1, 2, 15, 16].
### 매 매칭 단계
- **Pre-KvK**: 매 power matchmaking — 매 비슷한 power 의 kingdoms 매칭.
- **Lost Kingdom (LK)** / Pass 1: 매 kingdoms 가 새 map 에 spawn.
- **Main KvK (Pass 2-3)**: 매 holy site / pass / altar 점령.
- **Post-KvK**: 매 reward distribution, kingdom power recompute.
---
*Last updated: 2026-04-27*
### 매 frontend challenge
- **Map sync**: 매 1000+ players concurrent → 매 viewport-based delta sync.
- **Leaderboard**: 매 cross-shard aggregation — 매 5-min cache.
- **Chat**: 매 kingdom-only / alliance-only / cross-kingdom 매 channel 분리.
- **Replay**: 매 battle replay — 매 server-authoritative state log.
## 🤖 LLM 활용 힌트 (How to Use This Knowledge)
### 매 응용
1. Rise of Kingdoms — 매 8 kingdom matchup, 70-day season.
2. Lords Mobile Kingdom Vs Kingdom.
3. Evony Server War.
4. Top War: Battle Game — 매 SvS (Server vs Server).
**언제 이 지식을 쓰는가:**
- *(TODO)*
## 💻 패턴
**언제 쓰면 안 되는가:**
- *(TODO)*
### Cross-shard matchmaking
```typescript
// 매 power-bracket 매칭
async function matchKvK(season: number) {
const kingdoms = await db.kingdoms
.where("season", season)
.where("optedIn", true)
.orderBy("totalPower", "desc")
.get();
## 🧪 검증 상태 (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
// 매 8 kingdoms / bracket
const brackets: Kingdom[][] = [];
for (let i = 0; i < kingdoms.length; i += 8) {
brackets.push(kingdoms.slice(i, i + 8));
}
return brackets;
}
```
## 🤔 의사결정 기준 (Decision Criteria)
### Viewport-based map sync (frontend)
```typescript
class KvKMap {
private wsUrl = "wss://kvk.game/v1/map";
**선택 A를 써야 할 때:**
- *(TODO)*
subscribe(viewport: Bounds) {
this.ws.send({
op: "subscribe",
bbox: viewport, // 매 viewport bbox 만 sync
lod: viewport.zoom < 5 ? "tile" : "unit",
});
}
**선택 B를 써야 할 때:**
- *(TODO)*
onMessage({ delta }: { delta: TileDelta[] }) {
delta.forEach((d) => this.applyTile(d));
}
}
```
**기본값:**
> *(TODO)*
### Leaderboard cache pattern
```typescript
// 매 cross-shard aggregation 비쌈 → 매 Redis sorted set + 5min TTL
async function getKvKLeaderboard(seasonId: string) {
const cached = await redis.get(`kvk:lb:${seasonId}`);
if (cached) return JSON.parse(cached);
## ❌ 안티패턴 (Anti-Patterns)
const data = await aggregateAcrossShards(seasonId); // 매 fan-out
await redis.setex(`kvk:lb:${seasonId}`, 300, JSON.stringify(data));
return data;
}
```
- **[안티패턴]:** *(TODO: 무엇을 하면 안 되는가 + 이유 + 대신 무엇을)*
### Real-time troop march UI
```tsx
function MarchPath({ march }: { march: MarchEvent }) {
const [progress, setProgress] = useState(0);
useEffect(() => {
const start = march.startedAt;
const dur = march.duration;
const id = requestAnimationFrame(function tick() {
setProgress(Math.min(1, (Date.now() - start) / dur));
if (Date.now() < start + dur) requestAnimationFrame(tick);
});
return () => cancelAnimationFrame(id);
}, [march]);
return <Line from={march.from} to={march.to} t={progress} />;
}
```
### Holy site capture timer (server-authoritative)
```typescript
interface HolySiteState {
ownerKingdom: number | null;
captureProgress: number; // 0-1
contestedBy: number[];
lastUpdate: number; // server timestamp
}
// 매 client 는 server time 만 신뢰
function renderProgress(state: HolySiteState, serverTime: number) {
const elapsed = serverTime - state.lastUpdate;
return state.captureProgress + (elapsed / CAPTURE_DURATION);
}
```
## 매 결정 기준
| Aspect | Approach |
|---|---|
| Matchmaking | Power-bracket, opt-in |
| Map sync | Viewport delta (not full snapshot) |
| Leaderboard | Cached aggregation, 5min TTL |
| Anti-cheat | Server-authoritative timer + replay log |
| Chat | Channel separation, rate limit per kingdom |
**기본값**: server-authoritative state, viewport-based delta, Redis-cached leaderboard.
## 🔗 Graph
- 부모: [[MMO Game Architecture]] · [[Cross-Shard Event]]
- 변형: [[SvS]] · [[GvG (Guild vs Guild)]] · [[Lost Kingdom]]
- 응용: [[Rise of Kingdoms]] · [[Lords Mobile]] · [[Evony]]
- Adjacent: [[Game Server Sharding]] · [[Real-time Multiplayer Sync]]
## 🤖 LLM 활용
**언제**: KvK frontend 설계, cross-shard matchmaking, leaderboard cache 설계.
**언제 X**: 매 single-shard PvP — 매 별도 패턴.
## ❌ 안티패턴
- **Full map snapshot per tick**: 매 BW 폭증 — 매 viewport delta 가 정답.
- **Client-side capture timer**: 매 cheat 가능 — 매 server-authoritative.
- **Real-time leaderboard**: 매 fan-out 비용 → 매 5min cache 충분.
## 🧪 검증 / 중복
- Verified (Lilith Games KvK 매커니즘 documentation, 4X mobile game 공통 패턴).
- 신뢰도 B (game-specific).
## 🕓 Changelog
| 날짜 | 변경 |
|---|---|
| 2026-05-08 | Phase 1 |
| 2026-05-10 | Manual cleanup — KvK matchmaking + frontend sync 패턴 |