Avatar animation and held item #15

Closed
opened 2026-11-07 18:27:42 +00:00 by claude · 1 comment
Member

The avatar is one static sprite, flipped left and right. Add walk, jump, fall and use/swing frames (via [sheet or texture swaps on a timer) and show the wielded item next to the avatar (attached wielditem entity). Also show other players' names above their avatars.

The avatar is one static sprite, flipped left and right. Add walk, jump, fall and use/swing frames (via `[sheet` or texture swaps on a timer) and show the wielded item next to the avatar (attached `wielditem` entity). Also show other players' names above their avatars.
claude added this to the v0.2 Core Feel milestone 2026-11-07 18:27:42 +00:00
claude added the area/camera-controls
type
art-audio
priority
medium
labels 2026-11-07 18:27:42 +00:00
eric added this to the Strata Roadmap project 2026-11-07 18:36:27 +00:00
eric moved this to To Do in Strata Roadmap on 2026-11-07 18:37:23 +00:00
eric closed this issue 2026-11-10 06:18:43 +00:00
Author
Member

Done in fd329d2 (plus a luacheck line-length fix in 7f9a1be).

What changed (mods/strata_player/appearance.lua, documented in DESIGN.md §2)

  • Frames: strata_player_sheet.png (from tools/gen_textures.py, replacing strata_player.png) has 9 frames: idle, 4 walk, jump, fall, swing up, swing down. The avatar picks one each step with [sheet and mirrors it with [transformFX. Walk frames are paced by distance travelled. Swings run while dig or place is held and finish after release. Textures are only re-sent when the frame or facing changes.
  • Held item: a non-physical wielditem entity (strata_player:held) is attached to the avatar. It rests low in front and sweeps from overhead to forward-low during a swing. It hides for an empty hand and removes itself when the avatar is gone.
  • Names: other players' names are per-viewer HUD waypoints (no distance number) above their avatars, shown only when the avatar is roughly on screen. An entity nametag would have shown players their own name too.
  • strata.objects_in_cell now ignores non-physical entities, so the held item never blocks placement or door closing.

Tests: 5 new selftest cases (frame selection, held-item arc and mirroring, name-tag targeting, a live avatar idling, walking, turning and jumping, and the held item following the wield and swinging). 46/46 pass locally with zero ERROR lines. A mutation that disables swinging makes the swing test fail. CI run 19769 is green.

Needs a hands-on check in the client (can't be judged headless):

  • The held item's orientation, especially facing left. This relies on the attach rotation applying roll before yaw. Also whether the wielditem extrusion faces the camera.
  • How the walk cadence (WALK_FRAME_RATE) and SWING_TIME feel.
  • Name tags with two players. They update every 0.1 s, so they may trail a fast avatar slightly.
Done in fd329d2 (plus a luacheck line-length fix in 7f9a1be). **What changed** (`mods/strata_player/appearance.lua`, documented in DESIGN.md §2) - **Frames:** `strata_player_sheet.png` (from `tools/gen_textures.py`, replacing `strata_player.png`) has 9 frames: idle, 4 walk, jump, fall, swing up, swing down. The avatar picks one each step with `[sheet` and mirrors it with `[transformFX`. Walk frames are paced by distance travelled. Swings run while dig or place is held and finish after release. Textures are only re-sent when the frame or facing changes. - **Held item:** a non-physical `wielditem` entity (`strata_player:held`) is attached to the avatar. It rests low in front and sweeps from overhead to forward-low during a swing. It hides for an empty hand and removes itself when the avatar is gone. - **Names:** other players' names are per-viewer HUD waypoints (no distance number) above their avatars, shown only when the avatar is roughly on screen. An entity nametag would have shown players their own name too. - `strata.objects_in_cell` now ignores non-physical entities, so the held item never blocks placement or door closing. **Tests**: 5 new selftest cases (frame selection, held-item arc and mirroring, name-tag targeting, a live avatar idling, walking, turning and jumping, and the held item following the wield and swinging). 46/46 pass locally with zero ERROR lines. A mutation that disables swinging makes the swing test fail. CI run 19769 is green. **Needs a hands-on check in the client** (can't be judged headless): - The held item's orientation, especially facing left. This relies on the attach rotation applying roll before yaw. Also whether the wielditem extrusion faces the camera. - How the walk cadence (`WALK_FRAME_RATE`) and `SWING_TIME` feel. - Name tags with two players. They update every 0.1 s, so they may trail a fast avatar slightly.
Sign in to join this conversation.