Files
EldenRingDeathCounter/CLAUDE.md
s0wlz (Matthias Puchstein) 45f94b1bdf init: Elden Ring death counter with multi-client server
Deno HTTP + WebSocket server serving three pages:
- / desktop with YOU DIED overlay and keyboard controls
- /mobile touch-optimized control page
- /obs transparent browser source for OBS

Count persisted to counter.json, synced in real time across all
connected clients. Compiles to a self-contained Windows .exe via
deno compile.
2026-03-18 02:37:01 +01:00

1.2 KiB
Raw Permalink Blame History

CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

Overview

A single-file, zero-dependency Elden Ring death counter (Elden Ring Counter.html). Open directly in any browser — no build step, no server needed.

Architecture

Everything lives in one HTML file with three sections:

  • CSS (lines 8339): Elden Ring-themed dark UI using CSS custom properties (--gold, --bg0, etc.). The "YOU DIED" overlay is CSS-animation-driven via the .show class.
  • HTML (lines 342376): Static markup. #roman and #arabic are the display targets; #overlay holds the death animation.
  • JS (lines 378468): Vanilla JS. deaths is the single state variable, persisted to localStorage under key elden_deathcounter_value. render() syncs state → DOM → storage. add(delta) is the only way to mutate count; it triggers the overlay on increment.

Key constraints

  • Roman numeral display is capped at 3999 (clamp(0, 3999)); 0 displays as .
  • The overlay animation restarts cleanly via a forced reflow (void overlay.offsetWidth) before re-adding .show.
  • UI language is German (lang="de"); string literals like "Tode:" and "Gespeichert lokal ✓" are in German.