five-on-it / packages/net-client/src/intake
packages/net-client/src/intake
What a decoded snapshot frame does to the remotes a client draws: the one rule the renderer (apps/client/src/renderer/game.ts) and the netcode probe (tests/netcode) both run, so the instrument can never drift from the game.
- An entity the frame removed (gone, or living again under its id:
FrameNews.removed) is dropped before anything is pushed; one listed again in the same frame is a new remote, with a fresh buffer and a fresh figure. - Every entity the frame changed is news to its remote (what it is and does: its health, its act, its flags; the tier its changes come at), and a sample of its pose is pushed only when the frame measured it (
FrameNews.posed), at the tick of the measurement. An entity the frame carried nothing of is left as it was: the decoded snapshot lists its last pose again, at a tick it may no longer be at, and nothing is made of that. - After the frame, every remote the snapshot no longer lists is dropped: the server said it is gone (out of the area of interest, or removed), and nothing holds it on.
The client's own entities (the character it plays, the car it controls) are drawn from the local world, never as remotes; the caller says which they are. Doors, items, containers, terminals, cameras and nail strips are drawn by other means and never remotes either.