Compare commits

..

No commits in common. "develop" and "master" have entirely different histories.

611 changed files with 0 additions and 23630 deletions

View File

@ -1,25 +0,0 @@
# Website
This website is built using [Docusaurus](https://docusaurus.io/), a modern static website generator.
### Installation
```
$ npm install
```
### Local Development
```
$ npm start
```
This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.
### Build
```
$ npm build
```
This command generates static content into the `build` directory and can be served using any static contents hosting service.

View File

@ -1,8 +0,0 @@
---
id: intro
sidebar_position: 0
---
# Slot game API
To be written

View File

@ -1,69 +0,0 @@
---
sidebar_position: 1
---
# Create The Project
The first step to start a new project.
When starting a new project, you'll be giving an empty repository.
Take the `Roma Legacy` game as an example.
## Clone Git repository
To clone this repository, run the following command:
```bash
git clone https://gitea.plp19.com/cocos-eanew/coc-roma-legacy.git
```
Once cloned, configure your Git user information (only needed the first time):
```bash
cd coc-roma-legacy
git config user.name "Your Git Username"
git config user.email "Your Email"
```
## Create Cocos Creator project
Inside `coc-roma-legacy` folder, create a `project.json` file:
```json title="project.json"
{
"engine": "cocos-creator-js",
"packages": "packages",
"name": "coc-roma-legacy",
"version": "2.4.4",
"isNew": false
}
```
Now you can open the project in `Cocos Creator`.
1. Launch **Cocos Dashboard**
2. Click **Add Project**
3. Navigate to **coc-roma-legacy** folder
4. Click **Select Project**.
![Cocos Dashboard](./img/cocos-dashboard.png)
Now that the project is available in `Cocos Dashboard`, double-click on it to open.
`Cocos Creator` will generate the entire game structure including `.gitignore` file.
![Cocos folder structure](./img/cocos-folder-structure.png)
## Commit to Git
At this point, you should create an initial commit and open your first `Pull Request`.
Run these following command:
```bash
git checkout -b feature/init-project
git add --a
git commit -m "Init cocos project"
git push --set-upstream origin feature/init-project
```

View File

@ -1,92 +0,0 @@
---
sidebar_position: 2
---
# Add Submodules
Let's add more packages and templates to the project.
A slot game project is composed of multiple Git repositories used as [submodules](https://www.atlassian.com/git/tutorials/git-submodule).
It is important to understand the responsibilities of each submodule.
We recommend reviewing the [Slot Core Submodule documentation](../category/submodules/) before proceeding.
## Main submodules
These are submodules presented in every Slot Game project.
To add main submodules, run the following commands:
```bash
git submodule add -f ../base-slot-template.git assets/core-assets/slotty-core
git submodule add -f ../game-core-template.git assets/core-assets/game-core
git submodule add -f ../hyper-slot-template.git assets/core-assets/hyper-core
```
To add packages submodule, first **delete packages folder**.
Then run the follwing command:
```bash
git submodule add -f ../hyper-editor-package.git packages
```
## International Theme vs Chinese Theme
Depend on the theme of your game, add these commands:
For `International Theme`:
```bash
git submodule add -f ../hyper-wintune-international.git assets/core-assets/hyper-wintune-international
git submodule add -f ../hyper-coin-shower-international.git assets/core-assets/hyper-coin-shower-international
git submodule add -f ../hyper-dialog-international.git assets/core-assets/hyper-dialog-international
```
For `Chinese Theme`:
```bash
git submodule add -f ../hyper-wintune-chinese.git assets/core-assets/hyper-wintune-chinese
git submodule add -f ../hyper-coin-shower-chinese.git assets/core-assets/hyper-coin-shower-chinese
git submodule add -f ../hyper-dialog-chinese.git assets/core-assets/hyper-dialog-chinese
```
## Optional Submodule
These are submodules for specific feature including: `landing sound`, effect `win border/tension` and `hyper jackpot`.
Add one or more of those submodules depends on the game design.
```bash
git submodule add -f ../hyper-jackpot-package.git assets/core-assets/hyper-jackpot
git submodule add -f ../hyper-win-border-and-tension.git assets/core-assets/hyper-win-border-and-tension
git submodule add -f ../hyper-scatter-landing-sound.git assets/core-assets/hyper-scatter-landing-sound
```
## Update submodules to latest commit
All submodules should be on master branch and update to the latest commit.
To fetch the latest update, run the following command:
```bash
git submodule update --init --recursive
```
:::tip
You can drop the `--init` after the first time.
:::
## Commit to git
Now that we add all nesscessary submodule to the project, let's commit all of these change to open a Pull Request:
Run these following command:
```bash
git checkout -b feature/add-submodules
git add --a
git commit -m "Add submodules"
git push --set-upstream origin feature/add-submodules
```

View File

@ -1,35 +0,0 @@
---
sidebar_position: 3
---
# Setup Custom Cocos Engine
Set **Javascript Engine Path** to a **custom Cocos Engine**.
Thanks to the open source nature of Cocos Creator, we are able to customize some of the function in the source code to meet the requirement for Hyper Slot Game.
For the detail of the Custom Engine, take a look at this [**Custom Cocos Engine documentation**](../category/custom-cocos-engine)
**Clone the repository**
This custom engine can be universally used for all Hyper Slot Game project. So you only have to do this step once.
Choose your working directory and clone this repo using the following command:
```bash
git clone https://gitea.plp19.com/cocos-core/cocos-creator-engine.git
```
**Set custom engine in Cocos Creator**
Open the project in Cocos Creator.
From the main menu, choose `Projects` -> `Project Settings`
![Project Setting](./img/project-setting.png)
Click on the `Custom Engine` tab, set `Javascript Engine Path` to the `cocos-creator-engine` folder.
Click `Save` and restart Cocos Creator.
![Set Custom Engine](./img/set-custom-engine.png)

View File

@ -1,52 +0,0 @@
---
sidebar_position: 4
---
# Create Game Folder Structure
Make a folder structure for all the game assets.
Inside the `assets` folder, we already have a `core-assets` folder which contains all assets of the template submodule.
We need to have a `game-assets` folder to contain the assets for our game.
Create the following folder structure:
![Game Assets Folder](./img/game-assets.png)
Next we're gonna use our first template assets - the template cocos scenes.
These scenes are already setup and ready to use.
Copy all Cocos scene assets from `assets/core-assets/hyper-core/scenes` to ` assets/game-assets/scenes`.
Rename those scenes:
- `template-loading` -> `loading`
- `template-main-game` -> `main-game`
- `template-preload` -> `preload`
- `template-preview` -> `preview`
![Template Scene](./img/template-scenes.png)
Inside `assets/game-assets/scripts/`, create a folder called `custom-scaler` then add a script `custom-scale-data.js`.
![Custom Scale](./img/custom-scale.png)
The setup is complete. You should create a commit and open Pull Request.
Run these following command:
```bash
git checkout -b feature/setup-folder-structure
git add --a
git commit -m "Setup Folder Structure"
git push --set-upstream origin feature/setup-folder-structure
```
:::warning
Notice that you can only commit `game-asset`, `scripts` and `scenes`.
Git automatically ignores empty folders, so don't be alarmed if they don't appear in your commits.
No worries—these folders will soon be filled with plenty of assets!
:::

View File

@ -1,17 +0,0 @@
{
"position": 1,
"label": "Setup The Project",
"collapsible": true,
"collapsed": false,
"link": {
"type": "generated-index",
"title": "Start a new project",
"description": "This section will guide you through the process of setting up a new project, including creating a new repository and configuring your development environment.",
"keywords": [
"setup",
"project",
"repository",
"development environment"
]
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 85 KiB

View File

@ -1,178 +0,0 @@
---
sidebar_position: 1
---
# Game Configuration
The initial configuration requirements from the Slot Core.
---
While the core logic is responsible for calculations and maintaining the game state, it's the client's responsibility to define all game-specific information.
Lets go step-by-step to define these elements.
## Slot Items
Each game features specific slot items displayed on the reel panel. By default, the Slot Core includes only two items: **Wild** and **Scatter**.
For `Roma Legacy`, there are 8 slot items total, including **Wild**.
![Symbols](./img/01-game-config/symbols.png)
To define the 7 additional items for this game, create the following script:
```jsx title="assets/game-assets/scripts/slotty-settings/slotty-item.js"
var SlottyItem = p4fslot.require('slotty-item');
var Enum = p4fslot.require('extendable-enum');
Enum.InitEnum(SlottyItem, [
'Pic1',
'Pic2',
'Pic3',
'Pic4',
'Pic5',
'Pic6',
'Pic7',
'Bonus'
]);
module.exports = SlottyItem;
```
**Note**: Item names are defined using the texture asset names, not the symbol names received from the server response.
|Asset's name | Server Response |
|-------------|-----------------|
| Pic1 | PIC1 |
| Pic2 | PIC2 |
| Pic3 | PIC3 |
| Pic4 | PIC4 |
| Pic5 | PIC5 |
| Pic6 | PIC6 |
| Pic7 | PIC7 |
| Bonus | BONUS |
For example, if the server returns a symbol named **BONUS**, the game should display the **Bonus** asset.
To establish this mapping, use the following configuration script:
```jsx title="assets/game-assets/scripts/configs/extend-hyper-gaming-config.js"
var HyperGamingConfig = require('hyper-gaming-config');
var SlottyItem = require('slotty-item');
HyperGamingConfig.itemMapper['BONUS'] = SlottyItem.Bonus;
HyperGamingConfig.itemMapper['PIC1'] = SlottyItem.Pic1;
HyperGamingConfig.itemMapper['PIC2'] = SlottyItem.Pic2;
HyperGamingConfig.itemMapper['PIC3'] = SlottyItem.Pic3;
HyperGamingConfig.itemMapper['PIC4'] = SlottyItem.Pic4;
HyperGamingConfig.itemMapper['PIC5'] = SlottyItem.Pic5;
HyperGamingConfig.itemMapper['PIC6'] = SlottyItem.Pic6;
HyperGamingConfig.itemMapper['PIC7'] = SlottyItem.Pic7;
```
## Slot Setting
There are two settings that determine the betting method used in the game:
- **TypeBetConfig**: this defines the bet calculation method. The available options are:
- Way
- Line
- BetOptions
- Dynaways
- **TypePayline**: this setting determines which text label is displayed in the game's UI. Each type corresponds to a different label:
| Type | Text Message |
|---------|----------------|
|Way | BET PER WAY |
|Line | BET PER LINE |
|BaseBet | PLAY MULTIPLIER|
Depending on the requirements of your game, you can customize both Payline and BetConfig by adding the following script:
```jsx title="assets/game-assets/scripts/slotty-settings/extend-slotty-setting.js"
var BaseSlottySetting = p4fslot.require('slotty-setting');
var SlottyItem = require('slotty-item');
var SlottyParameter = p4fslot.require('slotty-parameter');
BaseSlottySetting.prototype._getDefaultTypePayline = function () {
return SlottyParameter.TypePayline.Line;
};
BaseSlottySetting.prototype._getDefaultTypeBetConfig = function () {
return SlottyParameter.TypeBetConfig.Line;
}
```
## Default Slot Item Pattern
When the game is opened, the reel panel should display a **default pattern** that contains no possible win lines.
For instance, the following item pattern should not be used, as it contains two win lines:
![Win Pattern](./img/01-game-config/win-pattern.png)
To keep the gameplay experience fresh, the displayed pattern should be selected randomly each time. At a minimum, three non-winning patterns should be available.
To configure these patterns, add the following method to your **extend-slotty-setting** script:
```jsx title="assets/game-assets/scripts/slotty-settings/extend-slotty-setting.js"
BaseSlottySetting.prototype._getPatternNotWin = function () {
return [
[SlottyItem.Pic5, SlottyItem.Pic3, SlottyItem.Pic5, SlottyItem.Pic1, SlottyItem.Pic5,
SlottyItem.Bonus, SlottyItem.Pic6, SlottyItem.Pic5, SlottyItem.Pic1, SlottyItem.Pic5,
SlottyItem.Pic2, SlottyItem.Pic6, SlottyItem.Pic2, SlottyItem.Pic1, SlottyItem.Pic2
],
[SlottyItem.Pic4, SlottyItem.Pic7, SlottyItem.Pic2, SlottyItem.Pic5, SlottyItem.Pic7,
SlottyItem.Pic4, SlottyItem.Pic7, SlottyItem.Pic6, SlottyItem.Pic5, SlottyItem.Pic7,
SlottyItem.Pic7, SlottyItem.Pic3, SlottyItem.Bonus, SlottyItem.Pic2, SlottyItem.Pic3
],
[SlottyItem.Pic1, SlottyItem.Pic2, SlottyItem.Pic3, SlottyItem.Pic7, SlottyItem.Pic3,
SlottyItem.Pic2, SlottyItem.Pic7, SlottyItem.Pic4, SlottyItem.Pic3, SlottyItem.Pic2,
SlottyItem.Pic1, SlottyItem.Pic7, SlottyItem.Pic4, SlottyItem.Pic3, SlottyItem.Bonus
]
];
};
```
The results of those 3 patterns are shown below:
| Pattern 1 | Pattern 2 | Pattern 3 |
|---------------------------------|---------------------------------|---------------------------------|
|![Pattern 1](./img/01-game-config/pattern-1.png)|![Pattern 2](./img/01-game-config/pattern-2.png)|![Pattern 3](./img/01-game-config/pattern-3.png)|
## Hyper Gaming Integration
The Slot Core supports both SmartFox and Hyper Gaming connections. For Hyper Gaming, we integrate specific modules using the DIContainer.
To connect and interact with the Hyper Gaming server, we need to register two key modules:
- **hyper-gaming-config**: manages the connection configuration for the Hyper Gaming server.
- **hyper-gaming-server-handler**: handles request and response data for game-server communication.
To register these, add the `_registerInjection` function in `extend-slotty-setting.js`:
```jsx title="assets/game-assets/scripts/slotty-settings/extend-slotty-setting.js"
var DIContainer = p4fcore.require('di-container');
BaseSlottySetting.prototype._registerInjection = function () {
DIContainer.Register('serverConfig', require('hyper-gaming-config'));
DIContainer.Register('serverHandler', p4fslot.require('hyper-gaming-server-handler'));
};
```
In addition to server modules, all Hyper Gaming projects should initialize the following handlers for sound, hotkey and UI interaction.
In the same `extend-slotty-setting.js`, add this function:
```jsx title="assets/game-assets/scripts/slotty-settings/extend-slotty-setting.js"
var HyperSoundHandler = require('sound-handler');
var UISoundHandler = require('ui-sound-handler');
var HyperHotkeyHandler = require('hyper-hotkey-handler');
var HyperNotificationHandler = require('hyper-notification-handler');
BaseSlottySetting.prototype._initializeParameter = function () {
new UISoundHandler();
new HyperSoundHandler();
new HyperHotkeyHandler();
new HyperNotificationHandler();
};
```

View File

@ -1,29 +0,0 @@
---
sidebar_position: 2
---
# Preview Scene
Local login configuration.
---
The login simulator scene allows you to run the game using a session account during development, enabling easier testing and debugging.
This scene includes a `login-hyper-gaming` object used to establish a connection with a running environment of your choice.
![Preview Scene](./img/02-preview-scene/preview-scene.png)
Available environments:
- **DEMO** : similar to [https://gaming-world.joker88.club]( https://gaming-world.joker88.club/). This environment uses a demo account, so no login is required. Some features are disabled, but the outcome feature is enabled, allowing you to select specific outcomes for testing purposes.
- **SAT** : similar to [http://fns.joker88.club](http://fns.joker88.club/). This environment requires a valid account to log in. Except for the outcome feature, all other features are enabled, including replay and resume functionality.
- **LOCAL** : Use this only if other environments are unavailable. By manually setting up session data, you can run the game locally. Not recommended for regular use.
To use preview scene, simply choose an Enviroment and put in the Game ID, then save the scene.
:::tip
You should set the preview scene as a start scene in `Project Setting`. With that, no matter which scene your are on, when the game starts, it will always load preview scene first.
![Preview Scene Setting](./img/02-preview-scene/preview-scene-setting.png)
:::

View File

@ -1,68 +0,0 @@
---
sidebar_position: 3
---
# Preload Scene
Setup configuration for asset loading.
---
The Preload Scene is where you define which assets will be downloaded **before** and **after** the game starts.
Setting up the preload system involves several steps, depending on the types of assets and specific download requirements.
Check out the [Game Assets Structure](../category/game-asset-structure) for more detail.
## Preload vs Postload
Hyper Slot Game uses a two-stage loading process:
- **Preload**: Downloads essential assets before the game scene is displayed. These typically include the background, text elements, and static textures.
- **Postload**: Downloads additional assets in the background after the scene has been loaded. This usually includes animations. While these assets are downloading, static frame texture are shown in place of the actual animations. Once the download is complete, the animations seamlessly replace the static frame.
| Preload | Postload |
|--------------------------------------|---------------------------------|
| ![Preload](./img/03-preload-scene/preload-static.png) | ![Postload](./img/03-preload-scene/postload.png) |
Preload and postload assets are organized by scene.
For example, before loading the **Main Scene**, its preload assets are downloaded first. After the scene is displayed, the postload assets begin downloading in the background.
The same process applies to other scenes such as **Gamble**, **Free Game**, and **Bonus**.
## Platform Assets
Hyper Slot Game runs on both Web Desktop and Web Mobile platforms. While the UI and textures appear visually similar across both, the actual assets differ due to platform-specific optimization requirements.
Typically, the mobile version uses smaller-sized texture assets to reduce memory usage and improve performance.
| Assets | Desktop Size | Mobile Size |
|-----------------------|---------------|--------------|
| Symbol Bonus Animation| 1024x2048 | 1024x1024 |
| Bigwin Spine Animation| 512x1024 | 358x717 |
As a result, when the game detects a mobile device, it will automatically download a different set of optimized assets tailored for that platform.
## Localize Assets
Hyper Slot Game supports localization through both text and raw asset replacements, with English as the default language.
Based on the selected language configuration, the game will download the corresponding localized assets instead of the default English versions.
| Assets | EN | ZH | TH |
|---------------|-----------------------------------------|---------------------------------------------|---------------------------------------------|
|Text Buy Bonus|![Buy Bonus EN](./img/03-preload-scene/title-buy-bonus.png)|![Buy Bonus ZH](./img/03-preload-scene/title-buy-bonus_zh.png)|![Buy Bonus TH](./img/03-preload-scene/title-buy-bonus_th.png)|
## Setting Up the Preload Scene
![Preload Scene Setup](./img/03-preload-scene/preload-scene.png)
To set up the Preload Scene, simply open the scene and run the **preload-hyper** command from the **P4F Editor** package.
The available commands are:
- **Load Message**: Scans the working directory for any text message files and loads them into the `game-message` component.
- **Load Localize**: Detects all available language options and loads the corresponding localized assets into the `localization` component.
- **Load Preload Assets**: Defines preload and postload assets, then loads them into the `p4f-scene-manager` component of the `scene-manager` node.
- **Load Assets By Platform**: Scans for mobile-specific assets (used when the game runs on mobile devices) and loads them into the `platform-asset-manager` component.
- **Load Sound**: Scans for background music and sound effects (SFX) and loads them into the `sound-controller`.
- **Load All Above**: Executes all of the above commands in sequence.

View File

@ -1,59 +0,0 @@
---
sidebar_position: 4
---
# Loading Scene
Generate asset loading scene layout.
---
This is where the actual preload asset downloading begins, accompanied by a progress bar to indicate loading status.
In addition to loading assets, Hyper Slot Game also uses this scene to showcase the games main features through in-game advertisements.
![Loading Roma Legacy](./img/04-loading-scene/loading-roma-legacy.png)
## Loading Hyper vs New Loading Hyper
In Hyper Slot games, there are 2 styles of loading scene:
- **loading-hyper**: The default loading setup. Displays all advertising features on a single screen, with an option to automatically launch the game once all preload assets are downloaded.
- **new-hyper-loading**: A newer loading style that presents advertising features in a paginated layout. This version does not include an option to start the game automatically.
| loading-hyper | new-loading-hyper |
|-------------------------------------------------------|-----------------------------------------------------------------|
|![loading-hyper](./img/04-loading-scene/hyper-loading-lucky-rooster.png)|![new-loading-hyper](./img/04-loading-scene/new-hyper-loading-gates-of-wealth.png)|
## Setup loading scene
To set up the loading scene, use the appropriate command from the `P4F Editor` package: `loading-hyper` or `new-loading-hyper`, depending on your requirements.
![Loading Hyper](./img/04-loading-scene/hyper-loading.png) ![New Loading Hyper](./img/04-loading-scene/new-hyper-loading.png)
Running either command will generate a complete loading scene, including both landscape and portrait layouts.
Once the scene is generated, you can customize it by positioning UI elements and assigning the appropriate assets.
![Loading Node Tree](./img/04-loading-scene/loading-node-tree.png)
One of the best features of these commands is that they can also automatically load all required assets for the loading scene.
If you run the command without setting up the assets, youll see an empty loading scene like this:
![Loading Raw Scene](./img/04-loading-scene/loading-raw-scene.png)
However, with a proper asset setup, the loading scene will appear fully populated, like this:
![Loading Full Assets Scene](./img/04-loading-scene/loading-full-assets-scene.png)
:::info
For detailed guidelines on how to set up loading assets, refer to the [Game Asset Structure](../category/game-asset-structure) manual.
:::
:::tip
For testing purposes, you dont need a full asset setup. \
Just set up the ***btn-start*** node in the Node Tree and youre good to go.
![Loading Button Setup](./img/04-loading-scene/loading-button-setup.png)
:::

View File

@ -1,26 +0,0 @@
---
sidebar_position: 1
---
# System Setup
## Overview
The **System** module provides global access to sprite frames and animation assets, enabling efficient resource management across the game.
## Sprite Frame Provider
The **SpriteFrameProvider** allows global access to sprite frames from anywhere in the codebase.
![Sprite Frame Provider](../img/05-main-scene/sprite-frame-provider.png)
**Setup Steps:**
1. Configure the **SpriteFrameProvider** to register sprite assets.
2. Ensure all sprite frames are added to the provider for global access.
## Animation Provider
The **Animation Provider** manages and exposes game-related animation assets globally.
![Animation Provider](../img/05-main-scene/animation-provider.png)
**Setup Steps:**
1. Register animation assets in the **Animation Provider**.
2. Verify that animations are correctly linked to their respective prefabs.

View File

@ -1,51 +0,0 @@
---
sidebar_position: 2
---
# Background Setup
## Overview
The background serves as the visual scenery behind gameplay elements, supporting both **Landscape** (Desktop and Mobile) and **Portrait** (Mobile only) orientations.
| Orientation | Desktop | Mobile |
|-------------|---------|--------|
| **Landscape** | ![Background Landscape](./img/02-background/bg-overview-landscape-1.png) | ![Background Landscape](./img/02-background/bg-overview-landscape-2.png) |
| **Portrait** | ![Background Portrait](./img/02-background/bg-overview-portrait-2.png) | ![Background Portrait](./img/02-background/bg-overview-portrait-1.png) |
## Asset Preparation
| Type | Assets | Description |
|------|--------|-------------|
| **Static** | ![Static Background](./img/02-background/bg-prepare-assets-static.png) | Required for all games. |
| **Animation** | ![Animated Background](./img/02-background/bg-prepare-assets-anim.png) | Optional, depending on game design. |
## Setup Steps
1. **Landscape Background**:
- Use the prepared sprite frame for the landscape background.
- ![Landscape Setup](./img/02-background/bg-setup-landscape.png)
2. **Portrait Background**:
- Use the prepared sprite frame for the mobile portrait background.
- ![Portrait Setup](./img/02-background/bg-setup-portrait.png)
3. **Animated Background** (if applicable):
- **Step 1**: Use the helper tool to generate animations from prepared assets.
- ![Helper Animation](./img/02-background/bg-setup-hepler-anim.png)
- ![Animation Provider](./img/02-background/bg-setup-anim-provider.png)
- **Step 2**: Configure spine animation settings:
- Enable **Is Loop** to ensure continuous playback.
- Set a **Static Sprite Frame** for display before the animation loads.
- ![Animation Setup 1](./img/02-background/bg-setup-anim-1.png)
- ![Animation Setup 2](./img/02-background/bg-setup-anim-2.png)
- **Step 3**: Add animation nodes:
- **Landscape**:
- Create an `Empty Node` named `anim-background-main-game`.
- Add the `animation-play-on-enable` component with the animation name from the **Animation Provider**.
- Add the `background-scaler` component to resize based on screen resolution.
- ![Landscape Animation](./img/02-background/bg-setup-anim-landscape.png)
- **Portrait**:
- Create an `Empty Node` named `mobile-background-anim-portrait`.
- Add the `mobile-portrait-background-ui-controller` and `orientation-ui-controller` components for mobile portrait display.
- Create a child `Empty Node` named `anim-background-main-game`.
- Add the `animation-play-on-enable` and `portrait-anim-background-scaler` components.
- ![Portrait Animation 1](./img/02-background/bg-setup-anim-portrait-1.png)
- ![Portrait Animation 2](./img/02-background/bg-setup-anim-portrait-2.png)

View File

@ -1,43 +0,0 @@
---
sidebar_position: 3
---
# Reel Slot Setup
## Overview
The reel slot system manages the core spinning mechanics of the game.
## Asset Preparation
- Add symbol textures and reel frames:
- ![Symbol Texture](../img/05-main-scene/add-symbol-texture.png)
- ![Reel Frame](../img/05-main-scene/add-reel-frame.png)
## Sprite Frame Provider
- Add symbols to the **SpriteFrameProvider** for global access.
- ![Sprite Frame Provider](../img/05-main-scene/sprite-frame-provider-reel-slot.png)
## Reel Frame
- Configure the reel frame:
- ![Reel Frame 1](../img/05-main-scene/add-reel-frame-2.png)
- ![Reel Frame 2](../img/05-main-scene/reel-frame.png)
## Configuration
Use the `reel-scroller-helper` to set up spinning behavior:
![Reel Scroller Helper](../img/05-main-scene/reel-scroller-helper.png)
| Property | Description | Example |
|----------|-------------|---------|
| **Cell Item Script Name** | Script attached to each cell item. | ![Cell Item Script](../img/05-main-scene/hyper-cell-item.png) |
| **Scroller Script Name** | Script handling spinning logic. | ![Scroller Script](../img/05-main-scene/scroller.png) |
| **Row Count x Reel Count** | Number of slot items per row and column. | ![Reel Row Column](../img/05-main-scene/reel-row-column.png) |
| **Cell Size** | Size of each cell. | ![Cell Size](../img/05-main-scene/cell-size.png) |
| **Cell Spacing** | Horizontal and vertical distance between cells. | - |
| **Cell Dim Color** | Dark color for non-winning cells during win animations. | ![Dim Cell Color](../img/05-main-scene/dim-cell-color.png) |
| **Top Count and Bot Count** | Additional cells at the top and bottom for spinning logic. | ![Cell Top Bottom](../img/05-main-scene/cell-top-bottom.png) |
## Generate Reel Panel
- Use the `reel-scroller-helper` to auto-generate the reel panel.
- ![Generate Panel](../img/05-main-scene/generate-panel.png)
**Tip**: Temporarily disable any popups covering the scene to view and edit reel slot components clearly.

View File

@ -1,37 +0,0 @@
---
sidebar_position: 4
---
# Spinning Panel Setup
## Overview
The spinning panel system includes the **reel slot panel** and additional panels: `landing-panel`, `tension-panel`, `present-win-cell-panel`, and `present-win-border-panel`.
## Panel Setup
- **Landing Panel**:
- ![Landing Panel](../img/05-main-scene/landing-panel.png)
- **Script**:
```jsx
SlottySetting.prototype._registerInjection = function () {
DIContainer.Register('landingGenerator', require('landing-generator'));
};
```
- **Present Win Cell Panel**:
- ![Present Win Cell Panel](../img/05-main-scene/present-win-cell-panel.png)
- **Present Win Border Panel**:
- ![Present Win Border Panel](../img/05-main-scene/present-win-border-panel.png)
- **Tension Panel**:
- ![Tension Panel](../img/05-main-scene/tension-panel.png)
- For custom size frames, set **sizeMode** to **Custom** and configure the static frame and size.
- ![Tension Custom Size](../img/05-main-scene/tension-panel-custom.png)
- **Check Toggle**: Ensure the general panel toggle is correctly set.
- ![Toggle Note](../img/05-main-scene/note-bug-tension.png)
- **Script**:
```jsx
SlottySetting.prototype._registerInjection = function () {
DIContainer.Register('tensionGenerator', require('tension-generator'));
};
```

View File

@ -1,41 +0,0 @@
---
sidebar_position: 5
---
# On Reel Win Point
## Overview
- The **Win Point Per Line** system displays win points for each payline, including scatter wins.
- The **All Win Point** system displays win point at center.
| Win Point Per Line | All Win Point |
| ------------------ | ------------- |
|![Win Point Overview](./img/05-on-reel-win-point/overview-1.png)|![Win Point Overview](./img/05-on-reel-win-point/overview-2.png)|
## Asset Preparation
1. Locate all template prefabs: `assets/core-assets/hyper-core/packages/on-reel-present-win-point/prefab`
2. Copy and paste them to the game assets location: `assets/game-assets/prefabs`
![Prepare Prefabs](./img/05-on-reel-win-point/prepare-assets-1.png)
3. Prepare fonts
![Prepare Fonts](./img/05-on-reel-win-point/prepare-assets-2.png)
## Setup
- Add the `on-reel-present-win-point`, `on-reel-present-all-win-point` prefab to the main scene.
- Set the **Label Position**, **Cell Item Size**, and **Defaut Font Size** according to the game design.
![Label Component](./img/05-on-reel-win-point/setup-win-per-line-1.png)
- Set the **Font** the prepared assets.
![Label Component](./img/05-on-reel-win-point/setup-win-per-line-2.png)
![Label Component](./img/05-on-reel-win-point/setup-all-win-point.png)
:::tip
Follow game design specifications for position and size.
:::

View File

@ -1,93 +0,0 @@
---
sidebar_position: 6
---
# Special Win System
## Overview
Special Wins are high-value reward events categorized by payout thresholds:
| Win Type | Trigger Threshold | Preview |
|----------|-------------------|---------|
| **Big Win** | Medium payout | ![Big Win](../img/05-main-scene/special-win-big.png) |
| **Super Win** | High payout | ![Super Win](../img/05-main-scene/special-win-super.png) |
| **Mega Win** | Maximum payout | ![Mega Win](../img/05-main-scene/special-win-mega.png) |
## Implementation
### Asset Preparation
- Components:
| Component | Purpose |
|-----------|---------|
| `hyper-special-win-initializer` | Initializes the system. |
| `hyper-present-special-win` | Manages animation sequences and display logic. |
| `hyper-special-win-label-point-effect` | Controls win amount visualization. |
- ![Component Architecture](../img/05-main-scene/special-win-in-game.png)
- **Coin Effect System**:
- Variants for different game theme:
| Submodule | Theme | Preview |
|-----------|-------|---------|
| `hyper-coin-shower-international` | International | ![International Coin](../img/05-main-scene/special-win-coin-international.png) |
| `hyper-coin-shower-chinese` | Chinese | ![Chinese Coin](../img/05-main-scene/special-win-coin-chinese.png) |
- **Static Assets**:
| Platform | Path | Preview |
|----------|------|---------|
| Desktop | `assets/textures/desktop/preloads/special-wins` | ![Desktop Assets](../img/05-main-scene/special-win-folder-desktop.png) |
| Mobile | `assets/textures/mobile/preloads/special-wins` | ![Mobile Assets](../img/05-main-scene/special-win-folder-mobile.png) |
### Animation Setup
1. **Animation Resources**:
- Path:
| Platform | Path | Preview |
|----------|------|---------|
| Desktop | `assets/textures/desktop/postloads/anim-special-win` | ![Desktop Animation](../img/05-main-scene/special-win-folder-desktop-anim.png) |
| Mobile | `assets/textures/mobile/postloads/anim-special-win` | ![Mobile Animation](../img/05-main-scene/special-win-folder-mobile-anim.png) |
2. **Animation Flow**:
```mermaid
graph TD
SW[Special Wins] --> BW[Big Win]
SW --> SPW[Super Win]
SW --> MW[Mega Win]
BW --> BWI[bigwin-in] --> BWL[bigwin-loop] --> BWO[bigwin-out]
SPW --> SPWI[superwin-in] --> SPWL[superwin-loop] --> SPWO[superwin-out]
MW --> MWI[megawin-in] --> MWL[megawin-loop] --> MWO[megawin-out]
classDef inStage fill:#e6f3ff,stroke:#666,color:#000
classDef loopStage fill:#fff2cc,stroke:#666,color:#000
classDef outStage fill:#f8cecc,stroke:#666,color:#000
classDef winType fill:#d5e8d4,stroke:#82b366,color:#000
classDef specialWin fill:#fff4dd,stroke:#ff0000,color:#000
class BWI,SPWI,MWI inStage
class BWL,SPWL,MWL loopStage
class BWO,SPWO,MWO outStage
class BW,SPW,MW winType
class SW specialWin
linkStyle default stroke-width:2px,stroke:#ff0000
```
- ![Type Names](../img/05-main-scene/special-win-type-name.png)
3. **Animation Settings**:
- Configure static fallback and loop animations:
| Setting | Example |
|---------|---------|
| Static Fallback | ![Static Fallback](../img/05-main-scene/special-win-static.png) |
| Loop Animation | ![Loop Animation](../img/05-main-scene/special-win-loop.png) |
4. **Font Configuration**:
- Path: `assets/game-assets/fonts/preloads/main-game/fnt-special-win`
- Steps:
1. Import font files.
- ![Font Packaging](../img/05-main-scene/special-win-pack-font.png)
2. Add font to the special win component.
- ![Font Integration](../img/05-main-scene/special-win-font.png)
3. Configure text alignment, font size, and spacing.
- ![Font Layout](../img/05-main-scene/special-win-font-align.png)
**Tip**:
- Move assets to `custom-scale/` to resolve image quality issues.
- Customize font styles based on game design.
- [View Platform Asset Structure](/docs/category/game-asset-structure)

View File

@ -1,63 +0,0 @@
---
sidebar_position: 7
---
# Item Description
## Overview
The **Item Description** system provides detailed information about game items, including payouts and descriptions.
![Item Description Overview](./img/07-item-description/overview.png)
## Asset Preparation
| Assets | Description |
|--------|-------------|
| ![Background](./img/07-item-description/prepare-assets-1.png) | Background setup. |
| ![Static Symbol](./img/07-item-description/prepare-assets-2.png) | Static symbol setup. |
| ![Animation Symbol](./img/07-item-description/prepare-assets-3.png) | Animation symbol setup. |
| ![Payout/Description](./img/07-item-description/prepare-assets-4.png) | Payout or description text setup. |
## Setup
1. **Locate Template Prefabs**:
- Search for the `template-item-description` prefab.
- ![Locate Prefabs](./img/07-item-description/prepare-prefabs-1.png)
2. **Clone Assets**:
- Copy and paste to the game assets location, removing unnecessary prefixes.
- ![Clone Prefabs](./img/07-item-description/prepare-prefabs-2.png)
### Prefab Configurations
- **item-description-small** (Items with win payout only):
- ![Overview](./img/07-item-description/setup-item-small-overview.png)
- Steps:
| Step | Action | Image Reference |
|------|--------|-----------------|
| 1 | Set **Sprite Frame** in `background` using prepared assets. | ![Step 1](./img/07-item-description/setup-item-small-1.png) |
| 2 | Name prefab as `item-description-<name>` and set **Animation Name** in **Animation Provider**. | ![Step 2](./img/07-item-description/setup-item-small-2.png) |
| 3 | Set **Sprite Frame** in `sprite-item` using prepared assets. | ![Step 3](./img/07-item-description/setup-item-small-3.png) |
| 4 | Adjust **Color**, **Font**, and **Font Size** in `multi-x...` and `odds-x...`. Use [Bitmap Font Creator](http://localhost:3000/docs/category/game-asset-structure) if needed. | ![Step 4](./img/07-item-description/setup-item-small-4.png) |
- **item-description-no-odds** (Items with description only):
- ![Overview](./img/07-item-description/setup-item-no-odds-overview.png)
- Steps:
| Step | Action | Image Reference |
|------|--------|-----------------|
| 1 | Set **Sprite Frame** in `background` using prepared assets. | ![Step 1](./img/07-item-description/setup-item-no-odds-1.png) |
| 2 | Name prefab as `item-description-<name>` and set **Animation Name** in **Animation Provider**. | ![Step 2](./img/07-item-description/setup-item-no-odds-2.png) |
| 3 | Set **Sprite Frame** in `sprite-item` using prepared assets. | ![Step 3](./img/07-item-description/setup-item-no-odds-3.png) |
| 4 | Set **String**, **Color**, **Font**, and **Font Size** in `description`. Use [Bitmap Font Creator](http://localhost:3000/docs/category/game-asset-structure) if needed. | ![Step 4](./img/07-item-description/setup-item-no-odds-4.png) |
- **item-description-big** (Items with both payout and description):
- ![Overview](./img/07-item-description/setup-item-big-overview.png)
- Steps:
| Step | Action | Image Reference |
|------|--------|-----------------|
| 1 | Set **Sprite Frame** in `background` using prepared assets. | ![Step 1](./img/07-item-description/setup-item-big-1.png) |
| 2 | Follow **Step 4** of `item-description-small` for payout setup. | [See Small Setup](#prefab-configurations) |
| 3 | Follow **Step 4** of `item-description-no-odds` for description setup. | [See No-Odds Setup](#prefab-configurations) |
**Tip**:
- Use the helper tool to configure:
1. Set **Content Size** and **Cell Item Size** per game design.
2. Use prepared bitmap fonts for **Labels**.
3. Click **Set Size** to run the helper.
4. Configure **Background**, **Sprite Frame**, **Animation**, **Payout**, and **Description** using prepared assets.
- ![Helper Setup](./img/07-item-description/setup-item-helper.png)

View File

@ -1,74 +0,0 @@
---
sidebar_position: 8
title: Free Round
description: Display and manage remaining free rounds in the game.
---
# Free Round System
## Overview
The **Free Round** system manages the display and logic for tracking remaining free rounds with fixed bet in the game, supporting both desktop and mobile platforms.
- **International theme popup**
![Free Round International](../img/05-main-scene/freeround-counter/freerounds-international.png)
- **Chinese theme popup**
![Free Round Chinese](../img/05-main-scene/freeround-counter/freerounds-chinese.png)
| Platform | Preview |
|----------|---------|
| Desktop | ![Desktop Free Round](../img/05-main-scene/freeround-counter/overview-freeround-desktop.png) |
| Mobile | ![Mobile Free Round](../img/05-main-scene/freeround-counter/overview-freeround.png) |
## Asset Preparation
- **Core Assets**:
- Path: `assets/core-assets/hyper-core/packages/freeround-count-box/prefabs`
- ![Core Prefabs](../img/05-main-scene/freeround-counter/freeround-path-prefabs.png)
- **Game Assets**:
- Path: `assets/game-assets/prefabs`
- ![Game Prefabs](../img/05-main-scene/freeround-counter/freeround-path-prefabs-in-game.png)
## Setup
1. **General Configuration**:
- Ensure script references correct nodes.
- ![General Setup](../img/05-main-scene/freeround-counter/freeround-counter-general.png)
- Properties:
| Property | Description |
|----------|-------------|
| `duration` | Duration of fade in/out animation (seconds). |
| `content` | Container node for the counter. |
| `labelLeft` | Label showing remaining free rounds. |
- ![Settings](../img/05-main-scene/freeround-counter/freeround-counter-setting-general.png)
2. **Platform Setup**:
- **Desktop**:
- Add `Platform-ui-controller` component.
- ![Desktop Setup](../img/05-main-scene/freeround-counter/freeround-counter-setup-desktop.png)
- **Mobile**:
- Add `Platform-ui-controller` and `UI Mobile Position` components.
- ![Mobile Setup](../img/05-main-scene/freeround-counter/freeround-counter-setup-mobile.png)
3. **Asset Setup**:
- **Desktop**:
- Path: `assets/game-assets/textures/desktop/preloads/main-game/custom-scale`
- ![Desktop Assets](../img/05-main-scene/freeround-counter/assets-freeround-desktop.png)
- **Mobile**:
- Path: `assets/game-assets/textures/mobile/preloads/main-game/custom-scale`
- ![Mobile Assets](../img/05-main-scene/freeround-counter/assets-freeround-mobile.png)
- **Common**:
- Free Round Background: ![Background Asset](../img/05-main-scene/freeround-counter/assets-freeround-background.png)
4. **Font Setup**:
- ![Font Setup](../img/05-main-scene/freeround-counter/add-font.png)
**Tip**:
- Follow game design for position and size.
- Use separate textures for Desktop and Mobile.
- Ensure the main scene includes the popup panel ([See Popup Panel Guide](/docs/setup-main-game/main-scene/popup-panel#multiple-popup-panel)).
## Game Result Example
| Platform | Popup | Action | Result |
|----------|-------|--------|--------|
| Desktop | ![Popup Desktop](../img/05-main-scene/freeround-counter/freerounds-international.png) | Click → Start | ![Result Desktop](../img/05-main-scene/freeround-counter/overview-freeround-desktop.png) |
| Mobile | ![Popup Mobile](../img/05-main-scene/freeround-counter/freerounds-international.png) | Click → Start | ![Result Mobile](../img/05-main-scene/freeround-counter/overview-freeround.png) |
![TotalWin](../img/05-main-scene/freeround-counter/total-win-freerounds.png)

View File

@ -1,98 +0,0 @@
---
sidebar_position: 9
---
# Info Pages
## Overview
**Info Pages** provide players with details about game rules, features, symbols, payout structures, and mechanics. They are divided into **Paytable** and **Rules** sections, with different layouts for Desktop and Mobile.
| Platform | Desktop | Mobile |
|----------|---------|--------|
| Paytable/Rules | ![Desktop 1](./img/09-info-pages/overview-desktop-1.png)<br/>![Desktop 2](./img/09-info-pages/overview-desktop-2.png)<br/>![Desktop 3](./img/09-info-pages/overview-desktop-3.png) | ![Mobile 1](./img/09-info-pages/overview-mobile-1.png)<br/>![Mobile 2](./img/09-info-pages/overview-mobile-2.png) |
## Asset Preparation
| Assets | Description |
|--------|-------------|
| ![Rules Asset](./img/09-info-pages/prepare-assets-1.png) | Used for **Rules** or RichText images. |
| ![Paytable Asset](./img/09-info-pages/prepare-assets-2.png) | Used for **Paytable** setup. |
## Desktop Setup
1. **Locate Template Prefabs**:
- Search for the `desktop-hyper-info-panel` prefab.
- ![Locate Prefabs](./img/09-info-pages/prepare-prefabs-desktop-1.png)
2. **Clone Assets**:
- Copy and paste to the game assets location, removing unnecessary prefixes.
- ![Clone Prefabs](./img/09-info-pages/prepare-prefabs-desktop-2.png)
### desktop-info-panel
| Step | Action | Image Reference |
|------|--------|-----------------|
| 1 | Change **Color** in `page-background` per game design. | ![Step 1](./img/09-info-pages/configure-panel-1.png) |
| 2 | Change **Color** in `menu-header-background` per game design. | ![Step 2](./img/09-info-pages/configure-panel-2.png) |
| 3 | Update **Prefab** in `paytable-content` using prepared prefabs. | ![Step 3](./img/09-info-pages/configure-panel-3.png) |
| 4 | Update **Prefab** in `rules-content` using prepared prefabs. | ![Step 4](./img/09-info-pages/configure-panel-4.png) |
### desktop-paytable-content
- **Item with Payout**:
- ![Paytable Payout](./img/09-info-pages/configure-paytable-1.png)
- Steps:
| Step | Action | Image Reference |
|------|--------|-----------------|
| 1 | Set **Item Name** and **Odds Items** per game design. | ![Step 1](./img/09-info-pages/configure-item-payout-1.png) |
| 2 | Set **Sprite Frame** in `item-display` using prepared assets. | ![Step 2](./img/09-info-pages/configure-item-payout-2.png) |
| 3 | Change **Color** in `multi-x...` and `odds-x...` per game design. | ![Step 3](./img/09-info-pages/configure-item-payout-3.png) |
| 4 | Adjust **Font** and **Font Size** in `multi-x...` and `odds-x...`. Use [Bitmap Font Creator](http://localhost:3000/docs/category/game-asset-structure) if needed. | ![Step 4](./img/09-info-pages/configure-item-payout-4.png) |
- **Item with Description**:
- ![Paytable Description](./img/09-info-pages/configure-paytable-2.png)
- Steps:
| Step | Action | Image Reference |
|------|--------|-----------------|
| 1 | Set **Name** per game design. | ![Step 1](./img/09-info-pages/configure-item-description-1.png) |
| 2 | Set **Sprite Frame** in `item-display` using prepared assets. | ![Step 2](./img/09-info-pages/configure-item-description-2.png) |
| 3 | Change **String** in `description` per game design. | ![Step 3](./img/09-info-pages/configure-item-description-3.png) |
- **Feature Game**:
- Configure based on game features (e.g., **FREESPIN BONUS**, **BONUS FEATURE**):
- **Title**: Update **String** and **Color** in `freespins-bonus-title`.
- **Image**: Set **Sprite Frame** in `freespins-bonus-image-...` using prepared assets.
- **Description**: Update **String** in `freespins-bonus-description`.
- ![Feature Overview](./img/09-info-pages/configure-feature-game-1.png)
- ![Feature Configure](./img/09-info-pages/configure-feature-game-2.png)
- ![Feature Overview 2](./img/09-info-pages/configure-feature-game-3.png)
- ![Feature Configure 2](./img/09-info-pages/configure-feature-game-4.png)
### desktop-rules-content
- Types: **Lines** or **Ways**.
- Steps:
1. Set **Sprite Frame** in `lines-image` using prepared assets.
2. Change **Color** in `lines-title` per game design.
3. For **Ways**:
- Update **String** in `lines-title` to **WIN WAYS/DYNAWAYS**.
- Enable and update **String** in `lines-description`.
- ![Rules Overview](./img/09-info-pages/configure-rules-1.png)
- ![Rules Configure](./img/09-info-pages/configure-rules-2.png)
- ![Rules Overview 2](./img/09-info-pages/configure-rules-3.png)
- ![Rules Configure 2](./img/09-info-pages/configure-rules-4.png)
## Mobile Setup
1. **Locate Template Prefabs**:
- Search for the `mobile-ui` prefab.
- ![Locate Prefabs](./img/09-info-pages/prepare-prefabs-mobile-1.png)
2. **Clone Assets**:
- Copy and paste to the game assets location, removing unnecessary prefixes.
- ![Clone Prefabs](./img/09-info-pages/prepare-prefabs-mobile-2.png)
3. **Configure Prefabs**:
- Configure `mobile-paytable-content` and `mobile-rules-content` as described in [Desktop Setup](#desktop-setup).
4. **Spawner Positions**:
- For **Paytable**: Use `mobile-paytable-content-spawner` in the `mobile-ui` prefab.
- ![Paytable Spawner](./img/09-info-pages/configure-prefab-mobile-1.png)
- For **Rules**: Use `mobile-rule-content-spawner` in the `mobile-ui` prefab.
- ![Rules Spawner](./img/09-info-pages/configure-prefab-mobile-2.png)
**Tip**:
- If the game has a server, verify config settings:
1. Open DevTools, navigate to the **Network** tab, and find the message with **event** = "config".
2. Compare **paytable** values with the configured setup.
- ![Config Settings](./img/09-info-pages/prepare-setting-config.png)

View File

@ -1,58 +0,0 @@
---
sidebar_position: 10
---
# Desktop Bottom Bar UI
## Overview
The **Bottom Bar UI** provides a functional interface for gameplay controls on desktop, using a horizontal layout to maximize screen width.
![Desktop Bottom Bar](../img/05-main-scene/bottom-ui-desktop.png)
## Implementation
1. **Set Up Prefab Editor**:
- **Locate Prefab**:
- Search for `ui-bottom-bar-panel` prefab.
- ![Locate Prefab](../img/05-main-scene/add-texture-bottom-bar-prefab.png)
- **Find Assets**:
- Navigate to `core/editor` directory.
- ![Core Directory](../img/05-main-scene/add-texture-label-prefab.png)
- **Clone Assets**:
- Copy and paste to the game assets location.
- ![Asset Placement](../img/05-main-scene/editor-texture-label-prefab.png)
2. **Configure Prefabs**:
- **Core Prefabs Structure**:
- Path: `assets/core-assets/hyper-core/packages/ui/desktop-ui/prefabs`
- ![Directory Structure](../img/05-main-scene/add-texture-bottom-bar-prefab2.png)
- **Rename Prefabs**:
- Remove unnecessary prefixes:
| Prefix to Remove | Original Name | Final Name |
|------------------|---------------|------------|
| `template-new-` | `template-new-ui-bottom-bar-panel` | `ui-bottom-bar-panel` |
| `template-` | `template-button-auto-selection` | `button-auto-selection` |
- ![Rename Example](../img/05-main-scene/rename-prefab.png)
- **Customize `button-auto-selection` Label**:
- Use `template-label-auto-selection` to adjust appearance.
- Add **Label Outline** and **Label Shadow** for better readability.
- ![Label Options](../img/05-main-scene/option-for-label.png)
- **Customize `ui-bottom-bar-panel` Label**:
- Use `assets/game-assets/editor/bottom-ui/template-label-title`.
- Include a localization component for multi-language support.
- ![Localization Component](../img/05-main-scene/component-locale.png)
- **FormatText Properties**:
| Property | Description | Example |
|----------|-------------|---------|
| `default` | Initial formatting state | `false` |
| `notify` | Formatting update callback | Updates when value changes |
3. **Set Up UI in Main Scene**:
- Create a new node and configure in the main scene.
- ![Main Scene Setup](../img/05-main-scene/set-positon-bottom-bar.png)
4. **Apply Textures**:
- Ensure assets for bottom UI and button UI text are complete.
- ![Texture Setup](../img/05-main-scene/prepare-ui-bottom-bar.png)
5. **Run Helper Tool**:
- Configure the bottom bar UI using the helper tool.

View File

@ -1,96 +0,0 @@
---
sidebar_position: 11
---
# Mobile UI Panel
## Overview
The Mobile UI provides a responsive interface for gameplay controls, adapting to both **Landscape** and **Portrait** orientations on mobile devices.
| Orientation | Preview |
|-------------|---------|
| Landscape | ![Mobile Landscape](../img/05-main-scene/menu-landscape.png) |
| Portrait | ![Mobile Portrait](../img/05-main-scene/menu-portrait.png) |
## Implementation
### Step 1: Set Up Prefabs
Configure the necessary prefabs for the Mobile UI.
| Step | Action | Description | Image Reference |
|------|--------|-------------|-----------------|
| 1 | Locate `mobile-ui` Prefab | Search for the `mobile-ui` prefab in the project assets. | ![Locate Prefabs](../img/05-main-scene/search-mobile-ui.png) |
| 2 | Clone Assets | Copy the required assets to the game assets directory. | ![Asset Placement](../img/05-main-scene/mobile-ui-prefab.png) |
| 3 | Paste Assets | Paste into: `assets/game-assets/prefabs/mobile`. | - |
| 4 | Locate `buy-feature` Prefab | Search for the `buy-feature` prefab. | ![Locate Prefabs](../img/05-main-scene/buy-feature-bonus-mobile.png) |
| 5 | Paste Prefab | Paste into: `assets/game-assets/prefabs/mobile`. | - |
**Tip**: Maintain the following directory structure for proper prefab references:
```
assets/
└── game-assets/
└── prefabs/
└── mobile/
├── mobile-ui.prefab
└── buy-feature.prefab
```
### Step 2: Rename Prefabs
Rename the copied prefabs by removing unnecessary prefixes to ensure consistency.
| Prefix to Remove | Example |
|------------------|---------|
| `template-` | ![Prefab Naming Example](../img/05-main-scene/result-rename-mobile.png) |
### Step 3: Configure UI in Main Scene
Add and configure a new node in the main scene to integrate the Mobile UI.
![Main Scene Setup](../img/05-main-scene/set-positon-mobile-ui.png)
**Platform Node Spawner Settings**:
### Step 4: Apply Textures
Ensure all Mobile UI assets are prepared and applied correctly.
![Texture Setup](../img/05-main-scene/add-texture-mobile-ui.png)
**Run the Helper Tool**:
- Use the Mobile UI helper tool to configure the UI components.
### Step 5: Set Color Theme for Mobile UI
Customize the color theme for the Mobile UI using the `helper-paint-color-ui-mobile.js` component to apply theme-based colors across UI elements.
**Follow Design**:
| Landscape | Portrait |
|-----------|----------|
| ![Landscape Menu](../img/05-main-scene/menu-landscape.png) | ![Portrait Menu](../img/05-main-scene/menu-portrait.png) |
**Configuration Steps**:
1. **Access the Helper Component**:
- Locate the `helper-paint-color-ui-mobile.js` component in the node inspector.
- ![Color Setup](../img/05-main-scene/set-color-menu-ui.png)
2. **Configure Color Properties**:
- Adjust the following properties to match the game design:
| # | Property | Description | Example |
|---|----------|-------------|---------|
| 0 | **Paint Color** | Triggers repainting of UI components. | ![Paint Color Trigger](../img/05-main-scene/image-for-mobile-ui-helper/paint-color-trigger.png) |
| 1 | **Main UI Normal Color** | Default color for UI elements (e.g., Buy, Close, Auto). | ![Main UI Examples](../img/05-main-scene/image-for-mobile-ui-helper/buy.png) |
| 2 | **Main UI Highlight Color** | Color for highlighted or selected UI elements. | ![Highlight Color](../img/05-main-scene/main-ui-highlight-color.png) |
| 3 | **Toggle State Off Color** | Color for toggles in the off state. | ![Toggle Off](../img/05-main-scene/toggle-off.png) |
| 4 | **Toggle State On Color** | Color for toggles in the on state. | ![Toggle On](../img/05-main-scene/toggle-on.png) |
| 5 | **Background Info Page Color** | Background color for info pages. | ![Info Page Background](../img/05-main-scene/image-for-mobile-ui-helper/background-info.png) |
| 6 | **Background Menu Color** | Background color for menus. | ![Menu Background](../img/05-main-scene/image-for-mobile-ui-helper/background-menu.png) |
| 7 | **Background Point Panel Color** | Background color for point/balance panels. | ![Point Panel Background](../img/05-main-scene/image-for-mobile-ui-helper/background-win-point.png) |
| 8 | **Background Bottom Bar Color** | Background color for the bottom bar (Portrait only). | ![Bottom Bar Background](../img/05-main-scene/image-for-mobile-ui-helper/background-bottom-bar.png) |
| 9 | **Button Quit Color** | Color for the Quit button. | ![Quit Button](../img/05-main-scene/btn-quit-game.png) |
| 10 | **Button Cancel Color** | Color for the Cancel button. | ![Cancel Button](../img/05-main-scene/btn-cancel-game.png) |
| 11 | **Label Balance Normal Color** | Color for the balance label in normal state. | ![Balance Normal](../img/05-main-scene/image-for-mobile-ui-helper/win-point-color.png) |
| 12 | **Label Balance Spin Color** | Color for the balance label during spins. | ![Balance Spin](../img/05-main-scene/image-for-mobile-ui-helper/spin-point-color.png) |
| 13 | **Button Plus/Minus Auto Color** | Color for Plus/Minus buttons in autoplay. | ![Plus/Minus Buttons](../img/05-main-scene/image-for-mobile-ui-helper/btn-plus-minus-auto.png) |
| 14 | **Label Start Auto Color** | Color for the Start Autoplay label. | ![Start Auto Label](../img/05-main-scene/image-for-mobile-ui-helper/button%20start.png) |
| 15 | **Label Outline Notification** | Outline color and width for notifications. | ![Outline Notification](../img/05-main-scene/image-for-mobile-ui-helper/outline-notifcation.png) |
| 16 | **Total Win Medium Win Color** | Color for medium win labels. | ![Medium Win Color](../img/05-main-scene/image-for-mobile-ui-helper/win-point-special-color.png) |
**Tip**: Ensure color values align with the games visual design specifications.

View File

@ -1,48 +0,0 @@
---
sidebar_position: 12
---
# Popup Panel
## Overview
The **Popup Panel** is a temporary UI element that overlays the main game content to display additional information or user options, such as exit prompts or disconnection notices.
| Exit Popup | Disconnect Popup | Free Rounds Popup |
|------------|------------------|--------------|
| ![Exit Popup](../img/05-main-scene/popup-exit-game.png) | ![Disconnect Popup](../img/05-main-scene/popup-disconnet.png) | ![Free Rounds Popup](../img/05-main-scene/freeround-counter/freerounds-international.png) |
## Multiple Popup Panel
The **Multiple Popup Panel** is pre-integrated into the main scene via the `template-main-game` prefab, allowing multiple popups to be managed efficiently.
![Popup in Game](../img/05-main-scene/popup-panel-in-game.png)
**Base Settings**:
- **Prefab**: `hyper-multiple-popup.prefab`
- **Path**: `assets/core-assets/hyper-core/packages/popup-panel/prefabs/hyper-multiple-popup.prefab`
- **Configuration**: Reference the prefab in the main scene to enable multiple popup layouts.
- ![Popup Configuration](../img/05-main-scene/popup-multi.png)
## Manual Popup Panel
Manually configured popups allow for custom textures and layouts, tailored to the games design. Note that the **Exit Game** popup is exclusive to the Desktop platform.
**Setup Steps**:
1. **Prepare Assets**:
- **Path**: `assets/game-assets/textures/desktop/preloads/main-game/exit`
- **Example**: ![Exit Game Popup Assets](../img/05-main-scene/exit-popup-game.png)
2. **Configure Prefabs**:
- Locate and clone the popup prefab to `assets/game-assets/prefabs`.
- Structure the prefab as shown:
- ![Prefab Structure](../img/05-main-scene/popup-exit-in-game.png)
3. **Apply Textures**:
- Manually drag and drop images onto the corresponding nodes in the editor.
- ![Texture Application](../img/05-main-scene/popup-draw.png)
4. **Preview Result**:
- Verify the popup displays correctly in the game.
- ![Popup Preview](../img/05-main-scene/popup-exit-game.png)
**Tip**:
- Ensure textures align with the games color theme and design specifications.
- Test the popup on Desktop to confirm functionality for the Exit Game feature.

View File

@ -1,117 +0,0 @@
---
sidebar_position: 13
---
# Game Logo
## Overview
The **Game Logo** is a key branding element displayed consistently across all platforms and orientations to reinforce the games identity.
| Platform | Orientation | Preview |
|----------|-------------|---------|
| Desktop | Standard | ![Desktop View](../img/05-main-scene/logo-overview-desktop.png) |
| Mobile | Landscape | ![Landscape View](../img/05-main-scene/logo-overview.png) |
| Mobile | Portrait | ![Portrait View](../img/05-main-scene/logo-overview-portrait.png) |
## Implementation
### Prepare Assets
#### 1. Core Setup
- **Location**: `assets/core-assets/hyper-core/packages/hyper-logo-animation`
- **Script**: Initialize animation states for the logo.
```typescript
// File: assets/core-assets/hyper-core/packages/logo-animation/hyper-logo-animation.js
onLoad: function () {
const self = this;
// Initialize animation states
self.animPlay = AnimationProvider.Instance.GetAnimation('anim-logo-play');
self.animIdle = AnimationProvider.Instance.GetAnimation('anim-logo-idle');
}
```
#### 2. Required Assets
**Static Assets**:
| Platform | Location | Preview |
|----------|----------|---------|
| Desktop | `assets/game-assets/textures/desktop/preloads/main-game/custom-scale` | ![Desktop Static](../img/05-main-scene/logo-static-desktop.png) |
| Mobile | `assets/game-assets/textures/mobile/preloads/main-game/custom-scale` | ![Mobile Static](../img/05-main-scene/logo-static-mobile.png) |
**Animation Assets**:
| Platform | Location | Preview |
|----------|----------|---------|
| Desktop | `assets/game-assets/textures/desktop/postloads/main-game/animations` | ![Desktop Animation](../img/05-main-scene/logo-anim-desktop.png) |
| Mobile | `assets/game-assets/textures/mobile/postloads/main-game/animations` | ![Mobile Animation](../img/05-main-scene/logo-anim-mobile.png) |
#### 3. Animation Settings
1. **Configure Animation Provider**:
- Register the logo animations in the Animation Provider.
- ![Provider Setup](../img/05-main-scene/logo-anim-provider.png)
2. **Set Up Animation States**:
- Enable a static frame for the loading state in `anim-logo-play` and `anim-logo-idle`.
- ![Static Frame Setup](../img/05-main-scene/logo-static-in-anim.png)
- Configure continuous loop playback for animations.
- ![Loop Setup](../img/05-main-scene/logo-anim-loop.png)
### Setup
#### Desktop Configuration
1. **Base Settings**:
- Configure the logo node in the main scene.
- ![Desktop Settings](../img/05-main-scene/logo-setting-desktop.png)
2. **Node Setup**:
- Add the `hyper-logo-animation` component to the logo node.
- ```typescript
Components: {
animation: 'hyper-logo-animation',
}
```
- ![Desktop Setup](../img/05-main-scene/logo-script-desktop.png)
**Tip**: Adjust position and size according to the game design specifications.
#### Mobile Configuration
##### Landscape Mode
1. **Node Setup**:
- Configure the logo node with the following components:
| Component | Description |
|-----------|-------------|
| `hyper-logo-animation` | Plays and manages the logo animation. |
| `node-position-by-jackpot` | Adjusts logo position based on jackpot display state. |
| `landscape-logo-spine-aspect-ratio-keeper` | Maintains consistent logo size (e.g., 1.0). |
- ![Landscape Setup](../img/05-main-scene/logo-mobile-landcape.png)
##### Portrait Mode
1. **Node Setup**:
- Configure the logo node with the following components:
| Component | Description |
|-----------|-------------|
| `hyper-logo-animation` | Plays and manages the logo animation. |
| `node-position-by-jackpot` | Adjusts logo position based on jackpot display state. |
| `spine-aspect-ratio-keeper` | Maintains consistent logo size (e.g., 1.0). |
- ![Portrait Setup](../img/05-main-scene/logo-mobile-portrait.png)
2. **Position Settings**:
- Adjust logo position based on jackpot state:
| State | Position | Example |
|-------|----------|---------|
| Jackpot Active | Upper position | ![Jackpot Active](../img/05-main-scene/logo-portrait-jackpot.png) |
| Jackpot Inactive | Default position | ![Jackpot Inactive](../img/05-main-scene/logo-portrait-no-jackpot.png) |
3. **Size Settings**:
- Use the `spine-aspect-ratio-keeper` component to maintain logo proportions.
- ![Size Configuration](../img/05-main-scene/logo-center-align.png)
- **Settings**:
| Setting | Description | Default Value |
|---------|-------------|---------------|
| **Default Scale** | Initial scale factor for the node. | Configurable (e.g., 1.0) |
| **Default Size** | Base width and height for scaling. | Configurable (e.g., 1050 x 1680) |
**Tip**:
- Test the static logo display under slow network conditions to ensure fallback works.
- Verify animation states (`play` and `idle`) for smooth transitions.
- [See More Info](/docs/category/game-asset-structure)

View File

@ -1,61 +0,0 @@
---
sidebar_position: 15
---
# Jackpot Panel
## Overview
The **Jackpot Feature** offers multiple prize tiers, each with increasing value, providing players with frequent smaller wins and the chance for a large top prize. The panel is responsive, supporting both desktop and mobile layouts.
**Jackpot Tiers**:
| Tier | Description | Preview |
|------|-------------|---------|
| Grand | The top prize, rare and often worth thousands or millions (progressive). | ![Grand Jackpot](../img/05-main-scene/jackpot-panel/jackpot-grand.png) |
| Major | A significant prize, less frequent but substantial. | ![Major Jackpot](../img/05-main-scene/jackpot-panel/jackpot-major.png) |
| Minor | A moderately valuable prize, relatively common. | ![Minor Jackpot](../img/05-main-scene/jackpot-panel/jackpot-minor.png) |
| Mini | The smallest prize, easiest to win. | ![Mini Jackpot](../img/05-main-scene/jackpot-panel/jackpot-mini.png) |
**Platform Support**:
| Orientation | Preview |
|-------------|---------|
| Desktop | ![Desktop Jackpot](../img/05-main-scene/jackpot-panel/jackpot-desktop.png) |
| Mobile | ![Mobile Jackpot](../img/05-main-scene/jackpot-panel/jackpot-mobile.png) |
## Implementation
### Prepare Assets
- **Prefab Location**:
- Path: `assets/core-assets/jackpot-package/prefabs`
- Example: ![Core Prefabs](../img/05-main-scene/jackpot-panel/jackpot-core-prefabs.png)
### Setup
#### Jackpot Runner
##### Desktop
1. **Add Node**:
- Integrate the jackpot node into the main scene.
- ![Desktop Setup](../img/05-main-scene/jackpot-panel/jackpot-in-desktop.png)
##### Mobile
1. **Configure Node**:
- Set up the jackpot node for both landscape and portrait orientations.
- Use `UI Mobile Landscape Position` and `UI Mobile Portrait Position` components for responsiveness.
- ![Mobile Setup](../img/05-main-scene/jackpot-panel/jackpot-in-mobile.png)
2. **Platform Node Spawner**:
- Example: ![Mobile Spawner](../img/05-main-scene/jackpot-panel/jackpot-in-mobile-spawner.png)
#### Result Panel
- Ensure the jackpot panel displays correctly across all platforms and orientations.
- ![Result Panel](../img/05-main-scene/jackpot-panel/jackpot-positon-result.png)
**Tip**: Follow the game design layout for positioning and sizing.
## Game Result Examples
| Win Tier | Example |
|----------|---------|
| Grand | ![Grand Win](../img/05-main-scene/jackpot-panel/jackpot-grand-win.jpg) |
| Major | ![Major Win](../img/05-main-scene/jackpot-panel/jackpot-major-win.jpg) |
| Minor | ![Minor Win](../img/05-main-scene/jackpot-panel/jackpot-minor-win.jpg) |
| Mini | ![Mini Win](../img/05-main-scene/jackpot-panel/jackpot-mini-win.jpg) |

View File

@ -1,64 +0,0 @@
---
sidebar_position: 16
---
# Idle Animation
## Overview
The **Idle Animation** enhances the visual appeal of the game by animating slot symbols during idle states, providing a dynamic and engaging experience.
| Static Preview | Animated Preview |
|--------|-------------|
| ![Idle Static](./img/16-idle-animation/overview.png) | ![Idle Animation](./img/16-idle-animation//overview.gif) |
## Prepare the assets
| Assets | Description |
|--------|-------------|
| ![Static Asset](./img/16-idle-animation/prepare-assets-1.png) | Static sprite frame for the idle state. |
| ![Animation Asset](./img/16-idle-animation/prepare-assets-2.png) | Animation assets for the idle animation. |
## Setup Idle Animation
### Configure Settings
Create a script to register the idle animation components with the dependency injection container.
```jsx title="assets/game-assets/scripts/slotty-settings/extend-slotty-setting.js"
var BaseSlottySetting = p4fslot.require('slotty-setting');
var DIContainer = p4fcore.require('di-container');
BaseSlottySetting.prototype._registerInjection = function () {
DIContainer.Register('cellItemRender', require('idle-cell-item-render'));
DIContainer.Register('idleAnimationHandler', require('idle-animation-handler'));
};
```
### Setup Animations
1. Using hepler to generate animation using the prepared assets
![Background Setup Helper Anim](./img/16-idle-animation/setup-anim-helper-1.png)
![Background Setup Helper Anim](./img/16-idle-animation/setup-anim-helper-2.png)
2. Configure Spine Animation
- Set **Is Loop** ✅.
- Setup the **Static Sprite Frame** using the prepared assets.
![Background Setup Animation](./img/16-idle-animation/setup-anim-1.png)
### Configure Scene
1. **Locate Prefab**:
- Search for the `idle-animation-panel` prefab.
2. **Add to Scene**:
- Drag the prefab into the main scene.
3. **Generate Panel**:
- Click **Generate Panel** to set up the animation panel.
-![Locate Prefabs](./img/16-idle-animation/configure-scene-1.png)
:::warning
When using prefabs directly from `core-assets`, convert them to a **Regular Node** to avoid reference issues.
![Locate Prefabs](./img/16-idle-animation/configure-scene-warning.png)
:::
**Tip**: Test the idle animation in the game to ensure smooth playback and proper looping.

View File

@ -1,56 +0,0 @@
---
sidebar_position: 17
title: Win Limit
description: Display win limit popups during gameplay.
---
# Win Limit
## Overview
The **Win Limit** system displays popups when specific win conditions are met, enhancing player feedback and interaction.
- **Win Limit Popup**: Appears when a players win points reach a predefined threshold.
![Win Limit Popup](../img/05-main-scene/win-limit/overview.png)
- **Gamble Win Limit Popup**: Triggered during the gamble feature when the maximum number of gamble attempts (typically 5) is reached.
![Gamble Win Limit Popup](../img/05-main-scene/win-limit/overview-gamble.png)
## Prepare Assets
#### Prefab Location
| Path | Prefab Name |
|------|-------------|
| `assets/core-assets/hyper-core/packages/present/prefabs` | `present-win-limit-reached` |
#### Scene Hierarchy
Place the prefab in the following scene structure:
```
Canvas
└── [main-view]
└── [game-view]
└── [present-win-limit-reached]
```
- ![Scene Structure](../img/05-main-scene/win-limit/win-limit-component.png)
## Setup
#### Assets
- Drag and drop the required images onto the corresponding nodes in the editor.
- ![Asset Setup](../img/05-main-scene/win-limit/assets-win-limit.png)
| Sprite | Node Name |
|--------|-----------|
| `you-won` | `you-won` |
| `win-limit-reached` | `win-limit-reached` |
| `gamble-limit-reached` | `gamble-limit-reached` |
| `btn-normal` | `btn-continue` |
| `text-continue` | `continue` |
#### Font
- Use a custom font to match the win label style, aligning with the games theme.
- ![Font Setup](../img/05-main-scene/win-limit/add-font.png)
**Tip**:
- Follow the game design layout for asset placement and font styling.
- Verify win limit configurations to ensure they match game-specific thresholds.

View File

@ -1,60 +0,0 @@
---
sidebar_position: 18
---
# Buy Feature
---
## Overview
The **Buy Feature** allows players to purchase direct access to bonus rounds, enhancing gameplay engagement.
![Buy Feature Overview](./img/18-buy-feature/overview.png)
## Implementation
### Prepare Assets
| Assets | Description |
| :----: |-------------|
| <img width="300"/>![Prepare Assets Static](./img/18-buy-feature/prepare-assets-1.png)| Static sprite frame for the buy feature panel. |
| <img width="300"/>![Prepare Assets Animation](./img/18-buy-feature/prepare-assets-2.png) | Animation assets for the buy feature button and panel. |
| <img width="300"/>![Prepare Assets Animation](./img/18-buy-feature/prepare-assets-3.png) | Label for displaying the cost of the buy feature. |
| <img width="300"/>![Prepare Assets Prefabs](./img/18-buy-feature/prepare-prefabs.png) | - Search for the `template-shortcut-buy-feature-board` prefab.<br/> - Copy and paste them to the game assets location, then rename the copied prefabs by removing unnecessary prefixes.|
### Setup Animations
1. **Generate Animations**:
- Use the helper tool to create animations from prepared assets.
![Background Setup Helper Anim](./img/18-buy-feature/setup-anim-helper-1.png)
![Background Setup Helper Anim](./img/18-buy-feature/setup-anim-helper-2.png)
2. **Configure Spine Animation**:
- Set **Is Loop** ✅ for `anim-button-open-buy-bonus-enable` and `anim-board-shortcut-buy-bonus-idle`.
![Background Setup Animation](./img/18-buy-feature/setup-anim-1.png)
### Setup Buy Feature Board Desktop
| Step | Action | Image Reference |
| :--: | :----- | :-------------: |
| 1 | - Setup the Title **Sprite Frame** using the prepared assets. | <img width="1000"/>![Setup Desktop Board](./img/18-buy-feature/setup-desktop-board-1.png) |
| 2 | - Setup the **Sprite Frame** in the `static-board` using the prepared assets. | <img width="1000"/>![Setup Desktop Board](./img/18-buy-feature/setup-desktop-board-2.png) |
| 3 | - Adjust **Font** in `lbl-cost-buy-feature` according to the game design.<br/> - Use [Bitmap Font Creator](http://localhost:3000/docs/category/game-asset-structure) if you need to create a Bitmap Font.| ![Locate Prefabs](./img/18-buy-feature/setup-desktop-board-3.png) |
| 4 | - Setup the 4 Buttons **Sprite Frame** using the prepared assets. | <img width="1000"/>![Setup Desktop Board](./img/18-buy-feature/setup-desktop-board-4.png) |
### Setup Buy Feature Button Desktop
| Step | Action | Image Reference |
| :--: | :----- | :-------------: |
| 1 | - Setup the Text **Sprite Frame** using the prepared assets. | <img width="1000"/>![Setup Desktop Button](./img/18-buy-feature/setup-desktop-button-1.png) |
| 2 | 1. Drag the **skeketon** `anim-button-open-buy-bonus` into child of "content".<br/><br/>2. Click **Generate Attached Node**.<br/><br/>3. Move `node-container` to the `ATTACHED_NODE:number`.<br/><br/>4. Deleted **old** `anim-button-open-buy-bonus`. | <img width="1000"/>![Setup Desktop Button](./img/18-buy-feature/setup-desktop-button-2.png) |
| 3 | - Move **new** `anim-button-open-buy-bonus` into **Node Animation**.| ![Locate Prefabs](./img/18-buy-feature/setup-desktop-button-3.png) |
| 4 | - Adjust **Font** in `lbl-cost-buy-feature` according to the game design.<br/> - Use [Bitmap Font Creator](http://localhost:3000/docs/category/game-asset-structure) if you need to create a Bitmap Font.| ![Locate Prefabs](./img/18-buy-feature/setup-desktop-button-4.png) |
### Configure Scene
1. **Add Prefabs**:
- Drag the `shortcut-buy-feature-panel`, `shortcut-buy-feature-board` into the **Scene** at this position.
2. **Update Prefab**:
- Update **Prefab** in the `shortcut-buy-feature-button`.
![Locate Prefabs](./img/18-buy-feature/setup-scene.png)

View File

@ -1,90 +0,0 @@
---
sidebar_position: 19
title: Gamble
description: Display Gamble
---
# Gamble
## Overview
The **Gamble Feature** allows players to risk their winnings for a chance to double or multiply them, typically by guessing a cards color. It is supported across desktop and mobile platforms in both landscape and portrait orientations.
| Device Type | Preview |
|---------------|-----------------------------------------------------------------------------|
| Desktop | ![Desktop](../img/05-main-scene/gamble/gamble-desktop.png) |
| Landscape | ![Landscape](../img/05-main-scene/gamble/gamble-landscape.png) |
| Portrait | <center>![Portrait](../img/05-main-scene/gamble/gamble-portrait.png)</center>|
## Implementation
### Prepare Assets
#### Scene Hierarchy
Place the gamble node in the following scene structure:
<table>
<thead>
<tr>
<th style={{ width: "500px" }}>Path</th>
<th style={{ width: "500px" }}>Example</th>
</tr>
</thead>
<tbody>
<tr>
<td>
```
Canvas
└── [main-view]
└── [game-view]
└── [gamble-loader]
```
</td>
<td><center>![Scene Structure](../img/05-main-scene/gamble/gamble-structure.png)</center></td>
</tr>
</tbody>
</table>
---
### Setup
- In node component include:
![Scene Structure](../img/05-main-scene/gamble/gamble-component.png)
#### Components
**`gamble-loader`**
- A component for managing the loading and unloading of gambling scenes in a game.
| Property | Type | Description |
|------------------|-----------|---------------------------------------------------------|
| nodeBackground | cc.Node | Background node reference |
| sceneGamble | String | Name of the gamble scene |
| rootGambleName | String | Root node name for the gamble scene |
**`gamble-panel-mobile-scaler`**
#### Backgrounds
![Backgrounds](../img/05-main-scene/gamble/add-background-gamble.png)
1. Use background scenes for the gamble feature:
- `gamble-background-landscape` : [Setup Background Landscape](/docs/setup-main-game/main-scene/background#setup-steps)
- `gamble-background-portrait` : [Setup Background Portrait](/docs/setup-main-game/main-scene/background#setup-steps)
2. Attach the `orientation-ui-controller` component to both `gamble-background-landscape` and `gamble-background-portrait` nodes.
3. The `gamble-background-portrait` node has a dedicated component for portrait mode:
![gamble-background-portrait](../img/05-main-scene/gamble/gamble-portrait-component.png)
This component handles properties and logic specific to the portrait layout.
## Game Result Example
Make sure the main scene includes the Win Limit Panel.
🔗 More Info [Game Result](/docs/setup-main-game/main-scene/win-limit#overview)

View File

@ -1,10 +0,0 @@
{
"position": 11,
"label": "Main Scene",
"collapsible": true,
"collapsed": false,
"link": {
"type": "doc",
"id": "main-scene-overview"
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 53 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 60 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 220 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 195 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 190 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 208 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 138 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 102 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 100 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 57 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 64 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 99 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 100 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 452 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 219 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 78 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 78 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 239 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 329 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 223 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

Some files were not shown because too many files have changed in this diff Show More