> ## Documentation Index
> Fetch the complete documentation index at: https://docs.base44.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Building a game

> Build a game in Base44 with player accounts, saved scores, sound effects, generated art, and promote it to new players.

Turn your game idea into something people can play. Whether it's a trivia night or a game show, your next game starts with a prompt. Describe its rules, and the [AI game maker](https://base44.com/ai-game-maker) brings it to life.

![The Trivia Blitz 44 home page in neon pink and cyan, with a daily challenge card beside a pixel-art arcade cabinet](https://mintcdn.com/base44/IzNlmjcQkCzjMAO3/images/apps-games-trivia-home.png?fit=max\&auto=format\&n=IzNlmjcQkCzjMAO3\&q=85\&s=24197a0fcb8c0955c608ca5b44141f0e)

A game built with Base44

> [card] [Start from a game template](https://base44.com/templates/apps/games)
>
> Browse game templates and customize one in the AI chat.

***

## Step 1 | Building your game

Describe your game in one prompt, and Base44 builds it: the app, the pages, the questions or levels, and the data your game saves. It works best for 2D browser games that run on rules, timing and scoring, like these:

> [card] Quiz
>
> Timed questions with a score at the end, like a daily trivia game.

> [card] Puzzle
>
> A daily word or grid to solve, with a set number of guesses.

> [card] Game show
>
> A board of categories and point values that a host runs on a shared screen.

> [card] Bingo
>
> Cards with random squares that players mark off as items are called.

The clearer your rules, the closer your first build gets. Cover these in your prompt:

* **How a round works:** How many questions, turns or levels, and any time limit.
* **Scoring:** How many points each action earns, and what earns nothing.
* **When the game ends:** What ends a round, such as the last question or the timer running out, and what players see afterward.
* **What resets and when:** A new puzzle every day, a weekly leaderboard, or unlimited replays.
* **Who can play:** Whether players sign in, and how often each player can play.
* **Who sees what:** What other players can see, such as display names and scores only.

> [!TIP]
>
> Not sure where to start? Choose **Plan** from the Mode drop-down in the prompt box to talk your game through with the AI first. Learn more about [using plan mode](https://docs.base44.com/Getting-Started/starting-from-your-first-prompt.md#using-plan-mode).

> [accordion] Example: the prompt behind a daily trivia game
>
> ```text wrap theme={null}
> Build a trivia game called Trivia Blitz 44 with a retro neon arcade look: a dark background, glowing pink and cyan text, and a pixel-style font.
>
> Gameplay:
> - Every day there's one quiz of 10 multiple-choice questions, the same for every player. A new quiz starts at midnight UTC.
> - Pick each day's 10 questions from a bank of at least 100 general-knowledge questions, each with 4 answer options and one correct answer.
> - Each question has a 15-second timer. A correct answer scores 100 points plus 10 points for every second left. A wrong answer or no answer scores 0.
> - After question 10, show the total score and which questions the player got right.
>
> Players and scores:
> - Players sign in to play. Each player can play the daily quiz once.
> - Save each finished game with the player's display name, score, and quiz date.
> - Add a Leaderboard page with today's top 10 scores. Show display names only, never email addresses.
> - Players can see their own past games. Other players see only display names and scores, on the leaderboard.
> - Nobody can edit or delete a score after the game ends.
> ```

**To build your game:**

1. Go to the Base44 home page.
2. Describe your game in the prompt box, including your rules.
3. Click the send icon.
4. Wait while Base44 builds your game. You can follow its progress in the AI chat, and describe any changes there later.

![The app editor with the Trivia Blitz 44 build prompt in the AI chat and the game's neon start screen, with a pixel-art arcade cabinet, in the preview](https://mintcdn.com/base44/IzNlmjcQkCzjMAO3/images/apps-games-trivia-editor.png?fit=max\&auto=format\&n=IzNlmjcQkCzjMAO3\&q=85\&s=82c30185459926f0a29799ec257f1e66)

A game in the app editor preview

> [!NOTE]
>
> The trivia game above saves its scores through backend functions, which need the [Builder plan or above](https://base44.com/pricing).

***

## Step 2 | Protecting your game data

Saved scores give players a reason to come back, and a leaderboard only works if players can trust it. Your game's data permissions decide who can see and change what your game saves, such as scores, progress and player details.

When your prompt says who can see and change scores, the AI sets the permissions for you. In this trivia game, each player sees only their own games, and only the app's backend functions can save or change a score. The leaderboard shows display names and scores only, as the prompt asked.

Learn how to [change data permissions](https://docs.base44.com/Building-your-app/Managing-your-app-data.md#changing-data-permissions) and [test them in preview](https://docs.base44.com/Setting-up-your-app/Managing-security-settings.md#testing-your-permissions).

![A table's Permissions page where players read only their own games and only backend functions can create or update them](https://mintcdn.com/base44/IzNlmjcQkCzjMAO3/images/apps-games-score-permissions.png?fit=max\&auto=format\&n=IzNlmjcQkCzjMAO3\&q=85\&s=5a1c801ea081f383e762d3c63521fc71)

Data permissions for players

**To check who can read and change your scores:**

1. Go to your app editor.
2. Click **Dashboard**.
3. Click **Data** and then select the table that stores your scores.
4. Click **Permissions**.
5. Compare these permissions with the rules in your prompt. If they don't match, describe the change in the AI chat.

![A daily top 10 leaderboard listing rank, player display name and score](https://mintcdn.com/base44/IzNlmjcQkCzjMAO3/images/apps-games-leaderboard.png?fit=max\&auto=format\&n=IzNlmjcQkCzjMAO3\&q=85\&s=a8cc360a896f32943f4590158693b5b3)

A leaderboard with display names and scores

***

## Step 3 | Designing your game

Give your game its look, sound and feel in the AI chat.

To add an image, describe it and where it goes in one message, and the AI generates it and adds it to your page. For example, this prompt added an arcade cabinet to the trivia game's home page:

```text wrap theme={null}
Generate a pixel-art image of a glowing neon arcade cabinet in pink and cyan, and show it on the home page next to the daily challenge card.
```

![The Trivia Blitz 44 home page with a generated pixel-art arcade cabinet beside the daily challenge card](https://mintcdn.com/base44/IzNlmjcQkCzjMAO3/images/apps-games-arcade-cabinet.png?fit=max\&auto=format\&n=IzNlmjcQkCzjMAO3\&q=85\&s=caf69daed7d59e93988b1fbda5fe748e)

A generated image on a game's home page

To add sound, upload your sound files to the AI chat, then say when each one plays. For example:

```text wrap theme={null}
Add sound effects with the two audio files I attached. Play correct.wav when an answer is right, and wrong.wav when it is wrong or the timer runs out. Add a mute button to the header. Sound is on by default, and the game remembers each player's choice on their device.
```

**To add sound to your game:**

1. Go to your app editor.
2. Click the **Add** icon  in the AI chat.
3. Click **Upload from computer**.
4. Select your audio files.
5. Describe when each sound plays and then send your message.

![The AI chat message box with correct.wav and wrong.wav attached and a prompt describing when each sound plays](https://mintcdn.com/base44/IzNlmjcQkCzjMAO3/images/apps-games-chat-audio.png?fit=max\&auto=format\&n=IzNlmjcQkCzjMAO3\&q=85\&s=88901dc2a12c703cbc2de79cff585be2)

Attached sound files

> [!NOTE]
>
> Sound files you upload in the AI chat stay private. When the AI adds them to your game, it saves public copies. Learn more about [how chat attachments work](https://docs.base44.com/Building-your-app/Using-media.md#how-chat-attachments-work).

***

## Step 4 | Testing your game

Test your game before you share it, so you can check that each rule works the way you described it. Play it like a new player would, then compare what happens with your prompt.

Test data keeps trial scores separate from your live data, and it's available on the [Builder plan or above](https://base44.com/pricing).

**To test your game:**

1. Turn on [test data](https://docs.base44.com/documentation/managing-app-data/testing-your-data.md) in your app settings.
2. If your game keeps content like questions in its data, add it to the test data.
3. Switch the preview to test data before you play trial rounds.
4. Play your game and check each rule:
   * [ ] **Scoring:** Play a round and check each score against your rules, such as a correct answer with time left and a timed-out question.
   * [ ] **Resets:** Come back after your reset time and check that a new round is waiting, such as the next daily quiz.
   * [ ] **Repeat attempts:** Finish a round, then try to play again, and check that the game follows your replay rule.
   * [ ] **Saved history:** Open your past games and check that the score and date match the round you played.
   * [ ] **Each player's access:** [Act as a second player](https://docs.base44.com/Setting-up-your-app/Managing-access.md#testing-your-app-as-a-user) and check that they see only what your rules allow, such as their own games.
   * [ ] **Leaderboard contents:** Check that the leaderboard shows only what your rules allow, such as display names and scores with no email addresses.
   * [ ] **Sound and mute:** Play with sound on, then mute it and reload the page to check that the game remembers your choice.
   * [ ] **Mobile layout:** Switch the preview to [mobile view](https://docs.base44.com/Building-your-app/Design-foundations-and-layout.md#customizing-your-app-for-mobile) and check that questions, answer buttons and results fit the screen. After you publish, play a round on a phone too.

![The end-of-game screen with a Game saved label, a total of 1,760 points, 10 of 10 correct and an answer recap](https://mintcdn.com/base44/IzNlmjcQkCzjMAO3/images/apps-games-results.png?fit=max\&auto=format\&n=IzNlmjcQkCzjMAO3\&q=85\&s=fc346981b1842e7d6eb8c1a80c515135)

A finished round with its score

***

## Step 5 | Publishing your game

Publish your game to get a link you can share with players. Your app visibility decides who can open it, and a **Public** game can still ask players to sign in before they play. Learn how to [set your app visibility](https://docs.base44.com/Setting-up-your-app/Managing-access.md#setting-your-app-visibility) and [require sign-in on some pages of a public app](https://docs.base44.com/Setting-up-your-app/Managing-login-and-registration.md#faqs).

**To publish your game:**

1. Go to your app editor.
2. Click **Publish** in the top bar.
3. Under **App visibility**, choose who can open your game.
4. Click **Publish**.

> [!NOTE]
>
> Building App Store and Google Play files needs the [Builder plan or above](https://base44.com/pricing). To prepare them, click the **Mobile app** tab. Learn more about [submitting your app to app stores](https://docs.base44.com/Building-your-app/Mobile-experience.md#submitting-your-app-to-app-stores).

***

## Step 6 | Promoting your game

Once your game is live, you can promote it to reach more players and get feedback.

> [card] [Submit to Launchpad](https://docs.base44.com/promoting-your-app/submitting-to-launchpad.md)
>
> Share your game with the Base44 community.

> [card] [Promote your game](https://docs.base44.com/promoting-your-app/social-content.md)
>
> Create social posts that bring new players.

> [card] [Join the Base44 Discord](https://discord.com/invite/ThpYPZpVts)
>
> Share your game and get feedback from other builders.

***

## FAQs

> [accordion] How do I stop players copying my game?
>
> When your game is public, the "Edit with Base44" badge at the bottom right lets anyone copy it into their own account and edit their own version. Hiding the badge removes this copy shortcut from your public game. You need the [Starter plan or above](https://base44.com/pricing) to hide it. Learn how to [show or hide the badge](https://docs.base44.com/Setting-up-your-app/Managing-access.md#showing-the-base44-badge).

> [accordion] How do I charge players for my game?
>
> Set up payments with [Base44 Payments](https://docs.base44.com/Setting-up-your-app/setting-up-wix-payments.md) or [Stripe](https://docs.base44.com/documentation/setting-up-your-app/setting-up-payments.md), then ask the AI chat to add a checkout where players pay. Both need the [Builder plan or above](https://base44.com/pricing).
>
> If you publish your game to the App Store or Google Play, don't sell digital content in the mobile app, such as premium tiers, unlocked levels or virtual currency. Apple and Google require their own in-app purchase systems for it, and Base44 apps don't support them. Learn more about [selling in your app](https://docs.base44.com/documentation/building-your-app/uploading-to-app-stores.md#selling-in-your-app).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.