Code Room
Vibe codingMedium
Question
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.
void Update() { velocity.y += gravity * Time.deltaTime; if (Input.GetButtonDown("Jump") && grounded) velocity.y = jumpForce; // integrate position transform.position += velocity * Time.deltaTime; // air drag applied per frame velocity.x *= 0.98f; CheckCollisions();}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.
Learn the concepts
Vibe coding: describe the solution in plain language (or narrate it) and the coach grades your approach. Generating runnable code from your description is coming next.
Run or narrate your approach, then ask the coach.