Creating valentine-themed pacman game using AI
- Junyang Deng
- February 17, 2026
Attempt 1: Prompting Claude via Claude.ai
I started by pasting the original game specification into Claude and asking it to convert the instructions into a structured prompt.md for Claude Code to follow. The intent was to use this as a reusable prompt file to guide the entire implementation.
Result: Poor. The generated prompt was too vague and lacked the architectural specificity needed for Claude Code to produce a working game. The output was structurally shallow and missed key game mechanics.
Attempt 2: Iterative Prompting in Claude Code
I tried iterating directly in Claude Code, pushing it to think more like a software engineer by prompting it to plan before coding. Variations I tried included:
- “Act like a senior software engineer and plan the architecture before writing any code.”
- “Break this into components first — game loop, collision detection, rendering — then implement each.”
- “Write a technical spec with file structure before touching any implementation.”
Result: Still poor. Claude Code struggled to maintain coherent state across the game loop, produced inconsistent collision logic, and frequently regressed on previously working features when asked to extend the game.
Attempt 3: Switching to Google AI Studio
After the Claude Code attempts stalled, I switched to Google AI Studio (Gemini) and provided the same specification. The approach there was more conversational — I described the game requirements in natural language and iterated on specific features one at a time.
Result: Significantly better. Gemini produced a functional Valentine-themed Pac-Man game with working movement, ghost behavior, and heart-shaped pellets. The iterative, feature-by-feature approach worked better than trying to generate the entire game at once.
Reflections
This problem made it clear that there is still a lot for me to learn about using AI effectively for coding, especially for larger or more interactive projects. Simply having a good prompt is not enough — knowing how to structure a project, break it into the right pieces, and iterate meaningfully all require practice that I want to invest more time in.
I also noticed that different models can perform very differently on the same task. Claude and Gemini produced quite different results from identical specifications, which was surprising. Going forward, I want to spend more time getting familiar with each model’s strengths and weaknesses so I can make better choices about which tool to reach for depending on the task.