add doc detail free count box, transition, free component
105
docs/03-setup-special-feature/02-free-spin copy.md
Normal file
@ -0,0 +1,105 @@
|
||||
---
|
||||
sidebar_position: 2
|
||||
---
|
||||
|
||||
# Free Spins Implementation Guide
|
||||
|
||||
## Overview
|
||||
The Free Spins feature provides bonus rounds where players:
|
||||
- Receive complimentary spins
|
||||
- Can win prizes without additional bets
|
||||
- Often encounter enhanced winning opportunities
|
||||
|
||||

|
||||
|
||||
## Setup Process
|
||||
|
||||
### 1. Asset Configuration
|
||||
|
||||
#### Core Components
|
||||
Required prefabs from core package:
|
||||

|
||||
|
||||
#### Game-Specific Assets
|
||||
Implementation prefabs:
|
||||

|
||||
|
||||
### 2. Background Configuration
|
||||
|
||||
1. **Animation Setup**
|
||||
```typescript
|
||||
// Add to Animation Provider
|
||||
animationProvider.addAnimation('freespin-background');
|
||||
```
|
||||

|
||||
|
||||
2. **Display Modes**
|
||||
| Mode | Configuration |
|
||||
|------|---------------|
|
||||
| Landscape |  |
|
||||
| Portrait |  |
|
||||
|
||||
### 3. Feature Implementation
|
||||
|
||||
#### Scene Structure
|
||||
Required components:
|
||||
- Trigger Display
|
||||
- Retrigger Handler
|
||||
- Win Presentation
|
||||
|
||||

|
||||
|
||||
#### Component Setup
|
||||
|
||||
1. **Trigger Configuration**
|
||||
- Add assets:
|
||||
- Fonts
|
||||
- Textures
|
||||

|
||||
|
||||
2. **Retrigger Configuration**
|
||||
- Configure display elements
|
||||

|
||||
|
||||
3. **Win Display**
|
||||
- Set congratulations assets
|
||||

|
||||
|
||||
:::tip Configuration Guidelines
|
||||
Maintain consistency with game design specifications for:
|
||||
- Font selection
|
||||
- Visual elements
|
||||
- Animation timing
|
||||
:::
|
||||
|
||||
### 4. Optional Enhancements
|
||||
|
||||
#### Sidebands
|
||||
Classic slot visual enhancement:
|
||||
```typescript
|
||||
interface SidebandConfig {
|
||||
particleEffect: 'particle-free-sideband';
|
||||
background: 'sideband-back';
|
||||
foreground: 'sideband';
|
||||
shine: 'sideband-shine';
|
||||
liquid: 'sideband-static';
|
||||
indicator: 'indicator-static';
|
||||
}
|
||||
```
|
||||

|
||||
|
||||
#### Transitions
|
||||
Polish between game states:
|
||||
1. Configure animation provider
|
||||
2. Set node mappings
|
||||

|
||||
|
||||
## Implementation Examples
|
||||
|
||||
### Feature Flow
|
||||
1. **Trigger**
|
||||

|
||||
2. **Active State**
|
||||

|
||||
3. **Completion**
|
||||

|
@ -27,11 +27,14 @@ The **Free Spin (or Free Games) Feature** awards players a set number of spins w
|
||||
|
||||

|
||||
|
||||
#### Step 2: Set Display Parameters
|
||||
#### Step 2: Configure Display
|
||||
|
||||
- Configure **landscape** and **portrait** modes:
|
||||
- **landscape**:
|
||||
|
||||

|
||||
|
||||
- **portrait**:
|
||||
|
||||

|
||||
|
||||
#### Step 3: Asset Example
|
||||
@ -40,7 +43,7 @@ The **Free Spin (or Free Games) Feature** awards players a set number of spins w
|
||||
|
||||
---
|
||||
|
||||
#### Main Scene Structure
|
||||
#### Main Scene Structure Free Spins
|
||||
|
||||
Your scene should include the following nodes:
|
||||
|
||||
@ -50,28 +53,91 @@ Your scene should include the following nodes:
|
||||
|
||||

|
||||
|
||||
| Property | Description |
|
||||
|------------------------- |----------------------------------------------------------|
|
||||
| `transitionStart` | Triggers the show animation when Free Spins start.<br/>Default: `null`. |
|
||||
| `transitionStop` | Triggers the return animation to the base game.<br/>Default: `null`. |
|
||||
| `nodeActivate` | Maintains the visual state during Free Spins. |
|
||||
| `freeSideBandContainer` | Activates the Free Spins side band visual. |
|
||||
|
||||
---
|
||||
|
||||
#### Component Configuration
|
||||
|
||||
##### 1. Free Spin Trigger
|
||||
##### Trigger and Retrigger Setup
|
||||
|
||||
- Add fonts and textures for Free Spin trigger.
|
||||
Configure animations for both trigger and retrigger.
|
||||
|
||||

