ZH
games/rob-revisited / docs / reborn.md · commit f9a1307
# "Experience - Rob revisited" — the full game (design and module contracts)An ORIGINAL first-person survival adventure in the spirit of the 1990s survival sims (deep body simulation, crafting,a hostile planet, a story). It is NOT a remake: no name, character, place, text, picture or sound of any existing game.Everything is written for this game. Language of the texts: French (the player's), code and comments in English.Runs in JumPHP (games/alis): desktop PHP 8.5 and the browser (PHP in WebAssembly, WebGL 1, GLSL ES 1.00, 32-bit ints,no blocking, ~16 ms a frame: build meshes once, never per frame). Entry: `App\Scene\RevisitedScene` (TitleScene item"EXPERIENCE - ROB REVISITED - TEST"). `src/Revisited` is excluded from the container: plain classes, created with `new`.## The story (original)Rob Calder, survey pilot of the orbital station *Meridian*, crash-lands his pod on the unmapped moon **Ysor** (junglevalleys, a frozen high plateau, a red canyon, deep caves). The pod's beacon is dead. The station passes overhead everyfew days and will only see a strong signal from the **old relay mast** on the plateau, left by a lost colony expedition(the *Halde* mission, 60 years ago). Its descendants still live in a village of the canyon (the **Haldi**: friendly,trade, give quests); a band of **scavengers** (the **Rôdeurs**, hostile) loots what is left of the colony.Chapters (Quest): 1. Survive the first night (water, food, fire, shelter). 2. Find the trail: the pod's log points tothe colony's dead base in the caves under the valley. 3. Caves (2 underground levels, dark: torch): an old **powercell** and the colony's logs; cave beasts. 4. The canyon: the Haldi village (trade, heal, the elder's quest: get backtheir stolen **tuner** from the Rôdeurs' camp: fight or sneak). 5. The plateau (cold: fur coat, fire): climb to the mast,fit the cell and the tuner, repair the **antenna** with salvaged parts, transmit at night when the station passes.6. Ending: the shuttle lands (win). Deaths: the body gives up (blood, cold, heat, hunger, thirst, poison, infection...).## Modules (each owned by one author; respect the contracts below, extend freely inside your module)| Namespace / files | What ||---|---|| `App\Revisited\Sim\*` (`src/Revisited/Sim/`) | the body (physiology), items catalogue, inventory, crafting recipes || `App\Revisited\Land\*` (`src/Revisited/Land/`) | zones (levels) and their generation, things, creatures and their AI, humans (NPC), dialogues, quests, the game state `Game` (pure logic: no GL, no SDL) || `App\Revisited\Render\*` (`src/Revisited/Render/`), `assets/revisited/`, `tools/reborn/` | the 3D: terrain, textures, water, sky, weather, vegetation, models, creatures, caves, lights; generated texture PNGs || `App\Revisited\Ui\*` (`src/Revisited/Ui/`), `src/Scene/RevisitedScene.php`, `tests/Revisited*Test.php` | the scene: input, the dashboard (HUD), inventory / crafting / body / map / journal / dialogue screens, save/load, phones |### Sim (contract used by Land and Ui)```phpfinal class Items {            // the catalogue: static data    /** @return array{id:string,name:string,kind:string,weight:float,stack:int,food?:float,water?:float,heal?:array,tool?:string,damage?:float,warmth?:float,fuel?:float,desc:string} */    public static function get(string $id): array;    /** @return list<string> */ public static function all(): array;}final class Inventory {    public function add(string $id, int $n = 1): int;           // how many fitted (weight limit)    public function remove(string $id, int $n = 1): bool;    public function count(string $id): int;    public function has(string $id, int $n = 1): bool;    /** @return array<string,int> */ public function all(): array;    public function weight(): float; public function capacity(): float;    public ?string $hand = null;                                // the item held (weapon / tool / torch)    public ?string $worn = null;                                // clothing (warmth)    public function toArray(): array; public static function fromArray(array $a): self;}final class Crafting {    /** @return list<array{id:string,name:string,needs:array<string,int>,tool:?string,fire:bool,minutes:int,gives:array<string,int>}> */    public static function recipes(): array;    /** recipes possible now */ public static function available(Inventory $inv, bool $nearFire): array;    public static function craft(string $recipeId, Inventory $inv, bool $nearFire): ?string;  // null ok, else the reason (French)}final class Environment {      // what the body lives in, given by Game each tick    public float $airTemp = 20; public bool $nearFire = false; public bool $sheltered = false; public bool $wet = false;    public float $effort = 0;   // 0 rest, 0.3 walk, 1 run / fight    public bool $sleeping = false;}final class Body {    public function tick(float $minutes, Environment $env): void;    public function dead(): bool; public function causeOfDeath(): ?string;    // vitals 0..100 unless said: health, blood (litres 0..5.5), temperature (°C), hunger, thirst, fatigue, morale    /** @return array<string,float> */ public function vitals(): array;    /** @return list<array{part:string,kind:string,severity:float,treated:bool,label:string}> */ public function injuries(): array;    /** @return list<array{id:string,label:string,severity:float}> */ public function conditions(): array; // fever, infection, poison, dysentery, hypothermia, heatstroke...    public function wound(string $part, string $kind, float $severity): void;  // part: head torso larm rarm lleg rleg; kind: cut bite burn bruise fracture    public function consume(string $itemId): string;        // eat / drink / medicine: the effect told (French)    public function drink(bool $clean): string;             // water from a lake / stream (dirty: dysentery risk) or boiled    public function treat(string $itemId, string $part): string; // bandage, splint, poultice...    /** the worst feelings, French, for the HUD */ public function feelings(): array;    public function speedFactor(): float;                   // fractures, fatigue, weight slow the walk    public function toArray(): array; public static function fromArray(array $a): self;}```### Land (contract used by Ui and Render)```phpfinal class Thing  { public int $id; public string $kind; public float $x, $y, $z, $yaw, $scale; public int $left; public array $data = []; }final class Creature { public int $id; public string $species; public float $x, $y, $z, $yaw, $health; public string $state; public float $anim; }final class Npc    { public int $id; public string $name; public string $faction; public float $x, $y, $z, $yaw; public string $state; public float $anim; public bool $hostile; }final class Zone {    public string $id; public string $name; public bool $cave; public float $size; public float $water; public int $seed;    public float $baseTemp;                              // °C at noon (caves: constant)    public function heightAt(float $x, float $z): float; // ground    public function ceilingAt(float $x, float $z): ?float; // caves: roof height, null outdoors    public function biomeAt(float $x, float $z): string; // grass, jungle, mud, sand, rock, snow, ice, cave, redrock    public function solidAt(float $x, float $z): bool;   // cave walls, cliffs    /** @var list<Thing> */ public array $things;    /** @var list<array{x:float,z:float,r:float,to:string,toX:float,toZ:float,label:string}> */ public array $exits;    /** grid of heights for the renderer */ public int $grid; public array $heights; public float $cell;}final class Game {             // the whole game state; update() is called by the scene each frame    public Zone $zone; public Body $body; public Inventory $inv;    public float $x, $z, $y, $yaw, $pitch; public float $minutes;  // game time since the crash (day 1 = 07:00)    /** @var list<Creature> */ public array $creatures; /** @var list<Npc> */ public array $npcs;    public ?array $weather;                               // ['kind' => clear|rain|storm|snow|fog, 'amount' => 0..1]    /** @var list<array{x:float,z:float,minutes:float}> */ public array $fires;    public static function newGame(int $seed): self;    public function update(float $dt, Intent $in): void;  // moves, AI, body, time, events    public function act(): ?string;                        // the context action (pick, cut, drink, talk, attack, enter exit...)    public function prompt(): ?string;                     // what act() would do here (French), for the HUD    public function messages(): array;                     // the log, newest last (French)    public function quest(): array;                        // ['chapter' => int, 'title' => string, 'objective' => string, 'done' => list<string>]    public function dialogue(): ?array;                    // open dialogue: ['npc' => name, 'text' => string, 'choices' => list<string>]    public function choose(int $i): void;    public function over(): ?string; public function won(): bool;    public function lightLevel(): float;                   // 0 night / cave, 1 noon    public function toArray(): array; public static function fromArray(array $a): self;}final class Intent { public float $forward = 0, $turn = 0, $strafe = 0, $look = 0; public bool $run = false, $crouch = false, $attack = false; }```### Render (contract used by Ui)```phpfinal class Graphics {    public function __construct(\JumPHP\Gl\WebGl $gl, string $quality /* ultra|low|medium|high (Quality::LEVELS) */);    public function loadZone(Zone $zone): void;            // builds the zone's meshes once (chunks), textures once    public function render(View $v): void;                 // in the scene's render(), each frame    public function dispose(): void;}final class View {    public float $x, $y, $z, $yaw, $pitch, $fov = 70;      // the eye    public float $minutes;                                  // time of day (sun, sky, stars)    public ?array $weather; public float $light;            // Game::lightLevel()    public bool $torch = false;                              // the player's torch / lamp (caves, night)    /** @var list<array{x:float,z:float,minutes:float}> */ public array $fires = [];    /** @var list<Thing|Creature|Npc> */ public array $entities = [];   // what to draw besides the terrain's own things    public ?string $held = null;                            // the item in hand, drawn in first person (spear, torch, knife...)    public float $hurt = 0;                                  // red flash 0..1}```Models are chosen by `Thing::$kind`, `Creature::$species`, `Npc::$faction`; unknown ones get a generic shape (never crash).## Kinds, species, factions (shared vocabulary)Things: `tree_palm tree_broad tree_conifer tree_dead bush_berry bush_red(poison) mushroom herb_heal herb_fever reed vinerock boulder flint stone_small wood stick water_spring wreck_pod wreck_colony crate hut tent campfire relay_mast cave_entranceladder bones carcass skin_rack`.Creatures: `grazer` (prey, flees, meat + hide), `bird` (ambient), `stalker` (night predator), `crawler` (cave insect, venom),`burrower` (canyon, ambush), `yeti_beast` → name it `glacier_brute` (plateau), `swarm` (swamp, small bites).Npc factions: `haldi` (friendly: elder Maëva, trader Oko, healer Sela, children), `rodeur` (hostile scavengers).Zones: `valley` (crash site, lake, jungle), `caves1`, `caves2` (underground), `canyon` (Haldi village + Rôdeurs camp),`plateau` (snow, relay mast). Exits connect them (cave mouths, a pass, a ladder).## Controls, help, body, scanner, clothes, map (2026-12 update)- **Controls** (`Ui\Controls`, the "Commandes" panel: H / F1, the pause menu, shown once at a new game, option  `rv_controls_seen`): Space jump, E / Return the context action, F attack (or the left button, mouse captured), Shift run,  C crouch, I bag, K crafting, B body, Tab / N scanner, M map, J journal, T sleep, 1-4 slots, Escape pause. Pad: A jump,  X action, RT attack, Y bag, LB run, RB crouch, LT journal, Select map, B back, Start pause. Menus keep Space / Return /  pad A as "confirm". Mouse: a click in the view captures it (SDL relative mode = pointer lock in the browser), Escape frees  it; options: sensitivity, invert Y. Phones: the page's stick walks, its A is ACTION, a drag on the view looks (yaw +  pitch), the scene's buttons: ATTAQUE, SAUTER, COURIR, ACCROUPI, SAC, SCANNER, CARTE, pause; `Canvas::$minPx` = 11.- **Hints** (`Ui\Hints`): an everyday action's big centre hint shows the first 3 times (4 s, fading) or until done once,  then a small key cap under the crosshair; important actions (talk, door, mast, fight...) always. Learned ids are in the  save (`hints`), option "Aides à l'écran : Auto / Toujours / Jamais" (`rv_hints`).- **Jump** (`Intent::$jump`, `Game::JUMP_SPEED` 6 m/s, gravity 22): not while swimming, crouched, in the air or under a  low cave roof; a jump can carry Rob up a ledge too steep to walk; landings over 11 m/s hurt the legs (bruise / fracture).- **Body tab** (`Ui\BodyPanel` + `Ui\BodyFigure`, a GD figure smoothed, rebuilt only when its look changes): parts coloured  by state (sain, froid, contusion, plaie, saigne, infecté, soigné), wounds marked where they are, the clothes worn drawn  over it (tears when worn out), heart trace + estimated pulse + temperature, vitals with a short note each, clothes slots  (click: take off / put on), conditions, wounds of the chosen part, the treatment row.- **Scanner** (item `scanner`, in the bag at a new game and given to older saves; tab "Scanner", `Ui\ScannerView`): radar  heading-up, 60 m (caves 30 m), echoes by category, sweeping beam; battery (`Game::scanBattery()`, drains while open,  recharges by day outdoors, fast near the pod, slowly with the power cell); a sweep reveals 40 m of map; bio-scan advice.- **Clothes** (`Inventory::$cond` 0..100, `$wet` 0..1, `warmth()` scaled by both, `protection($part)` cuts wound severity):  Rob starts in `flight_suit_torn` and `pilot_boots_worn`, already worn; they wear with time, water, rock / snow, blows and  falls; `patch` (+ `needle_bone`) mends the most worn one; putting on / taking off costs a few minutes. Old saves without  `cond` get the crash clothes.- **Explored map** (`Game::reveal()`, 64 x 64 bits per zone, saved base64 in `explored`): revealed around Rob (34 m, more  from high ground, less at night / in fog, 6-9 m in caves); `MapView::fog()` rebuilt only when a cell is revealed; markers  only once seen (the mast also once the colony's log was read).- **Smooth weather** (`Game::rampWeather()`: the old weather fades to nothing, then the new one rises, 8 game minutes;  `setWeatherTarget()`), `Graphics::smoothed()` eases every environment value (~2 s time constant, frame-rate independent),  biome ground blends over a 4 x 4 cell noisy kernel (`Terrain::weights()`), a zone change comes out of black.## Body views, clothes, water, worms, waterfalls, GPS, sleep, gauges, night (2026-12, player feedback)- **Body tab, two views** (`Ui\BodyPanel` + `Ui\BodyFigure`, buttons "Habillé" / "Médical", X switches): *Habillé* draws  Rob dressed (opaque garments with their own cut, seams, folds, trims; dirt and holes showing the skin as they wear out,  darker when wet), the six slots (click: take off / put on the warmest garment of the slot), the warmth per region with  the skin temperature of hands and feet, and for the part clicked: what covers it, its protection, what else in the bag  fits there, mending. *Médical* draws the bare body (pale from blood loss, flushed with fever, blue cold hands / feet),  each wound at its place (`BodyFigure::SPOTS`: cut, bite, burn, bruise, broken bone line), infection glow, bandages and  splints where applied, animated bleeding drops; heart + breathing traces, vitals, conditions with advice, the part's  wounds and the cares (useful ones outlined). `BodyPanel::look()` keys the GD texture.- **Clothes: six slots** (`Inventory::CLOTH_SLOTS` head under worn legs hands feet; items `slot` + `cover` regions head  torso arms hands legs feet): the flight suit is one piece (torso, arms, legs), leggings / trousers go over it, the coat  reaches the knees. New: `helmet_pilot` (pod), `undershirt`, `gloves_pilot` (ejected container), `cap_hide`, `hat_fur`,  `tunic_fiber`, `trousers_hide`, `leggings_fur`, `gloves_hide`, `mittens_fur` (recipes, needle + hide / fur / fibres).  `regionWarmth()` per region; `Body` follows the skin temperature of hands and feet (`extremityTemps()`, conditions  `cold_hands` / `cold_feet`: weaker blows, slower walk, frostbite below 5 °C) and a bare head loses heat in the cold.  Old saves: the garment of the single "worn" slot goes to its own slot.- **Water states**: `gourd_dirty` (lake), `gourd_filtered` (water filter: charcoal, sand, fibres, a gourd; small risk),  `gourd_boiled` (pot or stones heated in the fire: "Faire bouillir l'eau" by a fire), `gourd_purified`  (`purification_tablets`, 4 in the pod), `gourd_clean` (spring, waterfall, snow). Icons marked (specks, filter band, steam,  tablet, sparkle). `Crafting::ALT`: any safe water does for a recipe's "gourd_clean". `Body::drink($clean, $risk)`.- **Earthworms**: "Fouiller la terre (vers)" on mud / jungle / grass (better within 6 h of rain, with a knife or a stick);  `earthworm` raw (morale -4, small dysentery risk), "Griller des vers" → `worms_cooked`; a worm in the bag is the fishing  line's bait (+30 % bite, spent). `sand` is gathered on sand.- **Waterfalls** (`waterfall` things, `ZoneFactory::carveFall()`): valley (the brook falls off the northern foot into a pool,  a creek to the river; behind the curtain a dry ledge with the "Cache derrière la cascade": an antenna part, mittens,  tablets, a pot) and canyon (down the northern wall, a creek to the stream). Drawn by `Graphics` (two animated sheets,  `Shaders::FALL_FS`, and spray), heard (`waterfall_loop`, positional, `Soundscape::falls()`), clean running water (risk  0.04), standing in it soaks the clothes. Added last in the zone (thing ids of older saves unchanged).- **GPS** (the scanner's "GPS" page): Ysor's grid (`Game::zoneOrigin()` walks the doors, `coords()` / `coordText()`  "41.2094 N / 118.5513 E"), waypoints (`$waypoints`, `$activeWaypoint`, saved), "Insérer dans le GPS" in the journal, the  inventory and the GPS page for the logs (`logPlaces()`: pod log → Halde base; colony log → canyon refuge, mast), "Marquer  ici". The active point shows on the compass (cyan), the map, the radar's edge; in another zone they point at the door  toward it (`waypointTarget()`).- **Sleep** (`Ui\SleepView`, T; the "Dormir" action; R = rest 20 min): where (ground / fire / shelter, comfort), the risks,  how long (1 h, 4 h, until dawn, until rested, rest); asleep: fade to black, fast clock (75 game min a second), dreams,  skippable; `Game::startSleep()` / `sleepStep()` / `wake()`: a beast near (or one finding a sleeper in the open), the fire  out and the cold, the rain, a bleeding wound, thirst, hunger wake Rob early. `Game::sleep()` still sleeps at once.- **Clickable gauges** (`Ui\VitalMenu`): each gauge and condition badge has a tooltip and a menu of actions (bandage now,  medical view on the worst part, put on clothes, light / go to a fire, eat the best food, drink the safest water, boil,  filter, purify, go to water, sleep, rest, talk...). `HudData::$pointer`: a place pointed on the compass.- **Night**: moonlight and starlight ambient (`Graphics::environment()`, moon phase over 8 days, less under clouds),  caves unchanged.- **The freeze at nightfall** (day 1, 20:35, browser): the night music came in ~5 s after 20:30 while the day music was  still fading out; SDL_mixer's `Mix_PlayMusic` waits for a fade-out with an `SDL_Delay` loop, and in the browser the audio  callback that ends the fade runs on the same, blocked, thread: a hang. `EngineMixer::tick()` now halts the old music  before playing the next. NaN / INF time is refused by `Game::update()`, `passTime()`, `Body::tick()`, `sleepStep()`.## Wave 2 — the full game (escape the planet): shared vocabularyGoal changes: Rob must ESCAPE Ysor aboard an old colony shuttle (the *Halde* lander, thing kind `shuttle`) lying on thevolcanic coast. It needs parts, ONE from each human group (each gives it in its own way: quest, trade, trust, ransom,theft or fight), plus fuel and a launch window. The relay mast becomes optional (orbital window data).Outdoor zones (6, ids kept where they exist): `valley` (Forêt du Naufrage, start), `canyon` (Canyon Rouge: Haldivillage, Rôdeurs camp), `jungle` (l'Amazonie: giant trees, a wide river, river people, raft), `marsh` (Marais desBrumes: fog, stilt ruins, swarms, a mad hermit), `plateau` (snow, mast), `coast` (Côte Volcanique: black sand, basalt,fumaroles, the shuttle). Caves are the junctions: `caves1`, `caves2` and new `caves3` (jungle ↔ marsh ↔ coast).New thing kinds (Render draws them; unknown kinds keep a generic shape): `shuttle shuttle_part giant_tree liana_bridgestilt_hut market_stall totem cage terminal drone_wreck signpost raft burnt_tree ash fire_patch mangrove reeds_tallbasalt fumarole geyser palm_coast boat_wreck weapon_rack forge`. New biomes: `marsh jungle_dense basalt beach burnt`.New creatures: `river_croc` (river/marsh ambush), `climber` (tree-dwelling, steals), `stalker_cub` (the future animalcompanion), `fish` (visible in water), `lava_crab` (coast). New npc factions: `ouvi` (river people of the jungle:wary, proud), `hermit` (lone survivors, some mad), `colonist` (a lost crew member), plus `haldi` and `rodeur`.Npc `data['personality']` (mad, paranoid, empathic, greedy, proud, coward, wise...) and `data['companion']` (true whenfollowing Rob). Creature `data['companion']` too.New held items (first-person models): `club sling crossbow machete harpoon flare_gun pulse_rifle plasma_gun` plus theexisting ones; `raft_pole`.View additions (Render): each fire in `View::$fires` may carry `'r'` (radius in metres, a spreading blaze), `View::$lightning`?array `['x','z','t']` (a strike: bolt + flash at seconds t), `View::$raft` ?array (`['x','z','yaw']` Rob on his raft), `View::$burnt`list of `['x','z','r']` blackened ground areas.## Wave 2 — what is built (Sim, Land, Ui, Audio side)- **Zones** (`ZoneFactory::IDS` gains `jungle marsh coast caves3`; `OUTDOOR` lists the six outdoor ones; the valley is now  "Forêt du Naufrage"). Doors: valley (east, x 497) ↔ jungle (west); jungle (east bank, x 497 z 200) ↔ caves3 (west);  caves3 north ↔ marsh (south); caves3 east ↔ coast (west). **Older zones keep their thing ids**: a door added to an old  zone is marked `late` (made after its things by `lateDoors()`, `earlyExits()` for the land), the jungle's door back is  `arriveLate`; the canyon's new things (credits counter, Rôdeur weapon rack, Koru's forge, the Haldi totem, Oko's stall)  and the valley's signpost are added last. Each zone builds in 25-95 ms natively (tested < 200 ms).  - *jungle*: a wide river north → south (`riverX($v)`, `riverHalf()`, deep: `Raft::forbidden()` refuses walking deeper    into it), three islands (`ISLANDS`: a colony drone with the pulse-rifle plan, the fishers' cache, a boat wreck with    fuel), the Ouvi village on the west bank (`ouviCentre()`: stilt huts, totem of the scales, Nadjé's stall, fish racks),    the cub's den (150, 92), giant trees, liana bridges, the Old Jaw (boss `river_croc`, 320 hp) downstream.  - *marsh*: water 1.2 m with hummocks a hand above or below it, deep black pools, fog-prone, Orsolo's hut (`HERMIT`),    the stilt ruins and Kessa (`RUINS`), the drowned's mast, a sunk probe.  - *coast*: basalt heights sloping to a black beach (`beach`), the sea east (water 0), fumaroles (cook raw meat), geysers,    burnt patches, the shuttle on a flattened shelf (`SHUTTLE`), the pad console, the gutted hold (fuel, cells, plasma gun).  - *caves3*: `caves(3)`, three mouths and Jonas Merle's den (the wreck of pod MR-4).- **The escape** (`Land\Escape`): parts `nav_core` (Maëva: return the tuner, trust ≥ 25, or a promise), `heat_plates` (Aïka:  kill the Old Jaw for +45 respect, or buy them 60-160 cr at trust ≥ 10, or steal them from the totem at night: the Ouvi turn  hostile), `ignition_key` (Vask: ransom 40-150 cr, the Haldi tuner — Maëva never forgives —, a duel, a theft while he sleeps  crouched, or Mira sells him out for 50 cr; killing him drops it), `launch_codes` (Orsolo: come back another day, then  three riddles — 42 colonists, the Halde, Iréna the pilot: Kessa tells the answers —, or show him the colony's log, or the lie  "the station sends me" once he trusts a little; threats may turn him violent), 3 `fuel_canister` (the hold, the island  wreck, or distilled: 3 cane ferments + scrap + pot + fire), repairs by Jonas (rescued in caves3 with a splint and a meal,  he waits at the shuttle: 4 scrap + 3 wire). Launch window: dawn 4:30-6:30, or 20-23 h once the relay mast talked to the  Meridian (`orbit_data`; the mast is now optional and no longer wins), never in a storm. `ending()` tells what became  of everyone, `credits()`.- **Quest**: chapters 1-4 as before, 5 *Le secret des Haldi*, 6 *Les gens du fleuve*, 7 *Les jonctions*, 8 *La clé de Vask*,  9 *L'envol*; `OPTIONAL` (the mast, the cub, a companion). Old saves (no `v2` key): `Game::migrate()` (a returned tuner =  Maëva's trust, a transmission = the orbital windows, the chapter told reset).- **People** (`Land\People`, `Land\Talk`): 13 named NPCs (Maëva wise, Oko greedy, Sela empathic, Koru proud; Aïka proud,  Tamu empathic, Nadjé greedy; Vask proud, Grell coward, Mira paranoid; Orsolo mad, Kessa paranoid; Jonas wise), hidden  trust -100..100 (`$people`), memory (lies, threats, gifts, promises), days visited, gossip (30 % to the group, the Haldi and  the Rôdeurs as foes). Every answer has a tone (kind honest lie threat gift joke flatter trade) shown as a tag; the  personality reacts (`People::REACT`, a mad man's mood flips). Outcomes: help, trade, give their part, betray (Mira),  attack (`People::makeHostile()`, striking a friend turns the whole group), surrender (Grell), follow (Tamu, Grell).  Rôdeurs: a *parley* action (hands up) stops them; a truce (30 cr) keeps them calm.- **Money** (`Land\Economy`, `Talk::SHOPS`): barter first (Oko's old table), then `credit` (crédits Halde) found in the  canyon (the old counter 40, the rack 25), bodies and wrecks; `credits_known` when first seen. Merchants Oko, Koru (forge  plan, machete), Nadjé (ferment, smoked fish, harpoon), Grell (cells, gun parts, crossbow plan), Kessa (remedies); buy price  ×0.8-2.0 and sell ×0.3-0.8 by trust and the group's reputation; stocks are kept in the flags. Services: Sela's care,  Tamu's passage across the river (10 cr), Vask's truce.- **Weapons** (`Sim\Weapons::STATS`): hands, stick, club, flint knife, axe, spear, machete, harpoon, pole, sling (stones),  bow (arrows of flint, bone, metal), crossbow (bolts), flare gun (sets fire, scares), pulse rifle (repaired from the broken  one with gun parts + its plan; 6 shots a cell), plasma gun (3 a cell, fire). Wear in `Inventory::$cond`, breaks at 0,  repair from the context action. Melee: a blow within 0.6 s of a beast's lunge is a counter (×1.6). Arrows are pulled back  45 % of the time. Blueprints are kept as recipe tools.- **Fire and lightning** (`Land\Wildfire`): blazes grow on burnable biomes (`BURN`), with dryness (zone, hours since rain,  rain now) and the wind (`$wind`), throw sparks downwind, scorch trees to `burnt_tree`, make animals flee, burn Rob's legs,  die in the rain leaving `$burnt[zone]` (ash: charcoal to pick). Storms throw lightning every 6-22 s: tall trees and high  ground draw it, Rob on a summit (`exposure()`, metal in hand) may be struck; `$events` gives the scene the flash and the  thunder after distance / 343 m/s. A torch can set grass on fire; a campfire in dry grass and wind may escape.- **Raft** (`Land\Raft`): 4 logs (recipe: 2 wood + axe) + 3 rope by deep water; board, pole (faster) or hands, the river's  current pushes south, rocks and banks wear it, repair (rope + wood), land; fishing from it; the croc rams it.- **Companions** (`Land\Companions`): the cub (heal + three meals hours apart → tame; follow / stay / hunt orders through a  small dialogue; growls at danger, bites foes, hunts; hunger, leaves after a day starving) and a human (Tamu at trust ≥ 40,  or Grell spared): +8 kg carried, fights, keeps watch (no prowler at night), eats once a day, leaves after two hungry days.- **Survival**: food spoils (`Catalog2::SPOIL`, `Inventory::$age`, cold ×0.5, heat ×1.3) into `food_rotten`; smoking and  drying keep; butchering gives meat, hide, fur, fat, bone, croc scales, crab meat and shell; new creatures `river_croc`,  `climber` (steals food), `fish` (harpoon), `lava_crab`, `stalker_cub`.- **Ui**: dialogue box with tone tags, the person's attitude and who they are; phones: full-width rows 52 units tall, text  ×1.3 (`Canvas::$boost`) and 14 px minimum, the dashboard shows only the four worst gauges (tap: the rest); P (and pad Start)  pause, shown in the controls; the victory screen tells the ending paragraph by paragraph, then the credits. Test bench  param `talk` (a People key) opens a conversation.- **View fields used** (set in the scene, guarded by `property_exists`): `fires[]['r']`, `lightning`, `raft`, `burnt`.- **Phones, screens** (`Ui\PhoneScreens`, a trait of `Screens` used when `touch`): six big tabs, then one column at a time:  a list of big rows (drag or wheel to scroll; a tap acts when the finger lifts without dragging), a tap opens the row's page  (item: description, stats, use / drop / quick slots 1-4; recipe: needs with what you have, Fabriquer; body part: wounds,  cares to apply, the clothes of that part), ‹ Retour, × Fermer. Scanner: battery, echoes by distance (tap: the compass  points there), GPS points. Map: the square map. Journal: goals, the shuttle's status, optional goals, logs. `UiInput::$held`  carries the finger. Phone HUD: the hand and 4 quick slots are icon buttons in their own strip, bottom right.  Test param `screen` opens a tab. Weather tables: marsh (fog, drizzle), jungle (warm rains, storms), coast (sea mist, wind).## Graphics quality, Auto, software rendering (2026-12)A player's Chrome drew WebGL on the CPU (SwiftShader: chrome://gpu "Software only"), so the game must run on very slowmachines too. `Render\Quality` (levels, labels, renderer name), `Render\AdaptiveQuality` (the governor, pure logic).| Level (`rv_quality`) | 3D resolution | Shaders | World ||---|---|---|---|| `ultra` "Très basse" | the view: 320 x 240 (`setLayer('below', 'view')`), ~20x fewer pixels than a 1080p window | QUALITY -1: one macro noise fetch, no specular / gloss / rim, no triplanar, no detail maps, alpha-tested leaves | view 70 m + 110 m outer in fog, props 55 m (far LOD only), small things 18 m, no grass, bodies 65 m, 300 rain quads || `low` "Basse" | window | QUALITY 0 (no detail maps, no dithered leaves) | 110 m, no grass || `medium` "Moyenne" | window | QUALITY 1 | 170 m, grass || `high` "Haute" | window x 2 supersampling while w x h x 4 <= `Quality::MAX_PIXELS` (3 M; a 1080p window gets 1x) | QUALITY 2 | 240 m, dense grass |Measured headless on Mesa llvmpipe (a stand-in for a software renderer), 640 x 480 window, same view: ultra 18 ms aframe, low 67, medium 102, high 320.- Option "Qualité graphique": Auto (default) / Très basse / Basse / Moyenne / Haute (saved in `rv_quality`; a forced  level turns the governor's changes off, it still measures). Auto starts at `rv_quality_auto` (the level it settled at  last time), else medium on a computer, low on a phone.- The governor: wall-clock time between frames (`update()`), frames over the last 2 s, only in play / title with the 3D  shown (paused behind the loading card, menus, screens, dialogues, a hidden tab; hitches > 0.5 s are not frames; 1.5 s  settling after a start or a change). Under 40 i/s for 4 s: one level down, toast "Qualité graphique abaissée à Moyenne  pour garder le jeu fluide (34 i/s)."; over 58 i/s for 20 s: one level up, never back to a level that was too slow. A  change rebuilds the zone behind the loading card.- Software rendering: `Quality::renderer()` reads glGetString(0x9246 UNMASKED_RENDERER_WEBGL, 0x9245, GL_RENDERER,  GL_VENDOR); `Quality::isSoftware()` matches SwiftShader / llvmpipe / softpipe / Software / Basic Render. Detected: Auto  starts in ultra and a panel explains how to turn the graphics card on (dismissed once: `rv_soft_dismissed`). In the  browser the unmasked name needs the WEBGL_debug_renderer_info extension, which the engine's emscripten glue does not  enable (it skips "debug" extensions): Chrome then only says "WebKit WebGL", so the detection there is the frame rate:  ultra still under 20 i/s for 4 s shows the same panel. Headless runs (llvmpipe) skip the detection.- Option "Afficher les images par seconde" (`rv_fps`): "52 i/s · Auto (Très basse)" in the top right corner.- Test params: `quality`, `start`, `adaptive`, `frame_ms`, `gpu`, `fps` (RevisitedScene's docblock).## Comfort: zoom, eye height, sway, crouching (2026-12, motion sickness)- Field of view (horizontal, `View::$fov`): 80° by default (was 70°), the mouse wheel in play mode only (up: zoom in,  down: wider; screens keep their wheel for scrolling) by 4° a notch, 45°..105°, option "Champ de vision" (±5°), saved  `rv_fov`. No pinch (the engine's Touch has one finger).- "Hauteur des yeux": Normale / +15 cm / +30 cm (`rv_eye_lift`, the camera only: Game's logic keeps its eye).- "Balancement de la vue": Normal / Réduit (default, x0.4) / Aucun (`rv_bob`): the held item's walk sway.- Crouching: the eye's height eases (critically damped spring, ω = 18, solved exactly per frame: ~0.25 s, no overshoot,  same at any frame rate) between Game::EYE and Game::CROUCH_EYE; the walk sway is halved while crouched.- Test params `fov`, `eye`, `bob`.## Menus with the mouse, Quitter (2026-12)- Canvas hit regions: `hitAt()` answers with the regions of the last frame drawn (set in `end()`; before, they were two  frames old: a menu just opened answered with the old menu's rows). The pointer is turned into units by  `Canvas::toUnits()` from the letterbox and the drawing scale: right at every window size and with `uiscale`.- A row takes the selection when the pointer moves over it; a click runs the row clicked (never the keyboard's); a  menu that opens under a resting pointer keeps its keyboard default.- Leaving play (a menu, a dialogue, a panel) forgets the look drag: the click of "Reprendre" or of a last dialogue  choice, the button still held, never turns the view.- "Quitter le jeu" on the title card, the pause, death and victory menus, everywhere: `Engine::quit()` (desktop: the  window closes; browser: the engine page goes to `?back=`, tells a portal frame, else "thanks for playing" — it does not  call window.close(), even in an installed PWA window: an engine change).## Saves: 20 named slots + the autosave (2026-12, player feedback)- `Ui\SaveStore` over the engine's storage (`var/` on a computer, IndexedDB in a browser): `revisited/index.json` (the  metadata of every slot: the lists load without reading any game), `revisited/slot-01.json` … `slot-20.json` (compact JSON  of `Game::toArray()` + quick slots + hints + play time, ~20-90 KB) and `slot-NN.png` (the preview, 160 x 120, ~15-40 KB).  Metadata: name (editable, 40 characters; default "Rob — <zone>, jour N"), real date, game day and hour, zone, chapter and  objective, health / hunger / thirst / temperature / fatigue, play time, shuttle parts fitted.- **The autosave** is its own slot (`auto.json` / `auto.png`, "Sauvegarde automatique"), never one of the 20: written every  game hour of play and when the game is left (pause → leave, the window / tab closed, `exit()`); never on death or victory.  The player's 20 slots are written only by "Sauvegarder" (choose a slot; overwriting asks first).- The single save of older versions (`revisited.json`) moves into slot 1 once (`SaveStore::migrate()`).- Title: **Reprendre** (the most recent of the autosave and the slots, the row selected when any save exists), **Charger une  partie…**, Nouvelle partie. Pause: Sauvegarder…, Charger une partie…; leaving with progress not saved in a slot of the  player's asks "Sauvegarder avant de quitter ?" (Oui: the save screen then away; Non: away, the autosave only; Annuler).  Loading from the pause with unsaved progress asks "Quitter la partie en cours sans sauvegarder ?". Death: Reprendre la  dernière sauvegarde, Charger une partie….- `Ui\SaveScreen` (mode `saves` of the scene): rows with the preview and the metadata; buttons Charger / Écraser, Renommer,  Supprimer (the autosave: Charger, Supprimer), "Nouvelle sauvegarde" first in the save list (then its name is asked). Keys:  ↑ ↓ row, ← → button, Entrée, R rename, Suppr delete, Échap back; mouse click / wheel; pad: the same with A / B; phones:  one column of 168-unit rows, a drag scrolls. Renaming: the keyboard types (SDL text input: layouts, accents), the letters  drawn under the field serve the pad and the mouse; in a browser on a phone the scene sends `textinput` to the page  (`engine/web/jumphp-keyboard.js` opens the phone's keyboard).- The preview (`Ui\SavePreview`): the 3D view read back with `glReadPixels` (row by row, in the overlay before the dashboard  is drawn: the same frame, so WebGL too) when the pause opens; a save made then uses it; otherwise (autosave while playing,  no GL) the land around Rob is drawn from the map (biomes shaded by slopes, things, Rob's arrow, tinted by the hour) and the  real view replaces it a frame later when the 3D is on screen.## Collisions: nothing walks through the solid things (2026-12)- `Land\Solids::SHAPES`: the solid kinds as circles on the ground in the thing's frame (× its scale, turned by its yaw):  rocks, boulders, basalt columns, every tree's trunk, huts, stilt huts, tents, crates, the pod, the colony wreck (3 circles),  the shuttle (8 circles along its hull), boat and drone wrecks, stalls, totem, forge, mast, racks. Bushes, reeds, herbs,  small stones, fires, springs, exits are walked through; a bundle Rob put down too.- `Zone::solidHit($x, $z, $r)`: the circles filed in a grid of 4 m squares (rebuilt when `Zone::$version` or the number of  things changes), one square looked at: ~0.03-0.06 ms for a whole `Game::update()` with 10-24 creatures and people.- The same rules for everyone (`Solids::step()`): walls / cliffs (`Zone::solidAt` at four points of the body, at most  `Solids::WALL` m out so the cave passages stay open), then the circles with the body's radius (Rob 0.3, people 0.35,  animals by species), slide along the circle hit (the tangent of the step), else turn aside by growing angles; animals and  people keep the side they chose a moment (`data['av']`) so that they walk round instead of dithering. Rob: per-axis  moves + the same tangent slide. Anyone found inside a solid thing (spawned there, a thing built on them, an old save) is  pushed out to the nearest free side (`Game::unstick()`, every frame). Birds and swarms fly over the things.- The context action measures solid things to their surface (the shuttle's hull, a big boulder: `Zone::bigThings()` are  looked for further than `thingsNear(7)`).## Climbing stakes (2026-12)- Items `climbing_stakes` "Pieux d'escalade" (3 sticks + 2 fibres, knife; ~40 m of rise) and `ice_pick` "Piolet de fortune"  (stick + 2 bones + rope, knife; 3× the life, 35 % faster), tool `climb`, used by themselves from the bag.- `Game::climbStep()`: when walking fails on a slope steeper than `ZoneFactory::MAX_SLOPE` or into a cliff (a solid cell  outdoors, not the zone's edge; never a cave's walls), Rob climbs along the direction asked at `Game::CLIMB` = 0.6 m/s of  rise, `$climbing` true: effort 2.0 for the body plus `CLIMB_FATIGUE` rest a second, the tool loses 2.5 % (ice pick 1 %) a  metre risen and breaks at 0, a slip when exhausted or the arms hurt (slides 3 m down and falls: `land()` hurts). Event  `climb` (Soundscape: pebbles, a strike, a breath); the first climb says how it works (flag `climb_told`).- The canyon's tallest mesa has "Cache du guetteur" on top (credits, energy cells, gun parts, rope, a ration): walls only  the stakes get up (added last in the zone: older saves keep their thing ids).## Putting things down, choosing what the action is about (2026-12)- `Game::dropBag($id, $n)` ("Poser": inventory screens) takes the items out of the bag (hand / worn slot freed, quick slots  cleared when none is left) and `drop()` lays them `DROP_AHEAD` = 1.35 m in front of Rob on a free spot (never in a rock  or a wall; at his feet when water is ahead), joined to a bundle there (`data['bundle']`, label "Reprendre tes affaires  posées"). `drop()` alone (what did not fit in the bag) does not touch the bag.- `Game::thingsAhead()`: every thing within reach, the one nearest the crosshair first (angle between the gaze, pitch  included, and the thing); a bundle Rob put down comes last and its actions after everything else of the spot unless he  looks right at it (`LOOK_AT` 0.16 rad). `cycleFocus()`: G, the pad's right stick click, or the "⇄ 1/3" pill under the  prompt (phones) picks the next candidate; the choice holds while the same things are within reach.## Two hands, timed blows, the torch against the crawlers (2026-12)- **Two hands** (`Inventory::$hand` right, `$handLeft` left, `$stowedLeft`): a torch goes to the left hand by itself  (`LEFT_FIRST`), weapons and tools to the right one; `equipLeft()` / `equipRight()` / `swapHands()` (X) /  `heldSlot()` / `holds()`. Two-handed (`TWO_HANDED`: bow, crossbow, pulse rifle, plasma gun, raft pole): equipping  one stows the left item into `$stowedLeft`, putting it away (or taking a one-handed weapon) gives it back; a torch  taken while a bow is held puts the bow away. Spear, harpoon, axe, sling stay one-handed (torch + spear: the cave  hunter). One item cannot be in both hands unless two are carried. Old saves (no `handLeft` key): a torch in `hand`  moves to the left hand. `Game::torchLit()` = a torch in either hand.- **Timed blows** (`Game::swing($side)`, `advanceSwing()`, `$swing`, `swingPhase()`): the press starts the  anticipation, the damage lands at `Weapons::windup()` (stab 0.1 s, swing 0.22, chop 0.16, thrust 0.18, bow draw  0.42, crossbow 0.06, guns 0.05, sling whirl 0.45), the recovery fills `Weapons::duration()` (the weapon's `cool`,  never less than the strike + 0.25). The counter window is measured at the press. Left-hand blows do ×0.75.  `Game::attack()` still strikes at once (tests); the context action "Attaquer" starts a swing. Events at the strike:  `swing` (melee), `bow` / `zap` / `flare` (shots), `hit` when it touches (`$hitAt`: the view's nudge).- **Controls**: attack = F, a left click on the view without a drag (press + release moving < `CLICK_SLOP` 6 px within  0.5 s; a drag still looks), pad RT, phone ATTAQUE. Left hand = V, a right click without a drag, pad LT, phone TORCHE  (shown only with something in the left hand / a lit torch); the journal moved to the left stick click. X swaps hands.- **Brandish** (`Game::leftHand()`, `brandish()`, `brandishPhase()`, 0.7 s, burns 2 min of the torch): crawlers within  8 m flee 5-8 s (`data['scared']`), stalkers / cubs / climbers / swarms within 7 m at night or in caves 4 s, brutes,  crocs, burrowers within 4 m 1.5 s; one right in front is singed. Context prompt "Brandir la torche vers …" when a  crawler or stalker closes in.- **Crawlers and the flame** (`Wildlife::crawler()`): a lit torch draws them from 14 m but they keep `TORCH_KEEP`  4.5 m, circling, facing the flame, hissing (state `keep`, sound `crawler_hiss`); too close they back off. Cornered  (cannot back away for 1 s) or starving (kept off `CRAWLER_STARVE` 40 s) one lunges once, then keeps off again. No  flame: they hunt and bite as before. Stalkers keep 7 m from a torch in either hand; a brute at night keeps 5 m.- **First person** (`Render\HeldPose`, pure maths; `View::$heldLeft`, `attackPhase`, `attackKind`, `attackStrike`,  `attackSide`, `brandish`): the left item drawn on the left, the right one on the right; per kind an anticipation →  strike → recovery (club / axe / torch raised then rolled down across the view, machete diagonal slash, knife stab,  spear thrust, bow drawn with a tremble then released, crossbow / guns recoil + muzzle flash, sling whirl), the torch's  sweep with a trail of flames, the torch light on its hand's side. The scene nudges the view when a blow lands and  kicks it up on a shot.- Test bench params: `hold` ("torch,club": given and taken in hand in order), `beast` + `beast_dist` (one creature in  front, the others gone).## Fitness (Sim\Body, long term)Two percentages around 0 (FIT_MIN -20 .. FIT_MAX +40), saved in `Body::toArray()['fit']` (older saves: 0):- **Endurance** (cardio): trained by running (1), sprinting / climbing (1.5), swimming (0.6) per game minute;- **Force**: trained by `Environment::$strain` (climbing 1.2, fighting 1, a bag over half full: up to 1) and  `Body::train('force', min)` (a tree chopped 12, a rock 10/5, a blow 1).A day's gain = FIT_GAIN (1.5 / 1.2 %) x (1 - e^(-minutes / FIT_TAU (60 / 45))) x the room left (1 at 0 %, 0 at the top)x trainFactor() (hunger, thirst, fever, poison, infection, pain slow it). A day with little training loses FIT_DECAY0.8 %/day above 0 (half, shrinking, below 0), faster when sick or hurt. Effects: endurance -> effortCost() (fatigue ofeffort), recoveryFactor() (rest, sleep), sprintThreshold() (longer sprint), exert() (climbing); force -> carryFactor()(Inventory::$carry, capacity x 0.9 .. 1.2), strengthFactor() (melee damage), exert(). Each 5 % step crossed is said inthe log and as a toast (Game::takeNotices()); the Body tab shows "Endurance +12 %  ↑ +3 % en 7 j" (BodyPanel::fitnessRows()).## Chests: storage Rob builds (2026-12)- **Items / recipes** (`Sim\Catalog2`, `Land\Chests::KINDS`): *Coffre en bois* `chest_wood` (3 bûches, 2 cordes, 2 bâtons; a  knife, an axe or a machete: `Crafting::TOOL_ANY`; 60 min; 6 kg; holds 40 kg / 24 kinds), *Panier tressé* `basket` (8 fibres,  3 roseaux, no tool, 30 min, 0.8 kg; 12 kg / 10 kinds, no lid), *Caisse renforcée* `chest_metal` (3 bûches, 4 ferraille, 2 fil  de cuivre; knife or axe; 90 min; 9 kg; 80 kg / 36 kinds, sealed). Item kind `tool`, tool `store`; "Poser devant toi" in the bag.- **Putting down** (`Chests::place()` / `spot()`): 1.5 m in front of Rob (then a little further, nearer, ±20°/40°), never in a  solid thing (`Solids::free` with the chest's footprint), a wall, the water, on Rob or on a step > 1.2 m; refused while  swimming / on the raft. It becomes a thing of the same kind, front turned to Rob, named "Coffre N" / "Panier N" / "Caisse N"  (`flags['chests']` counts them), solid (`Solids::SHAPES`). Contents in `data['store']` (items, food ages, wear) → the zone's  save diff: they stay across zone changes and saves.- **Actions**: "Ouvrir : Coffre 1" opens the transfer screen (`Ui\ChestView`, mode `chest`; `Game::$chestOpen`, the lid drawn  open: `Thing::$left` 0); "Reprendre : Coffre 1 (vide)" only when empty (decided: never with contents), also "Emporter" in  the screen. Transfer: ← → side, ↑ ↓ item, Entrée / pad A / E one, X the stack, PgPréc / LB / 1 "Tout ranger" (all but what  is held or worn), PgSuiv / RB / 2 "Tout prendre" (lightest first, within the bag's weight), Échap / B closes; mouse: click  picks, re-click moves one, buttons, wheel. Phones: two tabs (Ton sac / the chest), each row's "1" and "Tout", the two big  bottom buttons, drag to scroll. Limits: the chest's kg and kinds, the bag's kg; what Rob holds or wears never leaves.- **Food** keeps spoiling, lazily (`data['t']`, caught up when opened / used): chest ×0.8, crate ×0.6, basket ×1; cave /  plateau ×0.5, hot zone ×1.3. **Thieves**: chests and crates are safe; a climber within 30 m of a basket while Rob is 12 m  away or more may steal one food (25 % per game hour, checked every 2 s of play, not while sleeping); told on the next opening.- **Map / radar**: every chest of the zone is a marker on the map (named, legend) and an echo on the radar (category "Tes  coffres", kept at the edge when far); the phone scanner lists them. Models: `Render\Props::chestWood / basket / chestMetal`  (planks + iron bands + lock, woven body + rim + handles, riveted crate + rusty bands + latch), lid open pose.- Test bench: `chest` => kind (one put down in front of Rob, filled; `chest_fill` false: empty), `menu` => `chest` (opened).## Fire only with its tool in hand, wheel scrolling (2026-12)- "Allumer un feu" (context action, its hint, the gauge menu) is offered only with a fire tool **in a hand**:  `Game::fireInHand()` = an item of tool `fire` (the fire drill) in either hand, or a lit torch (a torch held); the flare  gun does not count. With the drill in the bag the gauge menu offers "Prendre le foret à feu en main"; `lightFire()` refuses  without one in hand. Plus the wood (a log, 3 sticks or the fire kit), as before.- The wheel (`Ui\Wheel`): fractions add up (no delta rounded to 0), the view moves and the selection follows into it (it  never snaps the view back), scrolls are clamped to [0, rows - visible] whenever a list shrinks: the desktop inventory  grid (`Screens::$invTop`, now wheel-scrolled), the crafting list, the save list, the chest screen; phone pages clamp to  their real content height after each draw.## Experience and talents (2026-12)- `Sim\Talents` (saved in `Game::toArray()['talents']`: `xp`, `ranks`; older saves: level 1). Experience per kill by danger  (`KILL_XP`: grazer 8, crawler 16, burrower 30, stalker 40, croc 55, brute 70, the Old Jaw 200; a hostile human 35, Vask 70),  feats (`FEAT_XP`: a recipe made the first time 6, again 1, a new region 25, a chapter 40, a counter 4). "+N XP" in the log.- Levels: from L to L + 1 takes round(40 x L^1.5) (40, 113, 208, 320, 447...), level 20 at most; each level one point.  Level up: log + toast ("Niveau 3 ! +1 point de talent…"), sound `levelup` (quest).- Three branches, 12 talents (ranks): **Combat** Bras puissant (3: +8 % melee), Sens du rythme (3: cursor's critical zone  +30 %, counter window +0.12 s), Appuis solides (3: wounds −8 %, stagger −25 %), Jeu de jambes (2: dodge −25 % effort,  +0.08 s safe); **Survie** Estomac frugal / Gorge sèche (3: hunger / thirst −8 %, `Environment::$hungerMul` / `$thirstMul`),  Peau dure (3: 1.5 °C less cold felt, `$coldResist`), Cueilleur (3: 20 % chance of one more when picking / harvesting);  **Artisanat** Soin des outils (3: wear −12 %), Dépeceur (3: +20 % meat, hide, fur, fat), Mains habiles (3: crafting  −15 % time), Réparateur (2: +20 condition per repair).- Ui: tab **Talents** (L; `Ui\TalentsView`: level bar, points, three columns of cards, + to learn; keys arrows / Enter);  phones: the seventh tab (`PhoneScreens::pTalents` / `pTalent`, "Apprendre (1 point)"). The Corps tab shows the level and  its XP bar under the fitness (click: the Talents tab). Test bench: `level` + `talents` ("power,frugal").## Combat mode (2026-12)- `Land\Combat` (`Game::$combat`, not saved): engages when a hostile beast hunts Rob within 12 m, winds up a blow, an angry  crawler, a hostile person attacks, or Rob strikes one; lets go 1.25-2.5 s after the target died, fled, wandered off or is  22 m away. HUD (`Hud::combat()`): the target's name, health bar, intention (Va frapper ! / Va charger ! / Te vise ! / Tenu  par la flamme / Fuit), a red pulsing glow and a fill while a blow is wound up, the keys to dodge / counter; popups (damage,  CRITIQUE ×1,5, Faible ×0,7, Contre !, Esquivé !); a hit marker round the crosshair. Soft camera assist (yaw, and pitch  toward a low beast within 8 m) only after 0.6 s without the player looking (`Intent::$assist`).- **Telegraphs**: beasts wind up their bite (`Combat::WINDUP`: crawler 0.5 s, stalker 0.6, burrower 0.5, brute 0.85, croc 0.7,  crab 0.45, swarm none; `data['wu']`), people their blow (0.55, Vask 0.44) and archers their aim (0.6). The blow lands only  if Rob is still within reach (`Wildlife::REACH`) and not dodging. Bites do ×0.85 of before.- **Counter**: a blow pressed (or released) while a foe within 4 m is in the last 0.35 s (+ talent) of its wind-up, or within  0.6 s after a lunge: ×1.6, the foe's blow is broken off, it staggers 0.7 s.- **Precision cursor** (combat mode, melee): the first press aims (the weapon stays drawn back, the bar sweeps in 1 s), the  second strikes: centre (16 % wide, +30 % a Sens du rythme rank) critical ×1.5, the middle (±32 %) ×1, the edges ×0.7; no  second press: weak at the end. Ranged weapons keep their accuracy model.- **Dodge**: in combat mode the jump key (Space, pad A, phone SAUT → ESQUIVE) dodges unless forward is held: a step back, or  aside with a turn held; 2.6 m in 0.26 s, safe 0.32 s, 0.7 s between two, 1.6 rest. A hit staggers Rob (×0.5 speed, 0.45 s).- **Fleeing works**: a chase tires the hunter (full speed 3 s, then down to half at 8 s); 10 s of chase without a bite while  Rob keeps 4 m away, or `GIVE_UP` metres behind (stalker 30, crawler 16, brute 28), and it gives up for 14 s ("… abandonne  la poursuite"). A stalker under 40 % health flees.- **Crawlers and the blade**: any melee swing within 5.5 m of crawlers (even held off by the torch) makes them angry 30 s  (`Wildlife::provoke()` / `anger()`, they call the others within 12 m): they attack in spite of the flame; a brandish still  scares them off. A blow on a crawler angers it too.- Hints: the big centre hint and the small marker under the crosshair are never drawn together (`Hud::BIG`).## The shield, rounder people, soft smoke, ground cover (2026-12)- **Shields** (`Sim\Catalog2`, `Sim\Weapons::SHIELDS`): *Bouclier en peau* `shield_hide` (2 hide + 3 sticks + rope, knife, 40 min;  stops 60 % of a frontal blow, wears fast) and *Bouclier de ferraille* `shield_scrap` (4 metal scrap + 2 wire + hide, knife,  70 min; 80 %, heavier: tires more, wears slowly). Kind `tool`, tool `shield`; repaired from the context action  (`repair_shield`: hide + rope / scrap + wire). Icons in `Ui\Icons::shield()`.- **Equip rules** (`Inventory::SHIELDS`, `LEFT_FIRST`, `isShield()`, `shield()`): always on the left arm (`equipRight()` sends it  there, `swapHands()` refuses); a two-handed item stows it in `$stowedLeft` and gives it back; **the torch or the shield**:  a torch taken (either hand) puts the shield away, a shield taken puts a right-hand torch away.- **Guard** (`Game::guard()`, `$guardAt`, `guardPhase()`): the left hand's action *held* (V, the right button held — with a  shield it no longer turns the view —, pad LT, phone PARER) raises it in `GUARD_UP` 0.15 s; not while swinging, swimming, on  the raft or with rest ≤ `GUARD_MIN`; guarded steps ×`GUARD_SPEED` 0.55, no running. A press never swings a shield.- **Blows** (`Game::shieldCheck()` pure, `blockBlow()` applied; called by `Wildlife::bite()` and `Folk` melee and arrows): only  from within `GUARD_ARC` of the gaze. Within `PARRY` 0.3 s (+ Sens du rythme) of the guard going up a melee blow is  **parried**: no harm, the foe reels `STAGGER_PARRY` 0.9 s, its blow broken, a cooldown, counter XP, and the next blow is a  counter (`parryAt`). Otherwise **blocked**: the shield's share stopped, what is left bruises the left arm (under 0.06:  nothing), rest spent (`tire` × (0.6 + severity)), wear (`wear` × (0.5 + severity), talents' wear apply); at 0 it breaks  and the guard drops. Popups "Parade !", "Bloqué −80 %"; events `guard`, `block`, `parry` (sounds). The combat HUD's help  says "V : parer" when a shield is held.- **First person**: `HeldPose::shield($raise)` (left-hand terms, no mirror): lowered at the side nearly edge-on, raised across  the lower left, its top under the crosshair, its back toward the eye; `View::$guard`. Models `shield_hide` (laced hide on a  stick frame, painted band) / `shield_scrap` (riveted plates, hide lining), grip and strap behind. Bench params `held_left`, `guard`.- **People** (`Render\Bodies::human()`): the trunk tapers (hips, waist, rib cage, chest; women: a smooth bust in the trunk's  sections), its top widens over the shoulder joints and slopes to the neck (no ledge, no ball joints); the arm grows out of  that dome (deltoid), biceps, a slight elbow bend, forearm swell, a slim wrist, hands clear of the hips with a palm, curled  fingers and a thumb; legs with thigh, knee and calf. Garments that sit on the shoulders (shawl, hermit's coat, cape,  collar, shoulder plate, necklace) follow the new line. Same bones, same poses. Bench: `mode people`, `row` 0-2 factions,  3-5 walk / talk / attack / idle, 6+ sit / sleep / work / aim.- **Smoke and steam** (`Graphics::drawPuffs()`, `Shaders::PUFF_VS`, `FLAME_FS` modes 2 and 3): puffs are quads turned to the  eye, queued during the frame and drawn after everything else. *Smoke* (blazes; campfires now have a thin pale column) is  **alpha blended**: `WebGl::draw`'s blend also blends the layer's alpha (a·a + (1 − a)) and the composite multiplies by it,  so the shader solves for the blend alpha and colour that give the transmittance asked (exact for one puff, a little denser  where puffs overlap — fine for smoke), far to near. *Steam and spray* stay dithered (a bright veil cannot be blended that  way: it would darken the sky): more dots than the opacity asks (a^0.42), each taken toward the haze colour (`u_behind`),  so the dots stand out less. Every moving dither (`ditherT`: flames, steam, rain, snow, falls, bolts) is interleaved  gradient noise with a little white noise, moved each frame (`u_dfr`); still edges (leaves, the water's rim) keep a steady  pattern. Supersampled (high) it reads as a soft veil.- **Ground cover** (`Graphics::buildGrass()`, `Shaders::GRASS_FS`, PROPS_VS `GRASS`): 7 candidates / m² × density, kept by  the biome and by patches (value noise at 9 m and 2.6 m: thick, thin, bare); small tufts (two cards, 10-45 cm) drawn by their  own program that colours them from the ground textures under them (the terrain's tints and macro patches, sampled soft),  darker at the root, greener toward the tip, jungle tufts green over the litter; toward the end of their reach they take the  ground's colour and sink into it (`u_grassFar`), so there is no edge. Ferns, leaves, reeds and flowers keep the props  program. Medium / high only (Quality settings unchanged).