# TGL Cell Arena — LLM-friendly summary URL: https://tglgames.com/cell-arena/ Genre: Single-player browser cell-eating arena ("agar-style") · arcade · survival Author: mgwalk · Free, no install, no signup. ## What it is You control a colored cell on a 4 000 × 4 000 logical-unit arena. Move the mouse (or touch) to steer — your cell follows the cursor relative to the center of the screen. Eat colored food pellets (+1 mass each) and AI cells smaller than yours (+their mass). Avoid AI cells bigger than yours: if they catch you, the run ends. Bigger cells move slower, so growth is always a tradeoff between dominance and agility. ## Scoring score = floor(max_mass) + floor(time_alive_seconds) + kills × 50 `max_mass` is your peak mass during the run — losing mass at the end does not erase it. `kills` counts AI cells you consumed (you must be ≥2% larger than them to eat). The leaderboard ranks by `score`. ## Controls - Mouse / touch: steer toward cursor - Esc: quit current run ## Anti-cheat Sanity-cap validator (NOT bit-perfect replay — float positions and continuous mouse input defeat that). On submit, `api/games/cell-arena.php` checks: - Score formula reproduces from `max_mass`, `duration_ms`, `kills` (±5% rounding tolerance) - `food_eaten` ≤ seeded food budget (`FOOD_TARGET_COUNT` + duration_seconds × 8) - `bots_eaten` ≤ seeded bot budget (`BOT_TARGET_COUNT` + duration ÷ `BOT_RESPAWN_MS`) - `max_mass` ≤ envelope from food + bots eaten - `distance_units` ÷ duration ≤ `MAX_SPEED_UPS` × 1.10 tolerance - HMAC-signed run tokens, single-use, server-issued seed Soft-flag thresholds (sustained kill rate > 0.5/sec or food rate > 6.5/sec across a 60s+ run) park the run as `validated='pending'` for admin review. ## Constants (must stay in lockstep PHP ↔ JS) RULES_VERSION = 1 ARENA_W = ARENA_H = 4 000 units START_MASS = 25 FOOD_VALUE = 1 FOOD_TARGET_COUNT = 600 BOT_TARGET_COUNT = 12 BOT_RESPAWN_MS = 4 000 MAX_SPEED_UPS = 320 units/sec (at min mass) POINTS_PER_KILL = 50 EAT_SIZE_RATIO = 1.02 (need to be ≥2% bigger to eat) Bump `RULES_VERSION` whenever any of these change so old rows stay interpretable. ## Files - `cell-arena/index.html` — the entire game (single self-contained file, tier 1) - `cell-arena/about/index.html` — about page with FAQ + JSON-LD - `cell-arena/leaders/index.html` + `runs.js` — full leaderboard sub-page - `cell-arena/replay/index.html` — input-log visualizer (player path animation) - `api/games/cell-arena.php` — `CellArenaBoundsChecker` validator - `api/endpoints/cell_arena_run.php` — `GET /api/cell-arena/run?id=` for replay - `docs/cell-arena.md` — design doc ## Privacy No tracking pixels, no analytics SDK, no third-party scripts, no payments. Raw IP, user-agent, and full request bodies are logged for ops/security review (project-wide stance) — never sold or shared.