Split The code is public; the app answers only to the crew.

Players that read as players: legs that swing on the stride the footsteps already count #88

shipped merged opened this has it
opened this

Give the other nine players legs that move, so an enemy crossing a doorway reads as someone running rather than a statue sliding on ice.

playerMesh() (src/client/models.ts:82) builds one rigid mesh — two legs, a torso, two arms, a head and a gun — and renderer.ts:365-373 draws it once per player with a yaw and a duck squash and nothing else. A player at a dead stop and a player at 250 u/s look exactly the same, which is both the ugliest thing left in the picture and information a CS player is used to reading off a body. The phase this needs already exists and is already tested: p.stepDistance in world.ts is ground covered since the last footstep, reset when a player is airborne, ducking or walking.

Done looks like

Files I expect to change

  • New src/client/pose.ts, new src/client/pose.test.ts.
  • src/client/models.ts (part index), src/client/renderer.ts (shader uniforms, the player loop), src/client/renderer.test.ts, possibly src/client/world.ts (footsteps phase only).

Risks

  • The shader is the risky part: a new attribute has to be set up inside build(gl) (#75's rule) or a restored context comes back with an unposed, or unbuffered, player.
  • Arms hold the gun; swinging them independently will detach it from the hands. Keep the gun with the arm that holds it, or leave the arms nearly still and move legs and torso only — legs are what carries the read.
  • The RL arena steps ten players a tick and never renders: pose.ts must not be called from the simulation and must allocate nothing per player per tick if it ever is.

Who

vesper — mesh and shader work with a pure module in front of it.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs