# Entropie – rules for changing the code Do's and don'ts that keep the game clean and quick. Short on purpose: add a rule when a mistake shouldn't happen twice, drop one when it no longer holds. Structure: [ARCHITECTURE.md](ARCHITECTURE.md). ## Do - Keep the layers: `render` never includes `world`, `people` or `game`. - Turn things with the helpers in `math/linalg.h` (`yaw_facing`, `yaw_along`, `yaw_front`). Fronts are +Z, lengths are +X. - Tunables as `#define` at the top of the file, with unit and meaning. - Ask "what's near" through the `Grid`, rays through `World_rayCast` / `Collider_ray`, the ground through `World_groundHeight`. - Static things go in before the terrain; things lying on the ground are placed after it (`Scene_finish`, `Site_finish`). - A new building part: `manor.c`'s `Plan` (boxes, walls with gaps, openings). - Rebuild a mesh only when what it shows changes. - Compile without warnings: `-Wall -Wextra -Wpedantic -Wshadow`. - Characters moved by script (stepping over, onto, sitting down) use the set moves, never a jump of the position. Feet set down by script: the surface plus `BODY_ANKLE_Y` (scaled), not the ankle's height of the moment. - A collider's "up" face can be any of its axes (things lie on their side). - Every version: bump `VERSION`, update `STATE.md` (done items out of the to-do list, version line at the end), keep `README.md` short (a few lines per area: the details go into `STATE.md` "Playing it"), write `commit_message.txt` with this version's changes only. ## Don't - No `atan2f` for a yaw in new code, no `mat4_rotate_y` for an object's turn. - No allocation per frame, no loop over all objects inside a loop over all objects. - No reusing another kind's fields for a new meaning: add a field, say whose it is. - No moving static objects behind physics' back (use their own function, then `Object_syncColliders`). - No game rules in `render`, no input handling in `world` or `people`. - No snapping a character up more than a stair (`SNAP_UP_MOST`). - No copying a slab test, ray or spring: there is one of each (`Collider_ray`, `springStep`). - README: never name Ubuntu (Debian or "any Linux"), always the "100% Vibecode – but tested" line, no extra files nobody asked for.