How I built CS2 Demo Lab: a CS2 demo analyzer that replays your mistakes in the real game
I play a lot of Counter-Strike 2, mostly on FACEIT. Like everyone, I lose rounds I should win, and for a long time my review process was the same as everyone's: open the demo, scrub around, get bored after ten minutes, and walk away with a feeling instead of an answer.
CS2 Demo Lab is what I built to replace that feeling with numbers. It is a Windows app that reads your CS2 demos on your own PC, tells you why you lost rounds, and then opens the exact moment in CS2 itself, not in a 2D replay. This is how it came together.
It started with one question
Before there was an app, there was a script. I parsed my own FACEIT demos and looked at one thing: the first bullet of every rifle fight. The answer was uncomfortable. In 46% of those fights my first bullet was fired while I was still moving, and those shots hit far less often: roughly 10 to 15%, against about 24% when I was standing still.
No amount of watching demos by eye would have shown me that. It changed how I play, and it gave me the idea for the whole product: measure, don't guess.
What the app does
- Your costliest mistakes: errors are ranked by the rounds they cost you, not by how embarrassing they look.
- Why you died, measured: for every duel, reaction time, crosshair angle and movement speed for both players.
- Every grenade: each smoke, flash, HE and molotov from throw to landing, with the setpos to practise it.
- Anti-strat: drop an opponent's demos and get a short game plan of what they repeat, such as "after this Mid smoke they go B", each line with how often it happened.
- Watch in CS2: one click opens that moment in the real game, from any player's view.
It reads Valve matchmaking and Premier demos (.dem) and FACEIT or ESEA demos as they download (.dem.zst, .dem.gz).
Everything runs on your PC
Most demo tools are websites: you upload a demo and wait. I wanted the opposite. Demos are large, they are your data, and there is no reason a computer that can run CS2 cannot analyse a CS2 demo. So the analysis runs locally and nothing is uploaded.
Under the hood the parsing is done by demoparser2, a fast Rust demo parser with Node bindings. On top of it sits my own analysis engine: tick-exact duels, mistakes, utility, economy and opponent scouting. There is no language model anywhere in the analysis. Every number is computed by fixed rules from the demo itself.
The hard part: opening the moment in real CS2
2D replays are fast, but they hide what actually matters: what the player saw. The smoke edge, the flash, the crosshair. So the feature I cared about most was Watch in CS2: click a death in the app and watch it in the game.
That turned out to be the hardest engineering in the project. The app starts its own CS2 window with its own settings folder, so it never touches the player's configs, and with VAC off for that window only. It docks that window inside the app, keeps the app's timeline in sync with CS2's real tick, and closes it cleanly when you are done. I wrote a zero-footprint test that checks a session leaves the user's CS2 settings exactly as they were.
Trust comes from being able to check the numbers
Anti-strat is only useful if you believe it. So every line in a game plan carries its own count (n of N) and links to the rounds it came from. A separate verification tool recounts every line from the raw demo data with its own code and fails if anything disagrees. If the app says a team hits B after a smoke in 5 of 6 rounds, you can open all six.
From Electron to Rust
The first versions were an Electron app, and the installer was 239 MB. I moved the shell to Tauri v2: Rust for the window, the CS2 control and the updater, with the analysis engine unchanged in a small Node sidecar. That alone brought the installer to 134 MB, and trimming the bundled tools took it to about 36 MB.
Shipping it like a real product
A tool for players needs the boring parts too: accounts, payments and updates. Sign-in is Google through Firebase, entitlements live in Firestore behind Cloud Functions, and payments go through Polar as the merchant of record. The cloud project has a hard monthly spending cap with an automatic kill switch, so a bug can never turn into a surprise bill.
Every test run, installer build and release goes through Jenkins: JavaScript tests, Rust tests and a UI text check, then the installer and its signed update file, then the website. The app updates itself from the website, so nothing about the product depends on anything I am not hosting.
Building with AI agents
I built CS2 Demo Lab as a solo developer working with AI coding agents (Claude Code and Codex) as a team: they wrote a lot of the code, and I owned the product decisions, the testing in the real game, and the final call on every release. The lesson I would pass on: agents are fast, but they will happily build something that looks finished and is not. What kept this project honest were hard rules, such as tests before every release, every number verifiable, and no feature on the site that does not actually work.
Lessons
- Measure first. One honest number about my own play was worth more than a hundred hours of watching demos.
- "Corrupted demo" is not always the demo. Some large FACEIT demos failed with a "corrupted or truncated" error. The files were fine: the parser version was one release behind, and upgrading it fixed every one of them.
- Remove what does not work. I shipped a FACEIT match-briefing feature that depended on an API key I never got. It could only fail, so I removed it. A smaller app that always works beats a bigger one that sometimes does.
- Privacy is a feature. The website sets no cookies and runs no analytics. That made some marketing harder, and I would still make the same choice.
If you play CS2 and want to know why you lose rounds instead of guessing, try it: 30 days free with every feature, Windows 10 and 11.
cs2demolab.com →