|
||||

|
||||
|
||||
| Node Name | Purpose | Location in Core Package |
|
||||
|-----------| ------------------------------------------------ | ---------------------------------------------------------- |
|
||||
| `content` | Zoom-in and zoom-out animation | `assets/core-assets/slotty-core/packages/feature-game/animations` |
|
||||
|
||||

|
||||
|
||||
| Property | Description |
|
||||
|------------------------|---------------------------|
|
||||
| `durationPresentation` | Specifies how long (in seconds) the animation trigger plays before auto-stopping |
|
||||
|
||||

|
||||
|
||||
| Prefab Name | Purpose | Location in Core Package |
|
||||
| ----------- | ------------------------------------------------ | ---------------------------------------------------------- |
|
||||
| `explosive` | Background animation effect triggered by numbers | `assets/core-assets/hyper-core/packages/explosive/prefabs` |
|
||||
|
||||

|
||||

|
||||
|
||||
| Node Name | Purpose | Location in Core Package |
|
||||
|-------------|---------------------------------------------------------------------------------------|-------------------------------------------------------------|
|
||||
| `particles` | - Particle effects around title and number triggers.<br/>- Set scale to `1` for visibility | `assets/core-assets/slotty-core/packages/present/particles` |
|
||||
|
||||
:::tip
|
||||
Set up the **present freespin retrigger** in the same way as the **present freespin trigger**.
|
||||
:::
|
||||
|
||||
##### 1. present freespin trigger
|
||||
|
||||
Add fonts and textures for Free Spin trigger.
|
||||
|
||||

|
||||
|
||||
##### 2. Free Spin Retrigger
|
||||
##### 2. present freespin retrigger
|
||||
|
||||
- Add fonts and textures to show retrigger effect.
|
||||
Add fonts and textures to show retrigger effect.
|
||||
|
||||

|
||||
|
||||
##### 3. Free Spin Win
|
||||
##### Add Font
|
||||
|
||||
- Add congratulations font and texture.
|
||||

|
||||
|
||||
#### 3. Present Free Spin Win
|
||||
|
||||
**Free Spin Win Setup**
|
||||
|
||||

|
||||
|
||||
| Property | Description |
|
||||
|-------------------------|-----------------------------------------------------------------------------------------------|
|
||||
| `content` | Node for displaying the win animation content. |
|
||||
| `durationPresentWin` | Duration (in seconds) that the win presentation is shown. |
|
||||
| `animation` | Animation controller for the win presentation.<br/>Located at: `assets/core-assets/slotty-core/packages/feature-game/animations` |
|
||||
| `clipStartPresentation` | Animation clip played when the win presentation starts. |
|
||||
| `clipStopPresentation` | Animation clip played when the win presentation ends. |
|
||||
| `allowPresentWinPoint` | Enables the display of win points during the presentation. |
|
||||
| `durationCountPoint` | Duration (in seconds) for counting up win points. |
|
||||
| `lblTotalWinPoint` | Label node showing the total win points. |
|
||||
| `lblTotalFreeSpinCount` | Label node showing the total number of free spins awarded. |
|
||||
|
||||
- Add congratulatory font and texture for the win display.
|
||||
|
||||

|
||||
|
||||
---
|
||||
|
||||
:::tip Best Practice
|
||||
Follow the visual and font flow as defined by your game's design system.
|
||||
:::
|
||||
@ -80,20 +146,30 @@ Follow the visual and font flow as defined by your game's design system.
|
||||
|
||||
#### Free Spins Count Box
|
||||
|
||||
| Step | Description | Image |
|
||||
|------|-------------|-------|
|
||||
| 1 | Locate prefab in Core: `freespins-count-box` |  |
|
||||
| 2 | Add the prefab to main game scene |  |
|
||||
| 3 | Desktop / Mobile | 
|
||||
| Step | Description | Image |
|
||||
|------|-----------------------------------------------|-----------------------------------------------|
|
||||
| 1 | Locate the `freespins-count-box` prefab in the Core package. |  |
|
||||
| 2 | Add the `freespins-count-box` prefab to your main game scene. |  |
|
||||
| 3 | Verify appearance in both desktop and mobile modes. |  |
|
||||
|
||||

