ludic/packages/ludic.core/package.ludic
Orkuncakilkaya ad3be0c53c
All checks were successful
bootstrap / cfree-fixpoint (push) Successful in 23s
ci / build-and-test (push) Successful in 2m23s
commit-lint / conventional-commits (push) Successful in 5s
docs / build-and-deploy (push) Successful in 28s
feat(input,ecs): #79 Input.axis_i directional int + #84 world bounds
#79 — Input.axis_i(neg,pos) -> int returns a -1/0/1 movement intent from the
multi-key device set, so WASD-to-movement needs no bool->int glue and feeds an
int mover directly (dx = Input.axis_i('a','d')).

#84 — a Bounds config entity (rect + policy, from ludic.core) drives the
engine-owned world-bounds system (LateUpdate): clamp / wrap / bounce (clamp +
flip Body velocity) / kill (despawn a body fully outside). Reads the Collider
size so the box stays inside; off by default, spliced only when Bounds is
declared (byte-identical otherwise). Adds World.despawn(e) — the by-id
reflective despawn (runs @OnDespawn + frees) via a new world_despawn intrinsic
whose @fn_world_despawn helper is emitted in emit_program's tail once a use is
seen (the g_uses_* prelude pattern), used by the kill policy and callable from
any system.

Examples input_movement + world_bounds. Full suite 112/0, goldens
byte-identical, fixpoint holds.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-09-02 07:44:41 +03:00

24 lines
1.2 KiB
Text

# ludic.core — the canonical engine-ABI components (#77).
#
# The engine-owned movement system (runtime/native/systems_move.ludic) reads
# Position / Body / Collider / Solids *by name* through the reflection ABI, but
# no package defined them — so every game and every example re-declared identical
# `property Position/Body/Collider` bundles by hand, copy-pasting the engine ABI.
# That is exactly the kind of thing a game developer should never hand-write.
#
# This package ships those bundles as the one canonical definition. A game
# imports them instead of copy-pasting, and extends by *composition* — attach
# your own components alongside on the same model; the engine still resolves
# Position/Body/Collider by name, and any field a game does not need simply keeps
# its default. It is an ordinary source package: AOT means the properties compile
# straight into the consumer's compile-time ECS with no ABI seam, and everything
# stays integer + Q16.16 deterministic (lockstep / replay / world_save hold).
package "ludic.core"
version "0.1.0"
kind source
provides "Position"
provides "Body"
provides "Collider"
provides "Solids"
provides "Sprite"
provides "Bounds"