Back to All Projects
2026

Counter Strike 2 Demo Analyzer

Portfolio project by Nanakumor Princewill

CLI-style Node.js tool that parses CS2 demos, ranks high-impact deaths, and emits JSON for coaching and replay pipelines.

Counter Strike 2 Demo Analyzer — project screenshot by Nanakumor Princewill

Built for

Coaching / analytics pipelines that need ranked “surprise death” candidates from raw `.dem` files — ready for replay review or downstream AI tooling.

Problem

CS2 demos store match state as ticks, not video. Finding deaths where the victim never oriented toward the attacker means extracting events, reconstructing spatial context, and scoring candidates — then exporting clip-friendly boundaries instead of a single death tick.

Overview

A TypeScript Node.js analyzer that turns Counter-Strike 2 demos into ranked JSON. It parses deaths and tick snapshots, scores awareness-oriented signals (view angle vs killer direction, recent mouse movement), and outputs start/death/end tick windows so replays and coaching tools can jump to useful clips.

Capabilities

  • Ingests CS2 `.dem` files and extracts death events plus per-tick player props
  • Scores candidates using view-angle gap and recent yaw movement
  • Ranks high-impact moments for manual review or automation
  • Emits structured JSON with victim, killer, weapon, and score fields
  • Adds pre/post roll tick windows so clips don’t start on an already-dead frame

Architecture notes

  • @laihoe/demoparser2 for event + tick extraction (deaths, position, pitch/yaw)
  • Offline scoring pass over death windows (~128 ticks of mouse/view context)
  • Tick math at ~64 ticks/second for clip boundary generation
  • CLI-friendly TypeScript pipeline — no UI dependency; JSON is the product

Outcomes

  • End-to-end path from raw demo → ranked candidates → replay validation workflow
  • Clip metadata that is render-friendly (`startTick` / `tick` / `endTick`)
  • Reusable analytics pattern: parse events, score spatial signals, export for humans or AI
  • Public repo documenting the pipeline for technical review

Tech stack

  • Node.js
  • TypeScript
  • @laihoe/demoparser2
  • Counter-Strike 2 Demo Parser