Levelwick guide
How to fix common bugs in AI-made games
Fix prompts for the bugs AI-made games hit most: blank screens, falling through floors, speed issues, stuck keys, silent audio and slowdowns.
Steps
- Reproduce the bug. Find the exact steps that cause it, and note whether it happens every time.
- Check the browser console. Open the developer console and copy any red error message.
- Describe it precisely. Write what you did, what you expected and what happened instead.
- Ask for one fix only. Request a fix for that bug alone and tell the AI not to change anything else.
- Ask for the cause. Have the AI explain the cause in one sentence so you can judge whether the fix makes sense.
- Retest everything nearby. Check that the fix didn't break related features, then save the working version.
The method matters more than the fix
Most wasted generations come from vague bug reports. "It's broken" invites the AI to rewrite large parts of your game, often adding new bugs. A precise report gets a precise fix:
Bug: when I jump onto the moving platform, the player slides off its left side. Expected: the player rides the platform. Fix only this and don't change anything else. Tell me in one sentence what caused it.
Blank screen or nothing happens
Open the browser console (F12 or right-click and Inspect on desktop) and look for red text. Paste the exact error into your follow-up. Common causes are a typo, a variable used before it's defined, or a missing closing bracket from a truncated response. If the response looks cut off, ask the AI to continue from the last complete function or to regenerate with a shorter design.
Falling through floors
The player moves so far in one frame that it skips the floor. Ask:
Move the player in small steps no bigger than half its height and check collisions after each step. Cap the time step at 1/30 of a second.
Game runs too fast or too slow on some screens
Movement is tied to frames instead of time. Ask for delta time from requestAnimationFrame, speeds in pixels per second, and a cap on delta time.
Keys stick after switching tabs
Ask the game to clear all pressed keys and pause when the window loses focus or the page becomes hidden.
No sound on phones
Browsers only allow audio after the player taps or clicks. Ask for the audio system to start or resume inside the first tap, with a "Tap to start" screen if needed.
Slows down after a few minutes
Usually objects are never removed, or event listeners are added again on every restart. Ask for off-screen bullets and particles to be removed, for object pooling, and for listeners to be attached only once.
Restart leaves things behind
Leftover enemies, double speed or two timers after restarting mean state wasn't fully reset. Ask for a single reset function that clears every list, timer and score.
When to stop patching
If three fix attempts in a row make things worse, go back to your last working version, or regenerate from your original prompt with the lessons added ("use delta time", "resolve collisions per axis"). A clean start with a better prompt often costs less than more patches.
FAQ
How do I open the browser console?
On most desktop browsers press F12, or right-click the page and choose Inspect, then open the Console tab.
Why does fixing one bug create another?
The AI may rewrite more than needed. Add 'fix only this and don't change anything else' and test after each change.
Should I paste the whole game back into the chat?
If your tool doesn't keep the code in context, yes. Otherwise, describe the bug and paste only the error text.
What if the response is cut off?
Ask the AI to continue from the last complete function, or simplify the design so the code is shorter.