ludic/changes/half-the-game.md
Orkuncakilkaya ad548840c7
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
feat(engine): #90 atlas-aware Sprite component, #91 become from listeners, 0.3.x ergonomics batch
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>
2026-09-04 01:36:08 +03:00

2.2 KiB

bump: minor type: feat The second "write less" round, all generic. ludic.gameplay: Stats carries the build stats every action game bolts on — damage_pct, crit_pct, leech_pct / leech_hp, thorns, fire_rate_pct — and Combat.damage applies them itself (a Crit event fires; thorns never reflect thorns); Stats.add(e, stat, amount) changes a base stat in place and Stats.scale_hp(e, percent) scales hp and max_hp; StatKind names every code. ludic.shooter: Dash { frames, speed, cooldown_frames } with Dash.start(e, dx, dy) / Dash.active(e) — a dodge roll with i-frames the package guards; Melee { range, half_arc, damage, knockback, frames, cooldown_frames, arc } with Melee.swing(e) (hits every hostile in the arc, knocks back, fires MeleeHit) / Melee.ready / Melee.active; projectiles drawn by the engine in their weapon's colour (Weapon.set_color); TopDown { reticle, reticle_length } draws the aim line and a mouse cross; the weapon system honours Stats.fire_rate_pct. ludic.dungeon (new package): Dungeon.arena / open_arena / random_style / set_exit / entry_point / opposite / at_edge, with Side and RoomStyle — arena rooms with mirrored cover, door lanes and exits by side, built into the engine tilemap. Compiler: scene Splash lasts N then Next (a timed scene), button … goto: Scene (a click changes scene, no listener to write). Runtime: Map.random_cell_far, Sprite.draw_meter (hearts / pips), Assets.enqueue_dir, Collider.center, Prefs.max. Also scene X loads then Y (the loading scene: pumped, drawn, AssetsReady fired), Prop.despawn_all(), Map.to_tile, and Brain { hunt_blind } in ludic.npcai (seek the nearest hostile without line of sight). Prefab.spawn_at(name:, at:) spawns and places; Weapon.reset(id) restores a definition (no pierce, no homing, its fire rate). Five regression examples cover the additions (examples/library/prefabs, component_access, scene_menus, managers, combat_kit). Random.weighted(weights:) draws an index by weight; ui widgets inherit font / size / fg / align from their panel; the input runtime names MouseButton { Left, Right, Middle }.