Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Lära Creating the Home Screen | Building Your First Game Flip Cards
Build Games with Cursor AI

bookCreating the Home Screen

A memory game starts with a welcoming home screen. Ours will be cheerful and playful, with big cards for different topics that players can choose from before starting.

This game is a classic memory challenge: flip two cards, try to find a match, and keep going until all pairs are discovered. To make it more fun, players can choose a topic before they begin.

For the first version, we'll add three: Animals, Fruits, and Space. Each topic will appear as a large, colorful card with an emoji and a label. Clicking one will take the player into the game for that theme.

Let's set everything up step by step:

Create your project folder.
expand arrow

You can place it anywhere (Desktop, Documents, etc.). For example, call it "flip-card-memory-game".

Open the folder in Cursor.
expand arrow

Go to FileOpen Folder and select the one you just made.

Open a chat in Cursor.
expand arrow

This is where we'll write our first prompt.

Type the prepared prompt (or your own version).
expand arrow

Cursor will generate the code for the home screen.

Once Cursor finishes, click Go Live to instantly preview the page in your browser.

Note
Note

If you'd like to tweak the design (change colors, try a new font, or adjust the layout), ask Cursor in plain English, and it will update the code for you.

Prompt in Cursor

question mark

What appears on the home screen?

Select the correct answer

Var allt tydligt?

Hur kan vi förbättra det?

Tack för dina kommentarer!

Avsnitt 1. Kapitel 2

Fråga AI

expand

Fråga AI

ChatGPT

Fråga vad du vill eller prova någon av de föreslagna frågorna för att starta vårt samtal

Suggested prompts:

Can you show me how the home screen should look visually?

What are the next steps after setting up the home screen?

How do I make the cards interactive for topic selection?

Awesome!

Completion rate improved to 50

bookCreating the Home Screen

Svep för att visa menyn

A memory game starts with a welcoming home screen. Ours will be cheerful and playful, with big cards for different topics that players can choose from before starting.

This game is a classic memory challenge: flip two cards, try to find a match, and keep going until all pairs are discovered. To make it more fun, players can choose a topic before they begin.

For the first version, we'll add three: Animals, Fruits, and Space. Each topic will appear as a large, colorful card with an emoji and a label. Clicking one will take the player into the game for that theme.

Let's set everything up step by step:

Create your project folder.
expand arrow

You can place it anywhere (Desktop, Documents, etc.). For example, call it "flip-card-memory-game".

Open the folder in Cursor.
expand arrow

Go to FileOpen Folder and select the one you just made.

Open a chat in Cursor.
expand arrow

This is where we'll write our first prompt.

Type the prepared prompt (or your own version).
expand arrow

Cursor will generate the code for the home screen.

Once Cursor finishes, click Go Live to instantly preview the page in your browser.

Note
Note

If you'd like to tweak the design (change colors, try a new font, or adjust the layout), ask Cursor in plain English, and it will update the code for you.

Prompt in Cursor

question mark

What appears on the home screen?

Select the correct answer

Var allt tydligt?

Hur kan vi förbättra det?

Tack för dina kommentarer!

Avsnitt 1. Kapitel 2
some-alt