Merge pull request 'updates/20250606-update-freespin' (#76) from updates/20250606-update-freespin into develop
Reviewed-on: #76
@ -7,6 +7,269 @@ sidebar_position: 2
|
||||
## Overview
|
||||
The **Free Spin (or Free Games) Feature** awards players a set number of spins without requiring additional bets. During these spins, players can still win prizes—often larger than in the base game—without spending any of their own credits.
|
||||

|
||||
## Implementation
|
||||
|
||||
## Implementation Guide
|
||||
|
||||
### Prepare Assets
|
||||
|
||||
| Component Type | Description | Visual |
|
||||
|------------------------|---------------------------------------------------|--------|
|
||||
| **Core Components** | Locate the prefabs from the core package. |  |
|
||||
| **Game-Specific Components** | Prefabs are already present in the main game scene. |  |
|
||||
|
||||
---
|
||||
|
||||
### Setup Scene
|
||||
|
||||
#### Structure Free Spins
|
||||
|
||||
Your scene should include the following nodes:
|
||||
|
||||
- **Trigger**
|
||||
- **Retrigger**
|
||||
- **Win**
|
||||
|
||||
***Example Scene Structure:***
|
||||
|
||||

|
||||
|
||||
| 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
|
||||
|
||||
##### Trigger & Retrigger
|
||||
|
||||
To configure the Free Spin **trigger** and **retrigger** components, follow these steps:
|
||||
|
||||
1. **Add Animations**
|
||||
|
||||
Include the required animations for both the trigger and retrigger elements.
|
||||
|
||||

|
||||

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

|
||||
|
||||
| Property | Description |
|
||||
|------------------------|--------------------------------------------------------------------------|
|
||||
| `durationPresentation` | Duration (in seconds) the trigger animation plays before auto-stopping |
|
||||
|
||||
2. **Add Background Animation Effect**
|
||||
|
||||

|
||||
|
||||
| Prefab Name | Purpose | Location in Core Package |
|
||||
|-------------|-------------------------------------------------|-------------------------------------------------------------|
|
||||
| `explosive` | Background animation effect triggered | `assets/core-assets/hyper-core/packages/explosive/prefabs` |
|
||||
|
||||
3. **Configure Particle Effects**
|
||||
|
||||

|
||||

|
||||
|
||||
| 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. present freespin retrigger
|
||||
|
||||
Add fonts and textures to show retrigger effect.
|
||||
|
||||

|
||||
|
||||
##### Add Font
|
||||
|
||||

|
||||
|
||||
#### 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.
|
||||
:::
|
||||
|
||||
---
|
||||
#### Free Spins Count Box
|
||||
|
||||
The **Free Spins Count Box** displays the remaining number of free spins to the player. Follow these steps to set it up:
|
||||
|
||||
##### Steps to Add the Count Box
|
||||
|
||||
| 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 its appearance in both desktop and mobile modes. |  |
|
||||
|
||||
##### Platform-Specific Setup
|
||||
|
||||
Assign the appropriate node and controller for each platform:
|
||||
|
||||
| Platform | Node Name | Component to Add | Example Image |
|
||||
|----------|--------------------------|-----------------------------|-------------------------------------------------------|
|
||||
| Desktop | `freespins-box-desktop` | `Platform-ui-controller` |  |
|
||||
| Mobile | `freespins-box-mobile` | `Platform-ui-controller` |  |
|
||||
|
||||
##### Asset Configuration
|
||||
|
||||
Ensure the correct assets are used for each platform:
|
||||
|
||||
| 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 Box Background |  |
|
||||
|
||||
##### Font Setup
|
||||
|
||||
Set the font for the count box display:
|
||||
|
||||

|
||||
|
||||
---
|
||||
#### Free Spin Background Setup
|
||||
|
||||
##### 1. Add Animation to Animation Provider
|
||||
|
||||
Add the Free Spin background animation to your **Animation Provider**.
|
||||
|
||||

|
||||
|
||||
##### 2. Configure Background Display
|
||||
|
||||
Set up the background for both landscape and portrait modes:
|
||||
|
||||
- **Landscape Mode**
|
||||
|
||||

|
||||
|
||||
- **Portrait Mode**
|
||||
|
||||

|
||||
|
||||
|
||||
##### 3. Asset Example
|
||||
|
||||
Example background assets for Free Spin:
|
||||
|
||||

|
||||
|
||||
|
||||
#### Sidebands (Optional)
|
||||
|
||||
Sidebands are optional visual elements, often used in classic slot game designs.
|
||||
|
||||
| Preview | Asset Structure |
|
||||
|---------|----------------|
|
||||
|  |  |
|
||||
|
||||
**Setup Steps:**
|
||||
|
||||
1. **Add Preference:**
|
||||
Add the free sideband preference in your configuration.
|
||||

|
||||
|
||||
2. **Assign Texture:**
|
||||
Set the correct texture for the free sideband.
|
||||

|
||||
|
||||
**Asset Mapping:**
|
||||
|
||||
| Asset Name | Node/Preference Name |
|
||||
|---------------------------|------------------------|
|
||||
| `anim-free-sideband-static` | `particle-free-sideband` |
|
||||
| `sideband-back` | `sideband-back` |
|
||||
| `sideband` | `sideband` |
|
||||
| `sideband-shine` | `sideband-shine` |
|
||||
| `sideband-static` | `liquid` |
|
||||
| `indicator-static` | `indicator-static` |
|
||||
|
||||
---
|
||||
|
||||
#### Transition Effects (Optional)
|
||||
|
||||
##### Setup: Create Transition Node
|
||||
|
||||
1. **Create a new node** in your scene for the transition effect.
|
||||
2. **Add the following components** to this node:
|
||||
- `transition`
|
||||
- `transition-scaler`
|
||||
3. Configure the transition properties as required for your effect.
|
||||
|
||||

|
||||
|
||||
| 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:**
|
||||
|
||||

|
||||
|
||||
---
|
||||
|
||||
## Final Result Examples
|
||||
|
||||
| Phase | Image |
|
||||
|-------|-------|
|
||||
| Trigger |  |
|
||||
| Active Scene |  |
|
||||
| Completion |  |
|
||||
|
After Width: | Height: | Size: 3.1 KiB |
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 |
After Width: | Height: | Size: 31 KiB |
After Width: | Height: | Size: 9.0 KiB |
BIN
docs/03-setup-special-feature/img/freespins/both-mode-mobile.png
Normal file
After Width: | Height: | Size: 3.4 KiB |
BIN
docs/03-setup-special-feature/img/freespins/effect-explosive.png
Normal file
After Width: | Height: | Size: 28 KiB |
After Width: | Height: | Size: 79 KiB |
After Width: | Height: | Size: 5.7 KiB |
After Width: | Height: | Size: 32 KiB |
After Width: | Height: | Size: 64 KiB |
After Width: | Height: | Size: 67 KiB |
After Width: | Height: | Size: 6.4 KiB |
After Width: | Height: | Size: 54 KiB |
After Width: | Height: | Size: 91 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: 6.4 KiB |
After Width: | Height: | Size: 134 KiB |
After Width: | Height: | Size: 35 KiB |
After Width: | Height: | Size: 48 KiB |
After Width: | Height: | Size: 34 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 |
BIN
docs/03-setup-special-feature/img/freespins/setup-transition.png
Normal file
After Width: | Height: | Size: 60 KiB |
After Width: | Height: | Size: 30 KiB |
After Width: | Height: | Size: 30 KiB |
BIN
docs/03-setup-special-feature/img/freespins/trigger-freespin.png
Normal file
After Width: | Height: | Size: 129 KiB |
BIN
docs/03-setup-special-feature/img/freespins/win-freespin.png
Normal file
After Width: | Height: | Size: 157 KiB |