#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>
This commit is contained in:
parent
0497029dae
commit
ad3be0c53c
17 changed files with 30435 additions and 29731 deletions
|
|
@ -54,3 +54,9 @@ property Sprite { id: int = 0, offx: int = 0, offy: int = 0, scale: int = 1, fli
|
|||
# read from the Map.* tilemap. tile > 0 sets the tile size in px; wall is the solid
|
||||
# glyph; oneway is an optional one-way-platform glyph (0 = none).
|
||||
property Solids { tile: int = 0, wall: int = 0, oneway: int = 0 }
|
||||
|
||||
# Optional single config entity defining a world boundary / play area (#84): a rect
|
||||
# (x, y, w, h) and a policy the engine applies to every moving Body each frame —
|
||||
# 0 clamp (walls), 1 wrap (toroidal), 2 bounce (flip velocity), 3 kill (despawn when
|
||||
# fully outside). Off by default (no Bounds entity = open world).
|
||||
property Bounds { x: int = 0, y: int = 0, w: int = 0, h: int = 0, policy: int = 0 }
|
||||
|
|
|
|||
|
|
@ -21,3 +21,4 @@ provides "Body"
|
|||
provides "Collider"
|
||||
provides "Solids"
|
||||
provides "Sprite"
|
||||
provides "Bounds"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue