7 Commits

Author SHA1 Message Date
Axel Meyer
b66c4ca4dd fix(vagrant): substrate leg.scl cycle restored; feet inherit_scale=false
User feedback after iteration-4: legs SHOULD cycle through +1/0/-1
(substrate-style — leg renders forward, under body, then behind body).
But feet must NOT Y-flip when leg.scl_y goes negative, and must NOT
collapse when leg.scl_y=0. They should follow leg-end position only.

Three changes:
1. walk_fwd_lower keyframes restored to substrate-style (leg.scl_y
   sign-flip on both halves: leg_l +1↔-1, leg_r -1↔+1). foot.pos
   animations REMOVED — cascade through leg.world.scl now correctly
   moves foot to leg-end position automatically (foot.local.pos
   stays at rest 25 in y).
2. foot.rest.scl: [1, -1] → [1, 1] (no Y-flip in rest, natural
   sprite orientation). inherit_scale=false → foot.world.scl stays
   at foot.local.scl=[1,1] regardless of leg.scl_y. Foot sprite
   never flips, never collapses.
3. Procedural extended: writes foot.local.rot = -leg.local.rot so
   foot.world.rot = body.world.rot (feet stay body-oriented even
   when legs rotate to walk-direction).

Speed slowed further from 0.5 → 0.4 (user: still too fast at 0.5).
2026-05-18 22:31:42 +02:00
Axel Meyer
bf5fe12e4c fix(vagrant): walk anim — slow to 0.5x, no leg.scl_y sign flip
User manual-test feedback after iteration-3 hip-stable + leg-rotation
fixes:

1. Animation too fast for actual map traversal → play walk_fwd_lower
   and walk_upper with speed=0.5 (effective 1.6s cycle, was 0.8s).
2. Second half visually broken → was substrate's sign-flip trick where
   leg.scl_y goes +1 (opposite of rest -1) and foot.pos.y flips
   negative. Cascade foot.world.scl_y = +1 * -1 = -1 → foot rendered
   Y-flipped. User: 'die füße ... darf hier die skalierung nicht negativ
   werden'.

   New cycle: each half extends ONE leg (scl_y=-1 matching rest) while
   the other stays at scl_y=0 (collapsed/invisible). foot.world.scl_y
   never goes negative — only [0, +1]. Alternating-leg gait. Substrate
   first-half preserved verbatim; second-half mirrors with role swap.
2026-05-18 22:13:56 +02:00
Axel Meyer
794287fd10 feat(vagrant-skeleton): Subterrain-style lower-body control model
Add lower_control virtual bone (reparents legs for independent orientation).
Update look_at fields: body uses "soft" target with slerp=6, head uses
"aim" target with instant snap and ±60° clamp. Rename walk.anim.json to
walk_fwd_lower.anim.json and add walk_back_lower, walk_left_lower,
walk_right_lower anims ported from substrate. Port HandleAnimationLower:
signed-angle sector selection (±45°/±135°) drives 4-directional walk anim
choice; wedge clamp sets lower_control rotation. Separate aim/soft look
targets both track raw mouse for now.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-18 21:19:08 +02:00
Axel Meyer
03a536984d fix(vagrant): iteration — body+head look-at, WASD-driven leg-facing, idle-collapse
- humanoid.rig.json: root removed from upper track; body look_at + slow speed
  (180 deg/s, lazy); head fast speed (480 deg/s) + +-90 deg limits; puppet
  dep bumped to 0.3.1
- animations/idle_lower.anim.json (NEW): leg+foot scl=[mirror, 0] keeps legs
  invisible at idle (locomotion skips animated bones; foot cascade zeros out)
- init.lua: set_procedural 'facing' callback writes root.rot from
  last_walk_rot_deg each frame; WASD-vector updates last_walk_rot_deg
  via atan(dx, -dy); idle_lower played parallel to idle, stopped during walk

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-18 19:51:56 +02:00
Axel Meyer
fa511204c2 feat(vagrant): v0.3.0 — substrate-port rig + animations + locomotion
- humanoid.rig.json rewrite: legs->root, rest.rot+rest.scl on all bones,
  Y-mirror via scl=-1 on leg_l/r/foot_l/r, locomotion-block with
  procedural footplant config
- walk.anim.json: substrate walk_fwd_lower port; track=lower; pos+scl
  channels on legs+feet
- walk_upper.anim.json (NEW): substrate walk_upper port; arm-swing
- idle.anim.json: substrate idle_upper port; pos+rot on shoulders+arms
- init.lua: walk_upper parallel-play wiring
- manifest bump v0.2->v0.3; puppet dep ^0.3.0
2026-05-18 18:55:34 +02:00
Axel Meyer
3457a7eab8 feat: sprite-mode test-chamber with 13-bone puppet + sprite-tilemap
13-bone humanoid rig (12 visible bones + 1 root) hand-ported from
substrate reference, mapped to PROTOTYPE asset-pack via asset_aliases
indirection (asset_pack: player). Bones use texture/z_order/scale/
anchor fields from the rig-format extension. Tracks split: lower for
legs + feet (walk animation), upper for root/body/head/shoulders/arms
(idle animation).

Animations:
- idle.anim.json: 2.0s loop on upper track, subtle body+head sway
- walk.anim.json: 0.6s loop on lower track, legs+feet cycle

Sprite-tilemap: 4-tile palette (floor_001-003 walkable, floor_004
as wall). Map content: 20x20 with wall-border and interior wall
blocks. tile_rotations parallel array exercises 90 and 180-degree
rotations on a handful of cells for visual rotation-pipeline
verification.

init.lua loads textures via asset_aliases lookup:
- maps.load_textures(aliases) resolves tilemap-tile atlas-ids
- puppet.load_rig(path, aliases) loads + resolves bone textures
- furniture textures preloaded at init (bed, bench, backpack) to
  avoid first-frame load stutter; rendered via engine.render.
  draw_sprite_transform in the draw hook

Camera follows puppet via per-frame camera.set_target. Headtrack:
head bone (look_at: true) rotates to face mouse world-position.

New SPOREL_CI=1 traces from render and init hooks:
- vagrant: render_frame_ok (per frame from render)
- vagrant: sprite_mode=on (once after first sprite-draw)
- vagrant: assets_loaded=14 (once after init: 7 puppet + 4 tile + 3 furniture)
2026-05-18 03:29:54 +02:00
Axel Meyer
2817613490 feat: initial implementation v0.1.0 — single player puppet + WASD + map
Composer module: single-player character as puppet (humanoid 4-bone
rig: torso, head, leg_l, leg_r) at world (320, 240) on a 20x20
v0.1-format tilemap.

- WASD direct movement, normalized for diagonals, 120 px/s.
- Camera-chase via lib-core.camera target-provider (camera follows
  puppet position frame-to-frame).
- Idle and walk keyframe animations: idle is a 2s torso-sway on the
  upper track; walk is a 0.6s leg-cycle on the lower track.
- Animation-state transitions driven by movement input: walk while
  WASD-active, idle when released.
- Headtrack: head bone (marked look_at: true in rig) rotates each
  frame to face the mouse cursor's world position via
  puppet.set_look_target.
- ESC -> launcher.

CI hooks (env-var-gated, no-op in normal play):
- SPOREL_CI=1: emits 'vagrant: frame_avg_ms=N' after 60 frames and
  'vagrant: render_frame_ok' per frame from the render hook, then
  engine.exit(0). Smoke stages consume these markers.
2026-05-17 20:21:31 +02:00