3D 리플레이 1단계: .vrf 변환기(tools/replay-extract) · 사이트 3D 재생기 · 대화 동기화

- tools/replay-extract: ValorantReplayParser(MIT, 고정 커밋) → gvr-replay JSON v1
  (선수 이동 10Hz · 라운드 · 킬 · 사격 · 스킬/설치물 · 녹화 시작 시각)
- 사이트: 경기 화면 '3D 리플레이' 칸 (three.js 지연 로드). 미니맵 바닥 + 실제 높이,
  회전 · 확대 · 선수 선택 · 따라가기 · 킬피드 · 자막 · 말하는 사람 표시
- 동기화: 같은 킬의 경기 기록 시각과 리플레이 시각 차이 중앙값 (못 맞추면 라운드 시작)
  현장 모드 시계에 묶어 재생 · 멈춤 · 이동 · 배속이 대화와 같이 움직임
- 목 서버 데모(GVR_MOCK_REPLAY), 동기화 테스트 4개

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
EJClaw
2026-10-17 03:56:43 +09:00
parent 50fc90070b
commit 9592efeff6
18 changed files with 1539 additions and 1 deletions

View File

@@ -0,0 +1,69 @@
using System.Text.Json;
using System.Text.Json.Serialization;
namespace GvrReplay;
// 사이트로 가는 형식. 시간은 모두 리플레이 시작부터 ms (t), 좌표는 게임 월드 단위(cm) 정수
public sealed class ReplayFile
{
public string Format { get; set; } = "gvr-replay";
public int V { get; set; } = 1;
public string? MatchId { get; set; }
public string? Map { get; set; }
public string? Build { get; set; }
/// 리플레이 녹화 시작 시각 (서버 기준 유닉스 ms). t 를 실제 시각으로 바꿀 때 recordedAt + t
public long RecordedAt { get; set; }
public int DurationMs { get; set; }
public int SampleMs { get; set; }
public List<ReplayPlayer> Players { get; set; } = [];
public List<ReplayRound> Rounds { get; set; } = [];
/// [t, phase] 게임 단계 바뀜 (원본 값)
public List<int[]> Phases { get; set; } = [];
/// [t, killer, victim] (선수 번호, 모르면 -1)
public List<int[]> Kills { get; set; } = [];
/// [t, player, x, y, z, yaw, pitch] 사격 위치와 방향
public List<int[]> Shots { get; set; } = [];
/// 스킬 · 설치물 [t0, t1, kind 번호, x, y, z, player] (t1 = 사라진 시각, 모르면 -1)
public List<int[]> Objects { get; set; } = [];
public List<string> ObjectKinds { get; set; } = [];
}
public sealed class ReplayPlayer
{
public string? Puuid { get; set; }
/// 캐릭터 클래스 (예: Wushu_PC_C). 요원 이름은 사이트가 경기 상세(match-details)로 붙인다
public string? Character { get; set; }
/// 이동 기록. 열 별 배열 (같은 길이): t, x, y, z, yaw(도), pitch(도)
public PlayerTrack Track { get; set; } = new();
}
public sealed class PlayerTrack
{
public List<int> T { get; set; } = [];
public List<int> X { get; set; } = [];
public List<int> Y { get; set; } = [];
public List<int> Z { get; set; } = [];
public List<int> Yaw { get; set; } = [];
public List<int> Pitch { get; set; } = [];
}
public sealed class ReplayRound
{
/// 1부터
public int Num { get; set; }
/// 구매 단계 시작
public int Buy { get; set; }
/// 교전 시작 (구매 단계 끝), 모르면 -1
public int Combat { get; set; }
/// 라운드 끝 (승패 확정), 모르면 -1
public int End { get; set; }
}
public static class ReplayJson
{
public static readonly JsonSerializerOptions Options = new()
{
PropertyNamingPolicy = JsonNamingPolicy.CamelCase,
DefaultIgnoreCondition = JsonIgnoreCondition.Never,
};
}