Code RoomClient-authoritative movement
HardPrep Room Coding #4295

Client-authoritative movement

Vibe & agenticSecuritySenior–Staff~20 min

For a competitive multiplayer shooter, an AI assistant wrote this Node.js server handler for player movement. It works in playtests, but within a week of release speedhackers and teleporters are everywhere. Review the handler and explain why the design is fundamentally cheatable, not just under-validated.

Implement
simulate_player_movement(intents: list[float], max_speed: float, dt: float, min_x: float, max_x: float) → list[float]
Examples
in[[1,1,1],5,0.1,-10,10]out[0.5,1,1.5]
in[[999,-999],5,0.1,-10,10]out[0.5,0]
in[[],5,0.1,-10,10]out[]
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 20 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.