add set up main game #2
@ -2,9 +2,9 @@
|
||||
sidebar_position: 3
|
||||
---
|
||||
|
||||
# Set Custom Cocos Engine
|
||||
# Setup Custom Cocos Engine
|
||||
|
||||
Link project to a custom Cocos Engine.
|
||||
Set **Javascript Engine Path** to a **custom Cocos Engine**.
|
||||
|
||||
Thank 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.
|
||||
|
@ -2,7 +2,7 @@
|
||||
sidebar_position: 1
|
||||
---
|
||||
|
||||
# Adding Game Configuration
|
||||
# Game Configuration
|
||||
|
||||
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.
|
||||
|
||||
@ -55,7 +55,7 @@ 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");
|
||||
var SlottyItem = require('slotty-item');
|
||||
|
||||
HyperGamingConfig.itemMapper['BONUS'] = SlottyItem.Bonus;
|
||||
HyperGamingConfig.itemMapper['PIC1'] = SlottyItem.Pic1;
|
||||
@ -147,7 +147,9 @@ To connect and interact with the Hyper Gaming server, we need to register two ke
|
||||
To register these, add the `_registerInjection` function in `extend-slotty-setting.js`:
|
||||
|
||||
```jsx title="assets/game-assets/scripts/slotty-settings/extend-slotty-setting.js"
|
||||
SlottySetting.prototype._registerInjection = function () {
|
||||
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'));
|
||||
};
|
||||
@ -158,12 +160,12 @@ In addition to server modules, all Hyper Gaming projects should initialize the f
|
||||
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('extend-sound-handler');
|
||||
var HyperSoundHandler = require('sound-handler');
|
||||
var UISoundHandler = require('ui-sound-handler');
|
||||
var HyperHotkeyHandler = require('hyper-hotkey-handler');
|
||||
var HyperNotificationHandler = require('hyper-notification-handler');
|
||||
|
||||
SlottySetting.prototype._initializeParameter = function () {
|
||||
BaseSlottySetting.prototype._initializeParameter = function () {
|
||||
new UISoundHandler();
|
||||
new HyperSoundHandler();
|
||||
new HyperHotkeyHandler();
|
@ -12,8 +12,8 @@ This scene includes a `login-hyper-gaming` object used to establish a connection
|
||||
|
||||
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.
|
||||
- **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.
|
||||
|
@ -8,7 +8,7 @@ The Preload Scene is where you define which assets will be downloaded **before**
|
||||
|
||||
Setting up the preload system involves several steps, depending on the types of assets and specific download requirements.
|
||||
|
||||
Check out the [Game Assets Structure](./) for more detail.
|
||||
Check out the [Game Assets Structure](../category/game-asset-structure) for more detail.
|
||||
|
||||
## Preload vs Postload
|
||||
|
||||
@ -45,9 +45,9 @@ Hyper Slot Game supports localization through both text and raw asset replacemen
|
||||
|
||||
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 |  |  | |
|
||||
| Assets | EN | ZH | TH |
|
||||
|---------------|-----------------------------------------|---------------------------------------------|---------------------------------------------|
|
||||
|Text Buy Bonus||||
|
||||
|
||||
## Setting Up the Preload Scene
|
||||
|
||||
|
55
docs/02-setup-main-game/04-loading-scene.md
Normal file
@ -0,0 +1,55 @@
|
||||
---
|
||||
sidebar_position: 4
|
||||
---
|
||||
|
||||
# Loading Scene
|
||||
|
||||
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 game’s main features through in-game advertisements.
|
||||
|
||||

|
||||
|
||||
## 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 |
|
||||
|-------------------------------------------------------|-----------------------------------------------------------------|
|
||||
|||
|
||||
|
||||
## 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.
|
||||
|
||||
 
|
||||
|
||||
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.
|
||||
|
||||

|
||||
|
||||
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, you’ll see an empty loading scene like this:
|
||||
|
||||

|
||||
|
||||
However, with a proper asset setup, the loading scene will appear fully populated, like this:
|
||||
|
||||

|
||||
|
||||
:::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 don’t need a full asset setup. \
|
||||
Just set up the ***btn-start*** node in the Node Tree and you’re good to go.
|
||||
|
||||

|
||||
:::
|
26
docs/02-setup-main-game/05-main-scene.md
Normal file
@ -0,0 +1,26 @@
|
||||
---
|
||||
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.
|
||||
|
||||

|
||||
|
||||
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.
|
||||
|
||||

|
||||
:::
|
||||
|
||||
## Setup Reel Slot
|
||||
|
Before Width: | Height: | Size: 27 KiB |
Before Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 7.0 KiB |
Before Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 8.5 KiB |
Before Width: | Height: | Size: 64 KiB |
Before Width: | Height: | Size: 69 KiB |
Before Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 83 KiB |
Before Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 28 KiB |
Before Width: | Height: | Size: 510 KiB |
Before Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 69 KiB |
Before Width: | Height: | Size: 59 KiB |
Before Width: | Height: | Size: 113 KiB |
Before Width: | Height: | Size: 136 KiB |
Before Width: | Height: | Size: 131 KiB |
Before Width: | Height: | Size: 58 KiB |
Before Width: | Height: | Size: 28 KiB |
Before Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 71 KiB |
Before Width: | Height: | Size: 74 KiB |
Before Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 41 KiB |
Before Width: | Height: | Size: 26 KiB |
Before Width: | Height: | Size: 90 KiB |
Before Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 164 KiB |
Before Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 53 KiB |
Before Width: | Height: | Size: 32 KiB |
Before Width: | Height: | Size: 55 KiB |
Before Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 48 KiB |
Before Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 129 KiB |
Before Width: | Height: | Size: 42 KiB |
Before Width: | Height: | Size: 24 KiB |
Before Width: | Height: | Size: 53 KiB |
Before Width: | Height: | Size: 94 KiB |
Before Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 170 KiB |
Before Width: | Height: | Size: 368 KiB |
Before Width: | Height: | Size: 53 KiB |
Before Width: | Height: | Size: 3.3 KiB |
Before Width: | Height: | Size: 79 KiB |
Before Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 41 KiB |
Before Width: | Height: | Size: 67 KiB |
Before Width: | Height: | Size: 33 KiB |
Before Width: | Height: | Size: 9.2 KiB |
Before Width: | Height: | Size: 41 KiB |
Before Width: | Height: | Size: 25 KiB |
Before Width: | Height: | Size: 114 KiB |
Before Width: | Height: | Size: 83 KiB |
Before Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 26 KiB |
Before Width: | Height: | Size: 2.9 KiB |
Before Width: | Height: | Size: 70 KiB |
Before Width: | Height: | Size: 23 KiB |
Before Width: | Height: | Size: 63 KiB |
Before Width: | Height: | Size: 62 KiB |
Before Width: | Height: | Size: 49 KiB |
Before Width: | Height: | Size: 56 KiB |
Before Width: | Height: | Size: 56 KiB |
Before Width: | Height: | Size: 70 KiB |
Before Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 30 KiB |
Before Width: | Height: | Size: 44 KiB |
Before Width: | Height: | Size: 136 KiB |
Before Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 65 KiB |
Before Width: | Height: | Size: 31 KiB |
Before Width: | Height: | Size: 62 KiB |
BIN
docs/02-setup-main-game/img/editor-package.png
Normal file
After Width: | Height: | Size: 50 KiB |
BIN
docs/02-setup-main-game/img/hyper-loading-lucky-rooster.png
Normal file
After Width: | Height: | Size: 177 KiB |
BIN
docs/02-setup-main-game/img/hyper-loading.png
Normal file
After Width: | Height: | Size: 10 KiB |
BIN
docs/02-setup-main-game/img/loading-button-setup.png
Normal file
After Width: | Height: | Size: 116 KiB |
BIN
docs/02-setup-main-game/img/loading-full-assets-scene.png
Normal file
After Width: | Height: | Size: 249 KiB |
BIN
docs/02-setup-main-game/img/loading-node-tree.png
Normal file
After Width: | Height: | Size: 14 KiB |
BIN
docs/02-setup-main-game/img/loading-raw-scene.png
Normal file
After Width: | Height: | Size: 23 KiB |
BIN
docs/02-setup-main-game/img/loading-roma-legacy.png
Normal file
After Width: | Height: | Size: 339 KiB |
BIN
docs/02-setup-main-game/img/main-scene-wireframe.png
Normal file
After Width: | Height: | Size: 42 KiB |
After Width: | Height: | Size: 180 KiB |
BIN
docs/02-setup-main-game/img/new-hyper-loading.png
Normal file
After Width: | Height: | Size: 10 KiB |