Learning Timeline
Key Insights
Using Thinking Models First
Do not ask the coding AI (Gemini) to brainstorm the game mechanics from scratch. Use a 'Thinking Model' first to generate a detailed functional spec, then feed that spec to Gemini for coding. This produces higher quality code.
The 'Fresh Chat' Rule
If a feature update breaks the UI (e.g., overlays blocking the game) and one follow-up prompt doesn't fix it, abandon the chat. Starting a fresh chat with the consolidated requirements is often faster than debugging via chat.
Phantom API Requests
Gemini may occasionally hallucinate a requirement for an API key when code errors occur. If the game logic shouldn't require external data, this is a bug—restart the prompt rather than trying to provide a key.
Prompts
Meta-Prompt for Game Description
Target:
ChatGPT / Thinking Model
I want to make the classic game Galaga. Give me a prompt for that. Don't include any specific tech.
Step by Step
Generating the Game Code
- Open a separate 'Thinking Model' AI (e.g., ChatGPT o1 or similar) to prepare your prompt context.
- Input a request for a non-technical description of the desired game (see Prompt card).
- Copy the detailed description generated by the Thinking Model.
- Navigate to the Gemini interface.
- Ensure the code execution/Canvas toggle is set to 'ON' (usually located near the input field or settings) to enable interactive previews.
- Paste the detailed description into the Gemini prompt field.
- Submit the prompt and wait for Gemini to generate the HTML/JS code.
- View the interactive preview window that appears automatically to test basic functionality (e.g., movement, scoring).
Iterating and Debugging Features
- Type a request for a specific new feature (e.g., 'Add a status bar at the bottom') into the chat input.
- Wait for Gemini to update the code block and refresh the preview.
- Test the new feature in the preview window.
- If the UI glitches or the code breaks the layout: Do not attempt to prompt-fix multiple times.
- Open a 'New Chat' immediately.
- Paste the original prompt plus the new feature request into the new chat to generate a clean version of the code.