---
sidebar_position: 16
title: Free Round
description: Display and manage remaining free rounds in the game.
---

# Free Round

## Overview

- Handles the **display** and **logic** for tracking remaining free rounds in a slot game.  
- Supports both **desktop** and **mobile**, including animation and event handling.

| Platform | Preview |
|----------|---------|
| Desktop  | ![Desktop](../img/05-main-scene/freeround-counter/overview-freeround-desktop.png) |
| Mobile   | ![Mobile](../img/05-main-scene/freeround-counter/overview-freeround.png) |

---


## Implementation

### Prepare Assets

- Copy or parse prefabs from core to game assets.

#### Core

| Path | Preview |
|------|---------|
| `assets/core-assets/hyper-core/packages/freeround-count-box/prefabs` | ![Desktop](../img/05-main-scene/freeround-counter/freeround-path-prefabs.png) |

#### Game

| Path | Preview |
|------|---------|
| `assets/game-assets/prefabs` |![Preview](../img/05-main-scene/freeround-counter/freeround-path-prefabs-in-game.png) |

---

### Setup

- Ensure the script references the correct nodes.

![General](../img/05-main-scene/freeround-counter/freeround-counter-general.png)

- Manages and displays the remaining free round count in-game.

![Desktop](../img/05-main-scene/freeround-counter/freeround-counter-setting-general.png)"

| Property      | Description                                |
|---------------|--------------------------------------------|
| `duration`    | Duration of fade in/out animation (seconds) |
| `content`     | Container node for the counter             |
| `labelLeft`   | Label showing remaining free rounds        |

---

#### Platform Setup

- Ensure that the desktop and mobile prefabs are positioned differently in the main game scene for proper layout on each platform.

##### Desktop

![Desktop](../img/05-main-scene/freeround-counter/freeround-counter-setup-desktop.png)

| Component               | Description |
|-------------------------|-------------|
| `Platform-ui-controller` | [View Setup](/docs/faqs/setup-cocos-scene#platform-ui-controller) |


##### Mobile

![Desktop](../img/05-main-scene/freeround-counter/freeround-counter-setup-mobile.png)

| Component               | Description |
|-------------------------|-------------|
| `Platform-ui-controller` | [View Setup](/docs/faqs/setup-cocos-scene#platform-ui-controller) |
| `UI Mobile Position`     | [Mobile Position Setup](/docs/faqs/setup-cocos-scene#ui-mobile-landscape--portrait--position) |

---

#### Asset Setup

##### Desktop

| Path | Preview |
|------|---------|
| `assets/game-assets/textures/desktop/preloads/main-game/custom-scale` | ![Assets Desktop](../img/05-main-scene/freeround-counter/assets-freeround-desktop.png) |

##### Mobile

| Path | Preview |
|------|---------|
| `assets/game-assets/textures/mobile/preloads/main-game/custom-scale` | ![Assets Mobile](../img/05-main-scene/freeround-counter/assets-freeround-mobile.png) |

##### Common

- **Free Round Background**  
  ![Assets Mobile](../img/05-main-scene/freeround-counter/assets-freeround-background.png)

🔗 More: [Game Asset Structure](/docs/category/game-asset-structure)

:::tip
- **Position & Size**: Follow the game design layout.  
- **Asset Packing**: Use separate textures for Desktop and Mobile.
:::

---

#### Font Setup

| Preview |
|---------|
| ![Assets Mobile](../img/05-main-scene/freeround-counter/add-font.png) |

---

## Game Result Example

Make sure the main scene includes the popup panel.  
🔗 [See Popup Panel Guide](/docs/setup-main-game/main-scene/popup-panel#multiple-popup-panel)

| Platform | Popup | Action        | Result |
|----------|--------|---------------|--------|
| Desktop  | ![Popup Desktop](../img/05-main-scene/freeround-counter/popup-freeround-counter-desktop.png) | Click → Start | ![Result Desktop](../img/05-main-scene/freeround-counter/overview-freeround-desktop.png) |
| Mobile   | ![Popup Mobile](../img/05-main-scene/freeround-counter/popup-freeround-counter-mobile.png)  | Click → Start | ![Result Mobile](../img/05-main-scene/freeround-counter/overview-freeround.png) |
