Your AI game is broken. Start with one bug you can repeat.
The coin disappears, but your score keeps rising. You ask the assistant to fix it, and it returns a new movement system, a different camera and three files you didn't have before. I'd stop there. You already had most of a working game. What you need is an explanation for one repeated event.

Write down the shortest route to the bug
Reload the game and reproduce the problem from the beginning. “Start, hold Right, touch the first coin” is much more useful than “scoring is broken.” Add the expected result and what happened instead. Copy the first relevant console error if there is one.
The console is the browser's error log, usually inside its developer tools. If you don't know how to find it, ask the assistant for instructions for your browser. You don't need to understand every message; the exact wording can still point to the failing file.
Ask a question before asking for code
My next prompt would look like this:
A frame is one update of the game. If the player stays inside the coin's hitbox, the collision may be reported again on the next update. The fix needs a rule that makes collection happen once, such as recording that the coin was collected or removing it from future checks.
A hitbox is the simple shape the game uses for collisions. If the bug is about objects touching at the wrong time, turn on the engine's collision debug view. Seeing the boxes is usually more informative than staring at the artwork.
Reproduction: restart, hold Right, touch one coin.
Expected: score becomes 1 and stays there.
Actual: the score rises every frame.
Here are the collection handler and the reset function.
Explain what allows the same coin to count again.
Propose a small fix that leaves movement and the camera alone.Try to break the fix in a different way
After applying the patch, touch the same spot repeatedly. Collect a second coin. Restart and collect the first one again. Those three checks catch a fix that accidentally marks every coin as collected, or forgets to clear the flag on restart.
Save the working version. If the patch made things worse, return to the previous version before trying another explanation. Layering guesses on top of guesses makes a small bug surprisingly hard to find.
I'd keep a short checklist of bugs you've actually had: repeated collection, duplicate music after restart, movement stuck after switching tabs. Run that list before sharing an update. It's useful project memory for you, and much better context for an assistant than “please make sure there are no bugs.”
Sources & further reading
- MDN: 2D collision detection — accessed Sep 9, 2026
Made something playable?
Share your game, world or experiment with people exploring what AI can help create.
Add your space to Velven