|
||||
##### Platform Setup
|
||||
|
||||
**Asset Mapping:**
|
||||
| Platform | Node Name | Component to Add | Example Image |
|
||||
|----------|--------------------------|-----------------------------|-------------------------------------------------------|
|
||||
| Desktop | `freespins-box-desktop` | `Platform-ui-controller` |  |
|
||||
| Mobile | `freespins-box-mobile` | `Platform-ui-controller` |  |
|
||||
|
||||
| Asset Name | Node/Preference Name |
|
||||
|------------|----------------------|
|
||||
| `box-freespin` | `bg` |
|
||||
| `freespins` | `freespins` |
|
||||
##### Asset Setup
|
||||
|
||||
| Platform | Asset Path | Example Image |
|
||||
|----------|-------------------------------------------------------------------|-------------------------------------------------------------------------------|
|
||||
| Desktop | `assets/game-assets/textures/desktop/preloads/main-game/custom-scale` |  |
|
||||
| Mobile | `assets/game-assets/textures/mobile/preloads/main-game/custom-scale` |  |
|
||||
| Common | Freespins Background |  |
|
||||
|
||||
##### Asset Font
|
||||
|
||||

|
||||
|
||||
---
|
||||
|
||||
@ -101,11 +177,10 @@ Follow the visual and font flow as defined by your game's design system.
|
||||
|
||||
- Optional visual element, commonly used in classic or legacy slot designs.
|
||||
|
||||

|
||||
| Overview | Setup |
|
||||
|-------------------------------------------|----------------------------------------------|
|
||||
|  |  |
|
||||
|
||||
**Setup Instructions:**
|
||||
|
||||

|
||||
|
||||
**Asset Mapping:**
|
||||
|
||||
@ -122,15 +197,32 @@ Follow the visual and font flow as defined by your game's design system.
|
||||
|
||||
#### Transition Effects (Optional)
|
||||
|
||||
- These transitions create visual polish between game phases.
|
||||
create new node and add `transition`, `transition-scaler` component.
|
||||
|
||||

|
||||
|
||||
Steps:
|
||||
| Property | Description |
|
||||
|--------------------|--------------------------------------------|
|
||||
| `content` | Target node for transition effects |
|
||||
| `animationName` | Animation identifier/reference |
|
||||
| `sfxName` | Sound effect identifier |
|
||||
| `transitionFrame` | Frame to trigger transition callback |
|
||||
|
||||
|
||||
##### Asset Setup
|
||||
|
||||
1. Add transition animation to the **Animation Provider**.
|
||||
2. Match the animation name with the correct node.
|
||||
|
||||

|
||||
|
||||
|
||||
**add preferrence**
|
||||
|
||||
Configure preferences as needed for your transition.
|
||||
|
||||

|
||||
|
||||
**Example Result:**
|
||||
|
||||

|
||||
|
BIN
docs/03-setup-special-feature/img/freespins/add-anim-content.png
Normal file
After Width: | Height: | Size: 41 KiB |
After Width: | Height: | Size: 65 KiB |
After Width: | Height: | Size: 60 KiB |
After Width: | Height: | Size: 87 KiB |
After Width: | Height: | Size: 33 KiB |
After Width: | Height: | Size: 58 KiB |
After Width: | Height: | Size: 32 KiB |
After Width: | Height: | Size: 95 KiB |
Before Width: | Height: | Size: 59 KiB |
BIN
docs/03-setup-special-feature/img/freespins/effect-explosive.png
Normal file
After Width: | Height: | Size: 28 KiB |
After Width: | Height: | Size: 32 KiB |
After Width: | Height: | Size: 64 KiB |
After Width: | Height: | Size: 67 KiB |
BIN
docs/03-setup-special-feature/img/freespins/freespin-trigger.png
Normal file
After Width: | Height: | Size: 43 KiB |
Before Width: | Height: | Size: 156 KiB After Width: | Height: | Size: 153 KiB |
After Width: | Height: | Size: 24 KiB |
BIN
docs/03-setup-special-feature/img/freespins/set-freespin-win.png
Normal file
After Width: | Height: | Size: 169 KiB |
After Width: | Height: | Size: 5.5 KiB |
Before Width: | Height: | Size: 61 KiB After Width: | Height: | Size: 59 KiB |
After Width: | Height: | Size: 30 KiB |
After Width: | Height: | Size: 30 KiB |
Before Width: | Height: | Size: 130 KiB After Width: | Height: | Size: 129 KiB |