Make a Memory Game With AI: Prompt, Grid and Polish
Make a Memory Game With AI: Prompt, Grid and Polish
A memory game is the smallest complete game you can describe in a sentence: face-down cards, flip two, keep them if they match, turn them back if they do not. Zugo builds it as a browser game for 6 credits, and the tuning that makes it pleasant costs 3 credits per edit.
That simplicity is why it is a good first project and also why the first build often feels wrong in a way people struggle to name. The rules are never the problem. The timing is.
What does the first build give you?
A grid of face-down cards, a click that flips one, a second click that flips another, a comparison, and either a pair that stays open or two cards that turn back over. A move counter and a win state when the board is cleared. That is the whole loop and it works immediately.
Beyond the loop, one prompt also handles a timer, a best-score record kept in the browser, a difficulty selector that changes the grid size, and a theme for the card faces. None of that requires a second build if you name it up front.
What one prompt will not settle is how the game feels in the hand, because that lives in the half-second between a wrong pair being revealed and the cards flipping back. That number is invisible in a description and obvious the moment you play.
If you have never generated a game before, the general shape of the process is laid out in how to make a game with AI.
What should the prompt name?
Six things. Miss the last two and you get a technically correct game nobody wants to finish.
| Element | Weak version | Strong version |
|---|---|---|
| Grid | "some cards" | "a 4 by 4 grid, eight pairs" |
| Card faces | "pictures" | "eight symbols in clearly different shapes and colors" |
| Flip rule | "match the cards" | "flip up to two cards, matching pairs stay face up" |
| Flip-back delay | (unspecified) | "wrong pairs stay visible for about one second, then flip back" |
| Scoring | (unspecified) | "count moves and elapsed time, show both during play" |
| End state | (unspecified) | "a win screen with moves, time and a restart button" |
A prompt that uses all six: "A browser memory game. A 4 by 4 grid of face-down cards, eight pairs of symbols in clearly different shapes and colors. Clicking flips a card, up to two at a time. A matching pair stays face up, a wrong pair stays visible for about one second and then flips back. Show moves and elapsed time while playing. When the board is cleared, show a win screen with the final moves, the time and a restart button."
Note the phrasing on card faces. Asking for shapes and colors that differ, rather than just colors, is the difference between a game anyone can play and one that excludes players with color vision deficiency.
Why does the flip timing matter so much?
Because it is the only mechanic the player cannot control, and it decides whether the game feels fair. Too short and you never get to memorize the card you just revealed. Too long and every wrong guess becomes a small punishment.
First builds tend to land at one extreme or the other. If cards snap back instantly, ask to hold them for about a second. If the wait drags, cut it and add an option to click anywhere to flip them back early, which lets fast players skip the pause without hurting slow ones.
The second timing question is the double click. Many first builds let an impatient player flip a third card while two are still comparing, which corrupts the state and leaves cards stuck face up. Ask explicitly for input to be ignored while a comparison is running.
Both are single edits at 3 credits, and both are worth spending before adding anything new.
Which edits are worth the credits?
Five, in the order that pays off.
Ignore clicks during comparison, as above. This is a correctness fix disguised as polish, and it is the most common defect in a first build.
Add a flip animation. A card that rotates over reads as a card. A face that swaps instantly reads as an image toggling, and the whole game feels cheaper for it.
Make the match visible. A short highlight, a fade, or a small pop on a successful pair gives the game its only moment of reward. Without it, clearing the board feels like filing rather than playing.
Add a difficulty selector that changes the grid: 4 by 4, 5 by 4 and 6 by 6. One edit gets you three games. Then add a personal best per difficulty, stored in the browser, so there is a reason to play a second time.
Can a memory game teach something?
Yes, and this is the version worth building if you want the game used rather than admired. Instead of matching identical symbols, match two halves of a fact: a country and its capital, a word and its translation, a chemical symbol and its element, a company and its logo.
The prompt change is small: "instead of identical pairs, each pair is a term card and its matching definition card, and a pair counts as matched when the two belong together." Then supply the list of pairs in the same message.
That variant works well for classroom pages, language practice and onboarding quizzes, and it turns a weekend toy into something a teacher will actually link to. The quiz format covers the same ground with a different loop, and the comparison is in make a quiz game with AI.
Keep the list short in the first build. Ten to fifteen pairs generate reliably. A hundred pairs is a content job better handled by adding them in later edits.
What does it cost to build and tune?
The numbers are fixed and small.
| Action | Credits |
|---|---|
| Build the game | 6 |
| One edit | 3 |
| Build in Hi-Fi mode | 12 |
| Edit in Hi-Fi mode | 6 |
A realistic path: one build, then edits for input locking, flip animation, match feedback, the difficulty selector and a best-score record. Five or six edits, and the game is done. This is the cheapest genre in the catalog to finish, which is why it makes a good first purchase of credits.
Free includes 5 credits, just under one build, so it shows you the tool rather than finishing a project. Pro is $25 a month for 200 credits, roughly 66 edits if you spend them all on refinement. Business is $99 a month for 800 credits.
Where are the limits?
Two players on one keyboard is fine and generates well. Two players on different devices is a different product: it needs a server, matchmaking and a way to keep both boards in sync. That is not an edit, it is a project.
A shared leaderboard has the same shape. Scores kept in the browser work with no setup and vanish when the player switches device. Public scores mean connecting Supabase and treating the backend as its own piece of work.
Games here are 2D and run in the browser, so there is no app store build and no offline installer. Before delivery, each build is started in a sandbox and one that fails to open is reported as failed rather than handed over, which removes the blank-page risk but says nothing about whether the timing feels right.
And the honest general boundary: Zugo does not replace a development team on a complex product. For a card matcher, a teaching aid or a branded mini-game, the fit is good, and the source can be exported to GitHub if you want to continue by hand.
What should you build first?
Start with 4 by 4 and identical symbols, play it twice, and fix the flip timing before anything else. A memory game that gets the pause right is finished faster than most people expect.
Then decide whether it stays a toy or becomes a teaching tool, because that choice changes the card content and nothing else. Both start from the same six-line prompt.
Published projects live at an address like your-game.zugo.run and open on any phone, with a custom domain available if you want it on your own. The options for getting a browser game in front of people are compared in publish a game online for free. Write the six lines at zugo.dev and see how close the first build lands.