> For the complete documentation index, see [llms.txt](https://docs.rafflex.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.rafflex.io/instant-win-games/whack-a-mole.md).

# Whack-a-Mole

An interactive whack-a-mole game where customers tap moles as they pop up to reveal their instant win results.

***

### What Is It?

Whack-a-Mole brings the classic fairground game to your site. Moles pop up from a garden of holes, and the customer has to tap or click them before they disappear. Every mole they manage to whack reveals one of their tickets. Winning moles go dizzy and show off the prize, while losing moles get a red **No Win** label.

It is one of the most hands-on games available, so it is a great way to keep customers on your site and having fun after they buy.

The game appears on the order confirmation page (the "thank you" page customers see after paying), underneath their ticket numbers.

{% hint style="info" %}
Like every game type, Whack-a-Mole only appears when the competition has at least one instant win prize. If you have not added any yet, see [Add Instant Wins](/create-your-first-raffle/add-instant-wins.md).
{% endhint %}

***

### How It Works

This is what your customer sees and does:

1. After checking out, the customer sees the game area with twelve mole holes and a **Whack-a-Mole** box in the middle. The holes behind it are blurred until they start.
2. Under **Speed** they choose **Normal**, **Fast** or **Turbo** (see [Speed options](#speed-options) below).
3. They press **Start Game**. (The message under the button reads "Whack the moles to reveal your prizes!")
4. Moles start popping up from random holes. The customer taps or clicks a mole to whack it. Each whack plays the whack sound with a punch effect.
5. Every mole they whack reveals one of their tickets:
   * **Winner.** The mole goes dizzy, a burst of stars appears, the win sound plays and the prize name pops up above the hole.
   * **No win.** A red **No Win** label appears, then the mole faints back into its hole.
6. If the customer misses a mole, it simply ducks back down. **Nothing is lost.** Their ticket is still waiting and will be revealed by the next mole they whack.
7. Now and then a cheeky mole will fight back if it is not whacked quickly. While it is fighting back it cannot be hit, so the customer simply moves on to the next mole. Again, nothing is lost.
8. A progress bar underneath the game shows how many tickets have been revealed out of the total (for example "4 / 10").
9. While the game is running, a **Skip** button in the top corner takes the customer straight to their results.
10. When every ticket has been revealed, the customer sees a **Winning Tickets Summary** listing each winning ticket number and its prize. If there were no wins, it shows "All Moles Whacked!", "0 Instant Wins Found" and "Better Luck Next time!"

{% hint style="success" %}
**Reassure your customers.** Missing a mole never costs them a win. Whacking moles is simply the fun way of revealing their results. If they are short on time, **Skip** shows every result instantly.
{% endhint %}

#### Speed options

| Speed      | What it feels like                                                                             |
| ---------- | ---------------------------------------------------------------------------------------------- |
| **Normal** | The default. Moles pop up at a relaxed pace, a couple at a time, giving plenty of time to tap. |
| **Fast**   | Moles appear more often and more of them can be up at once.                                    |
| **Turbo**  | Rapid fire moles for a frantic, fast paced game. Best for customers with lots of tickets.      |

Whack-a-Mole has no pause button. If a customer needs to stop, **Skip** jumps to the summary so they can see all their results.

***

### Setting It Up

1. In the admin panel, open **Competitions** in the left-hand menu and click the competition you want to use.
2. In the right-hand column, find the **Game Type** dropdown and choose **Whack-a-Mole**.
3. A **Whack-a-Mole Settings** panel appears underneath the dropdown. Add your own sounds and background here if you want them (see below). All of them are optional.
4. Click **Save changes** (or **Create** if this is a brand new competition).
5. Make sure the competition has at least one instant win prize, otherwise the game will not appear for customers.

***

### Customisation Options

Whack-a-Mole has three optional settings in the **Whack-a-Mole Settings** panel on the competition's edit page. If you leave any of them empty, the built-in default is used. The default background is a garden scene.

| Setting                      | What it does                                                     | File type         | Max size     |
| ---------------------------- | ---------------------------------------------------------------- | ----------------- | ------------ |
| **Custom Whack Sound (MP3)** | Played every time the customer whacks a mole.                    | MP3               | 200KB        |
| **Custom Win Sound (MP3)**   | Played when a whacked mole reveals a prize.                      | MP3               | 200KB        |
| **Background Image**         | The picture behind the mole holes, replacing the default garden. | PNG, JPEG or WebP | 2048KB (2MB) |

To add any of these:

1. Click the upload box under the setting's name, or drag your file onto it.
2. Wait for the file to finish uploading.
3. Click **Save changes** at the bottom of the competition page.

To go back to the default, remove the file from the upload box and click **Save changes**.

The moles and their holes are built in and cannot be changed, so your background sits behind them.

#### Getting your background right

* The image is scaled to fill the whole game area and centred, so the edges may be cropped on narrower screens such as phones. A widescreen image (for example 1920x1080px) works well.
* The mole holes sit together in the middle of the game area, so keep the busy or important parts of your image away from the centre.
* Pick something that lets the moles stand out. Very dark or very busy images can make them harder to spot.

{% hint style="warning" %}
**Upload rejected?** Sounds must be MP3 files under 200KB, and the background must be a PNG, JPEG or WebP under 2MB. If a file is too big, trim, resize or compress it and try again.
{% endhint %}

***

### Tips

* **Keep the whack sound short.** It plays on every hit, so a quick bonk or pop feels much better than a long clip.
* **Short prize names read best.** The prize name pops up in a small banner above the hole, so "£50 Cash" fits better than a long description.
* **Test it on a phone.** Most customers will be tapping with a thumb, so it is worth playing through on mobile to get a feel for the speeds.

***

### Want to try it first?

Once the competition has been saved at least once, a **Preview Game** button appears just under the **Game Type** dropdown whenever Whack-a-Mole is selected. Save any other changes to the competition first, because the button takes you to a new page. Then click it to open the **Game Preview** page, where you can play the game with sample tickets and try your custom sounds and background before any customer sees them. Nothing is entered and no order is created.

On the preview page, the **Game Settings** sit on the left and the **Live Preview** on the right. Any change you make shows in the preview straight away. Use the desktop and mobile icons to check both views, press the replay button to play it again, and click **Save** when you are happy.

{% content-ref url="/pages/llkGYVvQNWvOv6PJtv5g" %}
[Preview a Game](/instant-win-games/test-a-game-type.md)
{% endcontent-ref %}
