Compare commits
2 Commits
69812b7af1
...
4354dca1cd
Author | SHA1 | Date | |
---|---|---|---|
4354dca1cd | |||
72a4319c8f |
11
docs/02-setup-main-game/05-main-scene/06-special-win.md
Normal 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
|
@ -1,170 +0,0 @@
|
|||||||
---
|
|
||||||
sidebar_position: 6
|
|
||||||
---
|
|
||||||
|
|
||||||
# Special Win Setup
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## Overview
|
|
||||||
|
|
||||||
Special Wins are high-value reward events in slot games, cagegorized based on the payout threshold:
|
|
||||||
|
|
||||||
| Win Type | Trigger Threshold | Preview |
|
|
||||||
|-----------|-----------------------|----------------|
|
|
||||||
| **Big Win** | Medium payout |  |
|
|
||||||
| **Super Win** | High payout |  |
|
|
||||||
| **Mega Win** | Maximum payout |  |
|
|
||||||
|
|
||||||
Each type delivers increasing visual excitement to highlight significant player rewards.
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## Implementation
|
|
||||||
|
|
||||||
### Core Components
|
|
||||||
|
|
||||||
The special win system consists of three main components:
|
|
||||||
|
|
||||||
| Component | Purpose |
|
|
||||||
|-----------|---------|
|
|
||||||
| `hyper-special-win-initializer` | Handles system initialization and setup |
|
|
||||||
| `hyper-present-special-win` | Manages animation sequences and display logic |
|
|
||||||
| `hyper-special-win-label-point-effect` | Controls win amount visualization |
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
#### Coin Effect System
|
|
||||||
|
|
||||||
The coin shower effect uses prefab variants for different markets:
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
| Submodule | Theme | Preview |
|
|
||||||
|-------------|---------------|---------------|
|
|
||||||
| `hyper-coin-shower-international` | International |  |
|
|
||||||
| `hyper-coin-shower-chinese` | Chinese |  |
|
|
||||||
|
|
||||||
:::tip
|
|
||||||
- Position the Special Win node as per game design
|
|
||||||
:::
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### Asset Configuration
|
|
||||||
|
|
||||||
#### 1. Static Resources
|
|
||||||
|
|
||||||
Store static assets in platform-specific directories:
|
|
||||||
|
|
||||||
| Platform | Path | Preview |
|
|
||||||
|----------|------|---------|
|
|
||||||
| Desktop | `assets/textures/desktop/preloads/special-wins` |  |
|
|
||||||
| Mobile | `assets/textures/mobile/preloads/special-wins` |  |
|
|
||||||
|
|
||||||
🔗 [View Platform Asset Structure](http://localhost:3000/docs/cagegory/game-asset-structure)
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
#### 2. Animation Setup
|
|
||||||
|
|
||||||
##### Special Win Animation Flow
|
|
||||||
|
|
||||||
```mermaid
|
|
||||||
%%{init: {'theme': 'base', 'themeVariables': { 'fontSize': '25px', 'fontFamily': 'arial' }}}%%
|
|
||||||
graph TD
|
|
||||||
%% Win Types with Thresholds
|
|
||||||
SW[Special Wins] --> BW["Big Win"]
|
|
||||||
SW --> SPW["Super Win"]
|
|
||||||
SW --> MW["Mega Win"]
|
|
||||||
|
|
||||||
%% Big Win stages with flow
|
|
||||||
BW --> BWI[bigwin-in]
|
|
||||||
BWI --> BWL[bigwin-loop]
|
|
||||||
BWL --> BWO[bigwin-out]
|
|
||||||
|
|
||||||
%% Super Win stages with flow
|
|
||||||
SPW --> SPWI[superwin-in]
|
|
||||||
SPWI --> SPWL[superwin-loop]
|
|
||||||
SPWL --> SPWO[superwin-out]
|
|
||||||
|
|
||||||
%% Mega Win stages with flow
|
|
||||||
MW --> MWI[megawin-in]
|
|
||||||
MWI --> MWL[megawin-loop]
|
|
||||||
MWL --> MWO[megawin-out]
|
|
||||||
|
|
||||||
%% Legend nodes
|
|
||||||
L0["Feature Name"]-->L1["Win Types"] --> L2["In State"] --> L3["Loop State"] --> L4["Out State"]
|
|
||||||
class L0 specialWin
|
|
||||||
class L1 winType
|
|
||||||
class L2 inStage
|
|
||||||
class L3 loopStage
|
|
||||||
class L4 outStage
|
|
||||||
|
|
||||||
%% Style definitions
|
|
||||||
classDef inStage fill:#e6f3ff,stroke:#666,font-size:25px
|
|
||||||
classDef loopStage fill:#fff2cc,stroke:#666,font-size:25px
|
|
||||||
classDef outStage fill:#f8cecc,stroke:#666,font-size:25px
|
|
||||||
classDef winType fill:#d5e8d4,stroke:#82b366,font-size:25px
|
|
||||||
classDef specialWin fill:#fff4dd,stroke:#ff0000,font-size:25px
|
|
||||||
|
|
||||||
class BWI,SPWI,MWI inStage
|
|
||||||
class BWL,SPWL,MWL loopStage
|
|
||||||
class BWO,SPWO,MWO outStage
|
|
||||||
class BW,SPW,MW winType
|
|
||||||
class SW specialWin
|
|
||||||
|
|
||||||
%% Adjust node spacing
|
|
||||||
linkStyle default stroke-width:4px,stroke:#ff0000
|
|
||||||
```
|
|
||||||

|
|
||||||
|
|
||||||
##### Step 1: Add Animation Resources
|
|
||||||
|
|
||||||
Place animated assets in the following directories:
|
|
||||||
|
|
||||||
| Platform | Path | Preview |
|
|
||||||
|----------|------|---------|
|
|
||||||
| Desktop | `assets/textures/desktop/postloads/anim-special-win` |  |
|
|
||||||
| Mobile | `assets/textures/mobile/postloads/anim-special-win` |  |
|
|
||||||
|
|
||||||
##### Step 2: Configure Animation Settings
|
|
||||||
|
|
||||||
| Setting | Example |
|
|
||||||
|------------------|---------|
|
|
||||||
| Static Fallback |  |
|
|
||||||
| Loop Animation |  |
|
|
||||||
|
|
||||||
🔗 [View Animation Provider Setup](http://localhost:3000/docs/setup-main-game/main-scene/system#animation-provider-setup)
|
|
||||||
|
|
||||||
:::tip
|
|
||||||
- Move assets to `custom-scale/` directory to resolve image quality issues
|
|
||||||
- Asset paths may vary by project configuration
|
|
||||||
:::
|
|
||||||
|
|
||||||
##### Step 3: Font Configuration
|
|
||||||
|
|
||||||
- **Path:** `assets\game-assets\fonts\preloads\main-game\fnt-special-win`
|
|
||||||
- Follow these steps to configure fonts for special win displays:
|
|
||||||
|
|
||||||
1. **Package Font Assets**
|
|
||||||
- Import font files into project
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
2. **Font Integration**
|
|
||||||
- Add font asset to special win component
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
3. **Layout Settings**
|
|
||||||
|
|
||||||
- Configure text alignment
|
|
||||||
- Adjust font size and spacing
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
|
|
||||||
:::tip
|
|
||||||
Customize font styles based on each game's design.
|
|
||||||
:::
|
|
@ -1,86 +0,0 @@
|
|||||||
---
|
|
||||||
sidebar_position: 15
|
|
||||||
---
|
|
||||||
# Jackpot Setup
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## Overview
|
|
||||||
|
|
||||||
- **Jackpot Feature** is a system where there are **multiple levels (tiers)** of prizes, usually increasing in value. This structure gives players a chance to win **smaller jackpots more frequently**, while still keeping a large top prize available.
|
|
||||||
|
|
||||||
| Tier | Description | Preview |
|
|
||||||
|-------|------------------------------|------------------------------------------------------------|
|
|
||||||
| Grand | The top prize, very rare <br />and often worth thousands <br />or even millions(especially if it's progressive)| |
|
|
||||||
| Major | A significant prize, harder to win. |  |
|
|
||||||
| Minor | A bit higher in value, still fairly common. |  |
|
|
||||||
| Mini | The smallest and easiest to win. |  |
|
|
||||||
|
|
||||||
- The panel is responsive and supports both desktop and mobile layouts:
|
|
||||||
|
|
||||||
| Orientation | Preview |
|
|
||||||
|-------------|------------------------------------------------------------|
|
|
||||||
| Desktop |  |
|
|
||||||
| Mobile |  |
|
|
||||||
|
|
||||||
## Implementation
|
|
||||||
|
|
||||||
### Core Prefabs
|
|
||||||
|
|
||||||
- Use the prefabs located at:
|
|
||||||
|
|
||||||
|`assets/core-assets/jackpot-package/prefabs`||
|
|
||||||
|--------------------------------------------|--------------------------------------------------------------------|
|
|
||||||
|
|
||||||
### Setup Steps
|
|
||||||
|
|
||||||
#### Desktop
|
|
||||||
|
|
||||||
- Add the jackpot prefab to your main scene.
|
|
||||||
- Set its position to **(0, 0)**.
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
More info: [Platform Node Spawner](http://localhost:3000/docs/faqs/setup-cocos-scene#platform-node-spawner)
|
|
||||||
|
|
||||||
#### Mobile
|
|
||||||
|
|
||||||
- Configure the jackpot node for both landscape and portrait orientations.
|
|
||||||
- Use `UI Mobile Position` for a responsive layout.
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
More info: [UI Mobile Position](http://localhost:3000/docs/faqs/setup-cocos-scene#ui-mobile-landscape--portrait--position)
|
|
||||||
|
|
||||||
- Example using `Platform Node Spawner`:
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
More info: [Platform Node Spawner](http://localhost:3000/docs/faqs/setup-cocos-scene#platform-node-spawner)
|
|
||||||
|
|
||||||
### Result
|
|
||||||
|
|
||||||
- The jackpot panel works seamlessly across all platforms and orientations.
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
More info: [Node Spawner](http://localhost:3000/docs/faqs/setup-cocos-scene#node-spawner)
|
|
||||||
|
|
||||||
:::tip
|
|
||||||
**Sibling Index Order:**
|
|
||||||
| Node Name | Sibling Index | Notes |
|
|
||||||
|----------------------------------------|---------------|---------------------------------------|
|
|
||||||
| `jackpot-runner-panel-desktop-spawner` | Lowest | Usually at the bottom |
|
|
||||||
| `container-jackpot-runner-mobile` | Middle | Between desktop and result panels |
|
|
||||||
| `jackpot-result-panel-spawner` | Highest | Always on top <br />  |
|
|
||||||
:::
|
|
||||||
|
|
||||||
|
|
||||||
## Game Result Examples
|
|
||||||
|
|
||||||
| Win Tier | Example |
|
|
||||||
|----------|------------------------------------------------------------------|
|
|
||||||
| Grand |  |
|
|
||||||
| Major |  |
|
|
||||||
| Minor |  |
|
|
||||||
| Mini |  |
|
|
Before Width: | Height: | Size: 8.2 KiB |
Before Width: | Height: | Size: 240 KiB |
Before Width: | Height: | Size: 326 KiB |
Before Width: | Height: | Size: 44 KiB |
Before Width: | Height: | Size: 26 KiB |
Before Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 32 KiB |
Before Width: | Height: | Size: 331 KiB |
Before Width: | Height: | Size: 43 KiB |
Before Width: | Height: | Size: 326 KiB |
Before Width: | Height: | Size: 36 KiB |
Before Width: | Height: | Size: 327 KiB |
Before Width: | Height: | Size: 40 KiB |
Before Width: | Height: | Size: 190 KiB |
Before Width: | Height: | Size: 2.6 KiB |
Before Width: | Height: | Size: 6.4 KiB |
Before Width: | Height: | Size: 54 KiB |
Before Width: | Height: | Size: 36 KiB |
Before Width: | Height: | Size: 1.4 MiB |
Before Width: | Height: | Size: 87 KiB |
Before Width: | Height: | Size: 96 KiB |
Before Width: | Height: | Size: 47 KiB |
Before Width: | Height: | Size: 6.8 KiB |
Before Width: | Height: | Size: 10 KiB |
Before Width: | Height: | Size: 7.3 KiB |
Before Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 246 KiB |
Before Width: | Height: | Size: 60 KiB |
Before Width: | Height: | Size: 63 KiB |
Before Width: | Height: | Size: 45 KiB |
Before Width: | Height: | Size: 1.4 MiB |
Before Width: | Height: | Size: 109 KiB |
Before Width: | Height: | Size: 50 KiB |
Before Width: | Height: | Size: 1.4 MiB |
Before Width: | Height: | Size: 28 KiB |
@ -22,27 +22,3 @@ Use this configuration to control which prefabs appear based on the current plat
|
|||||||
|--------------------|----------------------|-----------------------------------------------|
|
|--------------------|----------------------|-----------------------------------------------|
|
||||||
| **Desktop Toggle** | ✅ Enabled | Show node on desktop |
|
| **Desktop Toggle** | ✅ Enabled | Show node on desktop |
|
||||||
| **Mobile Toggle** | ❌ Disabled | Hide node on mobile |
|
| **Mobile Toggle** | ❌ Disabled | Hide node on mobile |
|
||||||
|
|
||||||
|
|
||||||
## Node Spawner
|
|
||||||
|
|
||||||
Spawns a prefab at the same position as the original node and then removes the node.
|
|
||||||
|
|
||||||
#### Usage
|
|
||||||
|
|
||||||
- On scene start, the prefab replaces the node.
|
|
||||||
1. Attach the script to a placeholder node.
|
|
||||||
2. Set the `prefab` property in the Inspector.
|
|
||||||
|
|
||||||
|
|
||||||
## UI Mobile Landscape / Portrait Position
|
|
||||||
|
|
||||||
Positions a node at a specific location when the device is in landscape / portrait mode on mobile.
|
|
||||||
|
|
||||||
#### Usage
|
|
||||||
|
|
||||||
1. Attach the script to your node.
|
|
||||||
2. Set `default Position` in the Inspector.
|
|
||||||
3. The position updates automatically in mobile landscape / portrait mode.
|
|
||||||
|
|
||||||

|
|
Before Width: | Height: | Size: 1.1 KiB |
@ -31,10 +31,6 @@ const config: Config = {
|
|||||||
locales: ['en'],
|
locales: ['en'],
|
||||||
},
|
},
|
||||||
|
|
||||||
markdown: {
|
|
||||||
mermaid: true
|
|
||||||
},
|
|
||||||
|
|
||||||
presets: [
|
presets: [
|
||||||
[
|
[
|
||||||
'classic',
|
'classic',
|
||||||
@ -52,10 +48,6 @@ const config: Config = {
|
|||||||
} satisfies Preset.Options,
|
} satisfies Preset.Options,
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
themes: [
|
|
||||||
// ...existing themes if any...
|
|
||||||
'@docusaurus/theme-mermaid'
|
|
||||||
],
|
|
||||||
|
|
||||||
themeConfig: {
|
themeConfig: {
|
||||||
// Replace with your project's social card
|
// Replace with your project's social card
|
||||||
|
22
package-lock.json
generated
@ -3646,28 +3646,6 @@
|
|||||||
"react-dom": "^18.0.0 || ^19.0.0"
|
"react-dom": "^18.0.0 || ^19.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@docusaurus/theme-mermaid": {
|
|
||||||
"version": "3.7.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/@docusaurus/theme-mermaid/-/theme-mermaid-3.7.0.tgz",
|
|
||||||
"integrity": "sha512-7kNDvL7hm+tshjxSxIqYMtsLUPsEBYnkevej/ext6ru9xyLgCed+zkvTfGzTWNeq8rJIEe2YSS8/OV5gCVaPCw==",
|
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
|
||||||
"@docusaurus/core": "3.7.0",
|
|
||||||
"@docusaurus/module-type-aliases": "3.7.0",
|
|
||||||
"@docusaurus/theme-common": "3.7.0",
|
|
||||||
"@docusaurus/types": "3.7.0",
|
|
||||||
"@docusaurus/utils-validation": "3.7.0",
|
|
||||||
"mermaid": ">=10.4",
|
|
||||||
"tslib": "^2.6.0"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=18.0"
|
|
||||||
},
|
|
||||||
"peerDependencies": {
|
|
||||||
"react": "^18.0.0 || ^19.0.0",
|
|
||||||
"react-dom": "^18.0.0 || ^19.0.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@docusaurus/theme-search-algolia": {
|
"node_modules/@docusaurus/theme-search-algolia": {
|
||||||
"version": "3.7.0",
|
"version": "3.7.0",
|
||||||
"resolved": "https://registry.npmjs.org/@docusaurus/theme-search-algolia/-/theme-search-algolia-3.7.0.tgz",
|
"resolved": "https://registry.npmjs.org/@docusaurus/theme-search-algolia/-/theme-search-algolia-3.7.0.tgz",
|
||||||
|
@ -17,7 +17,6 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@docusaurus/core": "3.7.0",
|
"@docusaurus/core": "3.7.0",
|
||||||
"@docusaurus/preset-classic": "3.7.0",
|
"@docusaurus/preset-classic": "3.7.0",
|
||||||
"@docusaurus/theme-mermaid": "^3.7.0",
|
|
||||||
"@mdx-js/react": "^3.0.0",
|
"@mdx-js/react": "^3.0.0",
|
||||||
"clsx": "^2.0.0",
|
"clsx": "^2.0.0",
|
||||||
"prism-react-renderer": "^2.3.0",
|
"prism-react-renderer": "^2.3.0",
|
||||||
|