Jump height frame-rate dependent
An AI assistant wrote this Unity (C#) movement controller for a 2D platformer. It runs fine on your 144Hz dev machine but testers on 60Hz monitors report the character jumps less than half as high and feels 'floaty.' Review the code, identify why the physics is frame-rate dependent, and say how you'd catch this before it shipped.
Implement
speed_after_drag(initial_speed: float, retention_per_second: float, frame_dt: float, frame_count: int) → floatExamples
in
[10,0.98,0.016666666666666666,60]out9.79999999999998in
[10,0.98,0.006944444444444444,144]out9.800000000000026in
[10,0.5,1,3]out1.25What 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 16 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.
Run or narrate your approach, then ask the coach.