Code RoomProjectiles skip frames after spawn
HardPrep Room Coding #4303

Projectiles skip frames after spawn

Vibe & agenticAlgorithms & data structuresSenior–Staff~20 min

An AI agent extended a custom ECS by adding a system that spawns new entities (projectiles) while iterating the shooter set, and registers them so they're processed THIS frame. Players report newly-spawned projectiles sometimes have garbage transforms or are skipped for a frame. Review the system and explain the iteration/registration bug.

Implement
apply_deferred_spawns(entities: list[list[int]]) → list[list[int]]
Examples
in[[[1,10,20,1],[2,30,40,0]]]out[[1,10,20,1],[2,30,40,0],[3,10,20,0]]
in[[[1,5,5,1],[2,7,7,1]]]out[[1,5,5,1],[2,7,7,1],[3,5,5,0],[4,7,7,0]]
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.