Compare commits

...

54 Commits

Author SHA1 Message Date
a52051d602 Merge pull request 'add setup main scene' (#28) from feature/setup-main-scene into develop
Reviewed-on: #28
2025-05-09 12:38:26 +08:00
5e371c8ea1 add setup main scene 2025-05-09 11:30:22 +07:00
9f650ee83f Merge pull request 'register landing and tension' (#26) from feature/add-setup-ui-panel-main-game into develop
Reviewed-on: #26
2025-05-09 12:02:56 +08:00
6392b35984 Merge pull request 'feature/add-setup-popup-panel' (#27) from feature/add-setup-popup-panel into develop
Reviewed-on: #27
2025-05-09 12:02:47 +08:00
dungdq
e0be84a009 change format 2025-05-09 11:01:51 +07:00
dungdq
71d40aeead update feedback popup 2025-05-09 10:58:31 +07:00
dungdq
14bdacb4fe register landing and tension 2025-05-09 10:19:28 +07:00
33b2ee346e Merge pull request 'feature/add-setup-ui-panel-main-game' (#25) from feature/add-setup-ui-panel-main-game into develop
Reviewed-on: #25
2025-05-08 19:01:58 +08:00
dungdq
cd15562317 Merge branch 'develop' into feature/add-setup-ui-panel-main-game 2025-05-08 17:54:32 +07:00
492a047297 Merge pull request 'feature/add-setup-popup-panel' (#21) from feature/add-setup-popup-panel into develop
Reviewed-on: #21
2025-05-08 18:49:39 +08:00
dungdq
235c51509f change content 2025-05-08 17:48:58 +07:00
dungdq
7e836a98b9 Merge branch 'develop' into feature/add-setup-popup-panel
# Conflicts:
#	docs/02-setup-main-game/img/05-main-scene/add-reel-frame.png
2025-05-08 17:42:17 +07:00
32bb367dbe Merge pull request 'fix miss spelling' (#24) from bugfix/fix_miss_spelling into develop
Reviewed-on: #24
2025-05-08 18:00:48 +08:00
f714bc5696 Merge pull request 'setup Sprite Frame Provider, Animation Provider' (#23) from feature/add-setup-animation-provider into develop
Reviewed-on: #23
2025-05-08 17:36:07 +08:00
b0e9033aa8 add Setup Sprite Provider, Animation Provider 2025-05-08 16:35:11 +07:00
c6cfcc7bb1 Merge pull request 'update setup background main game' (#22) from feature/add-set-up-background-main-game into develop
Reviewed-on: #22
2025-05-08 17:23:38 +08:00
7e7aa120f8 update setup background main game 2025-05-08 16:02:00 +07:00
dungdq
0c7ba2d7e4 update structure doc 2025-05-08 15:22:30 +07:00
dungdq
1e9369f082 change content overview popup panel 2025-05-08 11:36:53 +07:00
dungdq
a2d661a051 update popup panel 2025-05-08 11:25:46 +07:00
dungdq
e4d9a10c2e popup panel 2025-05-08 10:45:08 +07:00
dungdq
285f0e75e3 add popup panel 2025-05-07 20:17:46 +07:00
Tu Bui
d9f17ac6c7 fix miss spelling 2025-05-07 17:59:43 +07:00
Tu Bui
8bce3773c3 fix miss spelling 2025-05-07 17:47:00 +07:00
761f3cc0f6 Merge pull request 'fix wrong image' (#19) from feature/add-setup-ui-panel-main-game into develop
Reviewed-on: #19
2025-05-07 18:38:55 +08:00
dungdq
be7cd44d12 fix wrong image 2025-05-07 17:37:17 +07:00
4f42b1028a Merge pull request 'fix miss spelling' (#16) from bugfix/fix_miss_spelling into develop
Reviewed-on: #16
2025-05-07 18:26:31 +08:00
826c34d9d6 Merge pull request 'feature/add-setup-ui-panel-main-game' (#18) from feature/add-setup-ui-panel-main-game into develop
Reviewed-on: #18
2025-05-07 18:14:12 +08:00
dungdq
af3082568d Merge remote-tracking branch 'origin/feature/add-set-up-background-main-game' into feature/add-setup-ui-panel-main-game 2025-05-07 16:30:26 +07:00
dungdq
e722339218 update feedback 2025-05-07 16:30:19 +07:00
Tu Bui
3de5482ac2 fix miss spelling 2025-05-07 16:29:33 +07:00
7eb92cdb67 Merge remote-tracking branch 'origin/feature/add-setup-ui-panel-main-game' into feature/add-set-up-background-main-game 2025-05-07 16:11:27 +07:00
50fcdfbd84 setup Sprite Frame Provider, Animation Provider 2025-05-07 16:11:09 +07:00
dungdq
a56efcaf23 Merge remote-tracking branch 'origin/bugfix/fix_miss_spelling' into feature/add-setup-ui-panel-main-game 2025-05-07 15:25:39 +07:00
dungdq
b9765bc5fa Merge remote-tracking branch 'origin/feature/add-set-up-background-main-game' into feature/add-setup-ui-panel-main-game 2025-05-07 15:25:22 +07:00
dungdq
2dce43771b update docs 2025-05-07 15:24:41 +07:00
7ff17f3b35 Merge remote-tracking branch 'origin/feature/add-setup-ui-panel-main-game' into feature/add-set-up-background-main-game 2025-05-07 15:17:07 +07:00
dungdq
27afbac3e6 update all docs bottom bar 2025-05-07 11:34:52 +07:00
dungdq
731bba650e update ver desktop 2025-05-07 10:09:45 +07:00
b994bfb7de update setup background main game 2025-05-07 10:07:40 +07:00
dungdq
02f5e20a95 add docs fo mobile ui 2025-05-06 20:21:07 +07:00
dungdq
cf0d177743 add UI panel desktop 2025-05-05 19:50:19 +07:00
830f82c479 add set up background main game 2025-05-05 15:01:53 +07:00
Tu Bui
ecef7b24ce fix miss spelling 2025-05-05 13:53:24 +07:00
f0e549c3e7 Merge pull request 'add-full-empty-structure' (#5) from add-setup-manual into develop
Reviewed-on: #5
2025-04-29 15:17:30 +08:00
luyen.vo
364a928080 add-full-empty-structure 2025-04-29 14:17:07 +07:00
7a2002c98f Merge pull request 'add-cocos-collabs-feature' (#4) from add-setup-manual into develop
Reviewed-on: #4
2025-04-25 14:47:13 +08:00
luyen.vo
072a8e8a16 add-cocos-collabs-feature 2025-04-25 13:47:06 +07:00
d0769f7a57 Merge pull request 'add engine option argument' (#3) from add-setup-manual into develop
Reviewed-on: #3
2025-04-23 21:36:54 +08:00
luyen.vo
1cc1061664 add engine option argument 2025-04-23 20:36:08 +07:00
luyen.vo
9e36bd7e68 add set up main game 2025-04-23 16:20:38 +07:00
fc381732b8 Merge pull request 'add set up main game' (#2) from add-setup-manual into develop
Reviewed-on: #2
2025-04-23 17:20:15 +08:00
bbc12cae96 Merge pull request 'Add setup project and main game' (#1) from add-setup-manual into develop
Reviewed-on: #1
2025-04-23 17:18:19 +08:00
luyen.vo
5d10c7a3ac Add setup project and main game 2025-04-18 11:59:02 +07:00
337 changed files with 20499 additions and 0 deletions

25
README.md Normal file
View File

@ -0,0 +1,25 @@
# 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

@ -0,0 +1,69 @@
---
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

@ -0,0 +1,92 @@
---
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
```
## Internation 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

@ -0,0 +1,35 @@
---
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**](../custom-cocos-engine/custom-cocos-engine.md)
**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

@ -0,0 +1,52 @@
---
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

@ -0,0 +1,17 @@
{
"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.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 85 KiB

View File

@ -0,0 +1,178 @@
---
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

@ -0,0 +1,29 @@
---
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

@ -0,0 +1,68 @@
---
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

@ -0,0 +1,59 @@
---
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

@ -0,0 +1,475 @@
---
sidebar_position: 5
---
# Main Scene
This is where all the magic happen.
---
Main scene is the most complicated scene with hundreds of object, script and config.
![Main Scene Wireframe](./img/05-main-scene/main-scene-wireframe.png)
Yet it is suprisingly simple to use.
By following step by step setup, you'll have a working main scene in no time.
:::info
In fact, if all of the other scenes are setup properly, you can even run test the game without any setup on main scene.
Try to run the project, you'll the result as below. It doesn't look like much but it is actually a game running without visual assets.
![Run Test](./img/05-main-scene/run-test.png)
:::
## Setup SpriteFrame Provider
---
**SpriteFrameProvider** allows global access to "sprite frames" from code.
![Sprite Frame Provider](./img/05-main-scene/sprite-frame-provider.png)
## Setup Animation Provider
---
**Animation Provider** contains all **animations** of the game.
![Aniamtion Provider](./img/05-main-scene/animation-provider.png)
## Setup Reel Slot
---
1. Prepare the asset for symbols and reel frame.
![Add Symbol Texture](./img/05-main-scene/add-symbol-texture.png)
![Add Symbol Texture](./img/05-main-scene/add-reel-frame.png)
2. Add symbols to **SpriteFrameProvider** which allows those symbols to be accessed globally from the code.
![Sprite Frame Provider](./img/05-main-scene/sprite-frame-provider.png)
3. Add reel frame.
![Sprite Frame Provider](./img/05-main-scene/add-reel-frame-2.png) ![Sprite Frame Provider](./img/05-main-scene/reel-frame.png)
4. Config reel slot using `reel-scroller-helper`.
![Reel Scroller Helper](./img/05-main-scene/reel-scroller-helper.png)
| Properties | Explaination | Example |
|------------|--------------|---------|
|**Cell Item Script Name**|The name of the script will be attached to each cell item.|![cell-item-script-name](./img/05-main-scene/hyper-cell-item.png)|
| **Scroller Script Name** | the name of the script for handling the spinning logic.|![scroller](./img/05-main-scene/scroller.png)|
|**Row Count x Reel Count**| the number of Slot Item each row and column in the reel slot panel.|![reel-row-column](./img/05-main-scene/reel-row-column.png)|
|**Cell Size**| the size of each cells.|![cell-size](./img/05-main-scene/cell-size.png)|
|**Cell Spacing**| the distance between each cells horizontally and vertically.||
|**Cell Dim Color**| set the dark color for the non-win cells when showing winning animation for each line.|![dim-cell-color](./img/05-main-scene/dim-cell-color.png)|
|**Top Count and Bot Count**| for spinning logic to work, a certain number of cell will be added to the top and bottom of the reel.|![cell-top-bottom](./img/05-main-scene/cell-top-bottom.png)|
5. Generate panel using `reel-scroller-helper`.
![Generate Panel](./img/05-main-scene/generate-panel.png)
:::tip
There is a popup panel covering the entire game scene. You should turn off this panel to see the other component clearly.
:::
## Setup Spinning Panel
Reel slot panel is just one part one the spinning panel.
There are other panels that need to be setup: **landing-panel**, **tension-panel**, **present-win-cell-panel** and **present-win-border-panel**.
The setup is very straightforward by using the `Generate Panel` command in each panel's helper class.
- Landing Panel:
![Landing Panel](./img/05-main-scene/landing-panel.png)
To define Landing Panel, create the following script:
:::warning
```jsx title="assets/game-assets/scripts/slotty-settings/extend-slotty-setting.js"
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 Cell 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)
If the tension use a custom size frame, we can change the option **sizeMode** to **Custom** and set the static frame and size.
![Tension Size Custom](./img/05-main-scene/tension-panel-custom.png)
**check toggle General Panel**
![Tension Size Custom](./img/05-main-scene/note-bug-tension.png)
To define Tension Panel, create the following script:
:::warning
```jsx title="assets/game-assets/scripts/slotty-settings/extend-slotty-setting.js"
SlottySetting.prototype._registerInjection = function () {
DIContainer.Register('tensionGenerator', require('tension-generator'));
};
```
:::
## Setup UI Panel
### UI Panel Overview
The UI system supports both desktop and mobile layouts design.
#### 🖥️ Desktop Layout
- Full bottom bar with all controls visible
- Horizontal layout maximizing screen width
![Desktop UI Layout](./img/05-main-scene/bottom-ui-desktop.png)
#### 📱 Mobile Layout
The mobile interface adapts to both landscape and portrait orientations:
| Orientation | Preview |
|-------------|----------|
| Landscape | ![Mobile Landscape](./img/05-main-scene/menu-landscape.png) |
| Portrait | ![Mobile Portrait](./img/05-main-scene/menu-portrait.png) |
### UI Sideband
> To Be Added:
> - Prepare the asset
> - Run helper / p4f menu or setup manually
### UI Bottom Bar Desktop
#### Step 1: Setup Prefab Editor
| Step | Action | image |
|------|---------|--------------|
| 1. Locate Prefab | Search for `ui-bottom-bar-panel` prefab | ![Locate Prefabs](./img/05-main-scene/add-texture-bottom-bar-prefab.png) |
| 2. Find Assets | Navigate to `core/editor` directory | ![Copy UI Folder](./img/05-main-scene/add-texture-label-prefab.png) |
| 3. Clone Assets | Copy / Paste to game assets location | ![Asset Placement](./img/05-main-scene/editor-texture-label-prefab.png) |
---
#### Step 2: Configure Prefabs
##### Core Prefabs Structure
Navigate to the location where the prefabs: `assets\core-assets\hyper-core\packages\ui\desktop-ui\prefabs\`
![Directory Structure](./img/05-main-scene/add-texture-bottom-bar-prefab2.png)
##### Rename Prefabs
Rename the copied prefabs by removing unnecessary prefixes:
| Prefix to Remove | Original Prefab Name | Final Name |
|------------------|----------------------|------------|
| `template-new-` | `template-new-ui-bottom-bar-panel` | `ui-bottom-bar-panel` |
| `template-` | `template-button-auto-selection` | `button-auto-selection` |
```jsx title="The folder structure is as follows:"
assets\game-assets\prefabs
```
![Prefab Naming Example](./img/05-main-scene/rename-prefab.png)
#### Customize *`button-auto-selection`* Label
**Follow Design:**
Use the `template-label-auto-selection` to customize the appearance of the label inside the `button-auto-selection` prefab.
| Component | Description |
| -------------------- | ------------------------------------------------- |
| **Label Outline** | Add an outline to make the text stand out. |
| **Label Shadow** | Add a shadow for better contrast and readability. |
| -------------------- | ------------------------------------------------- |
![Label Configuration 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` to customize the `ui-bottom-bar-panel`:
:::info
*[Follow the same configuration as Button Auto Selection Labels](#customize-button-auto-selection-label)*
**Bottom bar labels include a localization component for multi-language support**
:::
![component-locale](./img/05-main-scene/component-locale.png)
The `FormatText` property controls text formatting behavior for label components:
| Property | Description | Example |
|----------|-------------|---------|
| `default` | Initial formatting state | `false` |
| `notify` | Formatting update callback | Updates when value changes |
---
#### Step 3: Setup UI In Main Scenes
Create new node and configuration in your main scene:
![main scenes](./img/05-main-scene/prepare-ui-bottom-bar.png)
##### Platform Node Spawner Settings
| Setting | Value | Description |
|---------|-------|-------------|
| Desktop Toggle | ✓ Enabled | Show prefabs for desktop platform |
| Mobile Toggle | ☐ Disabled | Hide prefabs for mobile platform |
| Target Prefab | `ui-bottom-bar-panel` | References prefab |
#### Step 4: Apply Textures
##### Texture Button Bar
Checklist assets completed for bottom UI and button UI text
:::info
🔗 [](http://localhost:3000/docs/category/game-asset-structure)
:::
![main scenes](./img/05-main-scene/prepare-ui-bottom-bar.png)
##### Run the Helper Tool
To configure the bottom bar UI helper.
:::info
🔗 [Click here to follow run helper](http://localhost:3000/docs/submodule/hyper-editor-package#ui-bottom-bar-desktop-editor)
:::
---
### UI Panel Mobile
#### Step 1: Setup Prefab
| Step | Action | Description | Image Reference |
| ---- | --------------------------- | ----------------------------------------------- | ------------------------------------------------------------------- |
| 1 | Locate `mobile-ui` Prefab | Search for the `mobile-ui` prefab | ![Locate Prefabs](./img/05-main-scene/search-mobile-ui.png) |
| 2 | Clone Assets | Copy the required assets | ![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 File Structure
Maintain this directory structure for proper prefab references:
```
assets/
└── game-assets/
└── prefabs/
└── mobile/
├── Exp: mobile-ui.prefab
└── Exp: buy-feature.prefab
```
:::
#### Step 2: Rename Prefabs
Rename the copied prefabs by removing unnecessary prefixes:
| Prefix to Remove | Final Name |
|------------------|----------------------|
| `template-` |![Prefab Naming Example](./img/05-main-scene/result-rename-mobile.png) |
#### Step 3: Setup Ui In Main Scenes
Create new node and configuration in your main scene:
![main scenes](./img/05-main-scene/set-positon-mobile-ui.png)
##### Platform Node Spawner Settings
| Setting | Value | Description |
|---------|-------|-------------|
| Mobile Toggle | ✓ Enabled | Show prefabs for mobile platform |
| Desktop Toggle | ☐ Disabled | Hide prefabs for desktop platform |
| Target Prefab | `mobile-ui` | References prefab |
#### Step 4: Apply Textures
##### Texture Mobile UI
Checklist assets completed for Mobile UI
:::info
🔗 [Click here to follow the setup pack assets](http://localhost:3000/docs/category/game-asset-structure)
:::
![main scenes](./img/05-main-scene/add-texture-mobile-ui.png)
##### Run the Helper Tool
To configure the mobile UI helper.
:::info
🔗 [Click here to follow run helper](http://localhost:3000/docs/submodule/hyper-editor-package#mobile-ui-helper)
:::
#### Step 4: Setup Color For Menu Mobile UI
**Follow Design:**
| ![Auto Selection Result](./img/05-main-scene/menu-landscape.png)| ![Auto Selection Result](./img/05-main-scene/menu-portrait.png) |
|---------|-------|
##### Overview
The `helper-paint-color-ui-mobile.js` component is a customizable color painter for various UI elements in a MOBILE UI. It allows designers and developers to easily apply theme-based colors across the game interface.
![Auto Selection Result](./img/05-main-scene/set-color-menu-ui.png)
|Ordinal number| Properties | Explaination | Example |
|--------------|------------|--------------|---------|
|0 |**paintColor** |Trigger to repaint UI components | ![Auto Selection Result](./img/05-main-scene/image-for-mobile-ui-helper/paint-color-trigger.png)|
|1 | **Main Ui Normal Color** |Default color of UI elements | ![Auto Selection Result](./img/05-main-scene/image-for-mobile-ui-helper/buy.png)![Auto Selection Result](./img/05-main-scene/image-for-mobile-ui-helper/close.png)![Auto Selection Result](./img/05-main-scene/image-for-mobile-ui-helper/tru.png)![Auto Selection Result](./img/05-main-scene/image-for-mobile-ui-helper/cong.png)![Auto Selection Result](./img/05-main-scene/image-for-mobile-ui-helper/auto.png)![Auto Selection Result](./img/05-main-scene/image-for-mobile-ui-helper/balance.png)![Auto Selection Result](./img/05-main-scene/image-for-mobile-ui-helper/balance1.png)![Auto Selection Result](./img/05-main-scene/image-for-mobile-ui-helper/balance2.png)![Auto Selection Result](./img/05-main-scene/image-for-mobile-ui-helper/setting.png)![Auto Selection Result](./img/05-main-scene/image-for-mobile-ui-helper/paytable.png)![Auto Selection Result](./img/05-main-scene/image-for-mobile-ui-helper/rule.png)![Auto Selection Result](./img/05-main-scene/image-for-mobile-ui-helper/cheat.png)![Auto Selection Result](./img/05-main-scene/image-for-mobile-ui-helper/button-exit.png)![Auto Selection Result](./img/05-main-scene/image-for-mobile-ui-helper/icon-toggle.png)![Auto Selection Result](./img/05-main-scene/image-for-mobile-ui-helper/icon-toggle1.png)![Auto Selection Result](./img/05-main-scene/image-for-mobile-ui-helper/icon-toggle2.png)![Auto Selection Result](./img/05-main-scene/image-for-mobile-ui-helper/icon-toggle3.png) |
|2 | **Main Ui Highlight Color** | Highlight color for selected UI elements | ![Auto Selection Result](./img/05-main-scene/main-ui-highlight-color.png)![Auto Selection Result](./img/05-main-scene/image-for-mobile-ui-helper/button%20start.png) |
|3 | **Toggle State Off Color** | Color of toggle when off | ![Auto Selection Result](./img/05-main-scene/toggle-off.png) |
|4 | **Toggle State On Color** | Color of toggle when on | ![Auto Selection Result](./img/05-main-scene/toggle-on.png) |
|5 | **Background Info Page Color** | Info screen background | ![Auto Selection Result](./img/05-main-scene/image-for-mobile-ui-helper/background-info.png)|
|6 | **Background Menu Color** | Menu background color | ![Auto Selection Result](./img/05-main-scene/image-for-mobile-ui-helper/background-menu.png) |
|7 | **Background Point Panel Color** | Background panel for point/balance UI | ![Auto Selection Result](./img/05-main-scene/image-for-mobile-ui-helper/background-win-point.png) |
|8 | **Background Bottom Bar Color** | Background bottom bar (show only mobile portrait) | ![Auto Selection Result](./img/05-main-scene/image-for-mobile-ui-helper/background-bottom-bar.png) |
|9 | **Button Quit Color** | Quit button color | ![Auto Selection Result](./img/05-main-scene/btn-quit-game.png) |
|10 | **Button Cancel Color** | Cancel button color | ![Auto Selection Result](./img/05-main-scene/btn-cancel-game.png) |1
|11 | **Label Balance Normal Color** | Normal balance label color | ![Auto Selection Result](./img/05-main-scene/image-for-mobile-ui-helper/win-point-color.png) |
|12 | **Label Balance Spin Color** | During-spin label color | ![Auto Selection Result](./img/05-main-scene/image-for-mobile-ui-helper/spin-point-color.png) |
|13 | **Button Plus Minus Auto Color** | Button plus/Minus autoplay | ![Auto Selection Result](./img/05-main-scene/image-for-mobile-ui-helper/btn-plus-minus-auto.png) |
|14 | **Label Start Auto Color** | Start autoplay label | ![Auto Selection Result](./img/05-main-scene/image-for-mobile-ui-helper/button%20start.png) |
|15 | **Label Outline Notification** | Outline color + width config | ![Auto Selection Result](./img/05-main-scene/image-for-mobile-ui-helper/outline-notifcation.png) |
|16 | **Total Win Medium Win Color** | Color for label medium win | ![Auto Selection Result](./img/05-main-scene/image-for-mobile-ui-helper/win-point-special-color.png) |
---
## Setup Background
Background overview:
| | Desktop | Mobile |
|:-:|--------------|---------|
|**Background Landscape**<br/>![Background Overview Landscape](./img/05-main-scene/bg-overview-landscape-3.png)|<br/>![Background Overview Landscape](./img/05-main-scene/bg-overview-landscape-1.png)|<br/>![Background Overview Landscape](./img/05-main-scene/bg-overview-landscape-2.png)|
|**Background Portrait**<br/>![Background Overview Portrait](./img/05-main-scene/bg-overview-portrait-2.png)||<br/>![Background Overview Portrait](./img/05-main-scene/bg-overview-portrait-1.png)|
**Background landscape** use for Desktop and Mobile landscape.
**Background portrait** only use for Mobile portrait.
### Prepare the assets
| | Assets | Description |
|:-:|--------------|---------|
|**Static**<br/>|![Background Prepare Landscape](./img/05-main-scene/bg-prepare-assets-static.png)|Static background is necessary for the game|
|**Animation**<br/>|![Background Prepare Portrait](./img/05-main-scene/bg-prepare-assets-anim.png)|Animation background may or may not be present, depending on the game design|
### Background Landscape
We use sprite frame background for landscape from prepared assets.
![Background Setup Landscape](./img/05-main-scene/bg-setup-landscape.png)
### Background Portrait
We use sprite frame background for mobile from prepared assets.
![Background Setup Portrait](./img/05-main-scene/bg-setup-portrait.png)
### Background Animation
If the game have design animation for background, we will do this step.
1. Using hepler to generate animation from prepared assets
![Background Setup Helper Anim](./img/05-main-scene/bg-setup-hepler-anim.png)
![Background Setup Helper Anim](./img/05-main-scene/bg-setup-anim-provider.png)
2. We have the result as below, and continue setup for **spine-animation**.
- **Is Loop**: is ✅ because this animation will play through the game.
- **Static Sprite Frame**: It will be displayed when the animation has not finished loading.
![Background Setup Animation](./img/05-main-scene/bg-setup-anim-1.png)
![Background Setup Animation](./img/05-main-scene/bg-setup-anim-2.png)
3. Add animation background with component below:
**Animation background landscape**
- Create **Empty Node** with name **anim-background-main-game**.
- Add **animation-play-on-anable** with animation name in **Animation Provider**.
- Add **background-scaler** resize with screen resolution.
![Background Setup Anim Landscape](./img/05-main-scene/bg-setup-anim-landscape.png)
**Animation background portrait**
- Create **Empty Node** with name **mobile-background-anim-portrait**.
- Add **mobile-portrait-background-ui-controller** to display only on **Mobile**.
- Add **orientation-ui-controller** to display on Portrait with the options below.
![Background Setup Anim Portrait](./img/05-main-scene/bg-setup-anim-portrait-1.png)
- Create **Empty Node** with name **anim-background-main-game**.
- Add **animation-play-on-anable** with animation name in **Animation Provider**.
- Add **portrait-anim-background-scaler** resize with screen resolution.
![Background Setup Anim Portrait](./img/05-main-scene/bg-setup-anim-portrait-2.png)
## Setup Popup Panel
### Overview
A popup is a temporary UI element that overlays the main content to provide additional information or options to the user.
|![Popup overview exit](./img/05-main-scene/popup-disconnet.png)|![Popup overview disconnect](./img/05-main-scene/popup-exit-game.png)|![Popup overview disconnect](./img/05-main-scene/popup-credit-game.png)|
|---------------------------------------------------------------|---------------------------------------------------------------------|---------------------------------------------------------------------|
### Popup in the Game
The popup panel is already integrated into the main scenes `template-main-game`.
![Popup In Game](./img/05-main-scene/popup-panel-in-game.png)
| ![Popup Definition](./img/05-main-scene/popup-before.png) | Change set Sibling index | ![Popup Position](./img/05-main-scene/popup-after.png)|
| -----------------------------------------------------------|------------------------- | ------------------------------------------------------|
#### Detail configuring:
##### Multiple Popup Panel:
:::info
![Popup Position](./img/05-main-scene/popup-multi-panel.png)
To use the Multiple Popup layout, reference target `hyper-multiple-popup.prefab` in core:
**Path** : *assets/core-assets/hyper-core/packages/popup-panel/prefabs/hyper-multiple-popup.prefab*
:::
##### Manual Popup Panel:
:::info
- This popup is self-configured using shared textures and layout structure.
- The color theme and style may vary depending on the game design.
- Note: **Exit Game** Popup only in **Desktop**.
:::
##### Assets pack:
- *Prepare asset to pack*.
🔗 Click here to follow the setup pack assets: [Complete Assets Structure Guide](http://localhost:3000/docs/category/game-asset-structure)
| Path | Example |
|-------------------------------------------------------------|-------------------------------------------------------------------|
|`assets\game-assets\textures\desktop\preloads\main-game\exit`|![Exit Game Popup In Game](./img/05-main-scene/exit-popup-game.png)|
- structure prefabs:
![Exit Game Popup In Game](./img/05-main-scene/popup-exit-in-game.png)
**Preview Result**:
![Popup overview exit](./img/05-main-scene/popup-exit-game.png)

View File

@ -0,0 +1,11 @@
---
sidebar_position: 1
---
# System
> To be added
---
> To be added

View File

@ -0,0 +1,76 @@
---
sidebar_position: 2
---
# Background
Is the visual scenery that appears behind the gameplay elements.
---
The background consists of 2 parts: **Landscape** and **Portrait**.
- **Landscape** use for Desktop and Mobile landscape.
- **Portrait** only use for Mobile portrait.
| | Desktop | Mobile |
|:-:|--------------|---------|
|**Background Landscape**<br/>![Background Overview Landscape](./img/02-background/bg-overview-landscape-3.png)|<br/>![Background Overview Landscape](./img/02-background/bg-overview-landscape-1.png)|<br/>![Background Overview Landscape](./img/02-background/bg-overview-landscape-2.png)|
|**Background Portrait**<br/>![Background Overview Portrait](./img/02-background/bg-overview-portrait-2.png)||<br/>![Background Overview Portrait](./img/02-background/bg-overview-portrait-1.png)|
### 1. Prepare the assets
| | Assets | Description |
|:-:|--------------|---------|
|**Static**<br/>|![Background Prepare Landscape](./img/02-background/bg-prepare-assets-static.png)|Static background is necessary for the game|
|**Animation**<br/>|![Background Prepare Portrait](./img/02-background/bg-prepare-assets-anim.png)|Animation background may or may not be present, depending on the game design|
### 2. Setup Background Landscape
We use sprite frame background for landscape from prepared assets.
![Background Setup Landscape](./img/02-background/bg-setup-landscape.png)
### 3. Setup Background Portrait
We use sprite frame background for mobile from prepared assets.
![Background Setup Portrait](./img/02-background/bg-setup-portrait.png)
### 4. Setup Background Animation
If the game have design animation for background, we will do this step.
**Setp 1:** Using hepler to generate animation from prepared assets
![Background Setup Helper Anim](./img/02-background/bg-setup-hepler-anim.png)
![Background Setup Helper Anim](./img/02-background/bg-setup-anim-provider.png)
**Setp 2:**. Stup for spine-animation
- `Is Loop`: is ✅ because this animation will play through the game.
- `Static Sprite Frame`: It will be displayed when the animation has not finished loading.
![Background Setup Animation](./img/02-background/bg-setup-anim-1.png)
![Background Setup Animation](./img/02-background/bg-setup-anim-2.png)
**Setp 3:**. Add animation background with components below:
**Landscape:**
- Create `Empty Node` with name `anim-background-main-game`.
- Add `animation-play-on-enable` with animation name in **Animation Provider**.
- Add `background-scaler`, used to resize according to screen resolution.
![Background Setup Anim Landscape](./img/02-background/bg-setup-anim-landscape.png)
**Portrait:**
- Create `Empty Node` with name `mobile-background-anim-portrait`.
- Add `mobile-portrait-background-ui-controller` to display only on **Mobile**.
- Add `orientation-ui-controller` to display on Portrait with the options below.
![Background Setup Anim Portrait](./img/02-background/bg-setup-anim-portrait-1.png)
- Create `Empty Node` with name `anim-background-main-game`.
- Add `animation-play-on-enable` with animation name in **Animation Provider**.
- Add `portrait-anim-background-scaler`, used to resize according to screen resolution.
![Background Setup Anim Portrait](./img/02-background/bg-setup-anim-portrait-2.png)

View File

@ -0,0 +1,11 @@
---
sidebar_position: 2
---
# Reel Slot
> To be added
---
> To be added

View File

@ -0,0 +1,11 @@
---
sidebar_position: 4
---
# Spinning Panel
> To be added
---
> To be added

View File

@ -0,0 +1,11 @@
---
sidebar_position: 5
---
# Prensent Win
> To be added
---
> To be added

View File

@ -0,0 +1,11 @@
---
sidebar_position: 6
---
# Special Win
Is a game mechanic that allows players to earn significantly higher rewards than usual, typically triggered by rare or specific conditions during gameplay.
---
> To be added

View File

@ -0,0 +1,11 @@
---
sidebar_position: 7
---
# Item Description
> To be Add
---
> To be Add

View File

@ -0,0 +1,11 @@
---
sidebar_position: 8
---
# Free Round
> To be added
---
> To be added

View File

@ -0,0 +1,31 @@
---
sidebar_position: 9
---
# Info Page
Info Page (Information Page) provides players with essential details about how the game works. It helps players understand the rules, features, symbols, payout structures, and other gameplay mechanics.
---
## Paytable
Shows the value of each symbol and how much players can win from different combinations.
## Special Feature
Describes bonus rounds, free spins, jackpots, or other special win features.
## Gamble Feature
The Gamble Feature is a special option that allows players to risk their recent winnings for a chance to multiply them.
## Game Rules
Explains the basic mechanics and objectives of the game.
## Winning Lines or Ways
This section shows the valid winning combinations or paylines.
> To be added

View File

@ -0,0 +1,17 @@
{
"position": 11,
"label": "Main Scene",
"collapsible": true,
"collapsed": false,
"link": {
"type": "generated-index",
"title": "Setup Main Game",
"description": "This is where all the magic happen.",
"keywords": [
"setup",
"main game",
"game logic",
"structure"
]
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 53 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 220 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 195 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 190 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 208 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 138 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 102 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 100 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 57 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 64 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 99 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 100 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 452 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 219 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 78 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 78 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 239 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 329 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 223 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 144 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 264 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 269 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 65 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 270 KiB

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