feat(engine): #90 atlas-aware Sprite component, #91 become from listeners, 0.3.x ergonomics batch
All checks were successful
bootstrap / cfree-fixpoint (push) Successful in 32s
ci / build-and-test (push) Successful in 2m49s
commit-lint / conventional-commits (push) Successful in 5s
docs / build-and-deploy (push) Successful in 30s

Closes the two open issues and lands the pending unreleased batch:

- #90: `Sprite { atlas: 1 }` routes esys_sprite through atlas_draw_ex
  (scale/flip/tint), so cell / cell_span / strip ids of any size draw
  through the engine sprite-render system. examples/library/sprite_atlas
  is the pixel-readback regression.
- #91: `become` from an @On(Event) listener / global handler / plain
  function no longer segfaults the compiler; it emits @L_scene_leave()
  (a dispatch on the live scene id) so the leaving scene's on-exit runs.
  UI_* handles are readable from any code (widget table built on first
  use). examples/library/scene_menus covers it.
- fix: a windowed `ludicc -o` build that reaches the audio runtime only
  through the atlas/Assets preload import now links audio.ll +
  AVFoundation (the audio backend link was gated on a game-level
  Audio.* call, so any windowed game declaring Sprite failed to link).
- the hand-written "Unreleased" CHANGELOG section is converted to
  changesets under changes/ so `x release` generates it.
- plus the batch: engine-driven retained UI + UiClicked event, Overlay
  phase, TileSkin tilemap-render system, Key.* constants, Font/Ui/File
  namespaces, Sprite.strip, prefabs, managers, countdown fields,
  enum-typed machines, layer @Queries, ludic.prefs / ludic.dungeon
  packages, Ai.seek pathing, Solids.solid2, cursor confine (mode 3)
  fix, shooter centre-aim fix, reserved-word function diagnostic.

Verified: x test (124/124), x test-tools, check-impl, check-vocabulary,
check-docs, docs-gen + docs-check, bootstrap-cfree (seed is a fixpoint).

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
Orkun ÇAKILKAYA 2026-09-04 01:36:08 +03:00
parent e9c2c51bc3
commit ad548840c7
139 changed files with 58981 additions and 43671 deletions

View file

@ -0,0 +1,19 @@
---
id: ivec2-along
name: IVec2.along
category: ivec2
kind: namespace-method
tokens: IVec2.along
sig: IVec2.along(origin, degrees, distance) -> IVec2
tip: The point a distance along a heading.
order: 23
ns: IVec2
member: along
---
The point <code>distance</code> pixels from <code>origin</code> along <code>degrees</code> — the tip of an aim line, the centre of a melee arc.
```ludic
# doc-check: skip — illustrative
let tip = IVec2.along(hero, aim, 18)
```

View file

@ -0,0 +1,19 @@
---
id: ivec2-distance2
name: IVec2.distance2
category: ivec2
kind: namespace-method
tokens: IVec2.distance2
sig: IVec2.distance2(a, b) -> int
tip: The squared distance between two points.
order: 20
ns: IVec2
member: distance2
---
<code>dx*dx + dy*dy</code> — compare it against a squared radius to avoid a square root.
```ludic
# doc-check: skip — illustrative
if IVec2.distance2(hero, foe) < 24 * 24 { … }
```

View file

@ -0,0 +1,19 @@
---
id: ivec2-heading
name: IVec2.heading
category: ivec2
kind: namespace-method
tokens: IVec2.heading
sig: IVec2.heading(from, to) -> int
tip: The direction from one point to another, in degrees.
order: 22
ns: IVec2
member: heading
---
The angle from <code>from</code> to <code>to</code> in whole degrees: 0 is +x, 90 is +y (screen y grows downward). Pair it with <code>Angle.diff_degrees</code> for an arc test.
```ludic
# doc-check: skip — illustrative
let to_foe = IVec2.heading(hero, foe)
```

View file

@ -0,0 +1,19 @@
---
id: ivec2-step
name: IVec2.step
category: ivec2
kind: namespace-method
tokens: IVec2.step
sig: IVec2.step(degrees) -> IVec2
tip: A -1/0/1 unit step along a heading.
order: 24
ns: IVec2
member: step
---
The heading snapped to the eight compass steps: each component is -1, 0 or 1. A roll or knockback direction from an aim angle.
```ludic
# doc-check: skip — illustrative
let direction = IVec2.step(TopDown.of(player).aim_angle)
```

View file

@ -0,0 +1,19 @@
---
id: ivec2-within
name: IVec2.within
category: ivec2
kind: namespace-method
tokens: IVec2.within
sig: IVec2.within(a, b, radius) -> bool
tip: Are two points within a radius of each other?
order: 21
ns: IVec2
member: within
---
True when the distance between <code>a</code> and <code>b</code> is at most <code>radius</code> (compared squared, no square root).
```ludic
# doc-check: skip — illustrative
if IVec2.within(hero, heart, 14) { pick_up() }
```