Code RoomRemote player position snapping
HardPrep Room Coding #4296

Remote player position snapping

Vibe & agenticAlgorithms & data structuresSenior–Staff~19 min

An AI agent wrote the client-side network sync for a co-op game. Remote players 'rubber-band' and snap between positions on anything but a perfect LAN. Review the client update and explain what naive netcode is missing.

Implement
interpolate_remote_position(snapshot_times: list[float], snapshot_xs: list[float], now: float, interp_delay: float) → float
Examples
in[[0,1,2],[0,10,30],2,1]out10
in[[0,1,2],[0,10,30],2,0.5]out20
in[[0,1,2],[0,10,30],0.2,1]out0
What a strong answer looks like

Treat the AI’s output as a draft to verify, not an answer to trust. Name the specific flaw and the input that triggers it, say how you’d catch it (tests, edge cases, reading critically), and how you’d re-prompt or decompose to get it right.

0:00 of about 19 min

Vibe & agentic: describe the solution in plain language (or narrate it) and the coach grades your approach.

Which questions mattered is sealed until you submit. Telling you now would just be handing over the edge cases.