Merge pull request 'feature/add-respin' (#91) from feature/add-respin into develop

Reviewed-on: #91
Reviewed-by: Pham Huynh Duc Huy <huy.pham@mercurystudiogroup.com>
This commit is contained in:
Pham Huynh Duc Huy 2025-07-10 15:02:57 +08:00
commit 7bfcb42548
12 changed files with 67 additions and 2 deletions

View File

@ -1,7 +1,72 @@
---
sidebar_position: 3
---
# Respin Feature
# Respin
### Overview
**Respin** is a bonus mechanic in slot games that allows players to re-spin selected reels without restarting the full spin.
It typically triggers after a specific in-game condition (e.g. near-win or bonus hit) and enhances player engagement.
> To be added
> Respin ends when the respin counter reaches **zero**.
```mermaid
stateDiagram-v2
Spin --> SpinEnd
Spin --> Condition_Trigger : case Special
SpinEnd --> Condition_Trigger : No Win
SpinEnd --> Win
Win --> Win_Complete : case normal
Win_Complete --> Condition_Trigger
Condition_Trigger --> Trigger_Respin
```
---
### Main Scene
#### Triggering Respin
- Triggered by game logic after a win or specific pattern.
- Node setup required in Scene graph.
| Action | Image |
|--------|-------|
| Create Respin Trigger Node | ![Trigger](./img/respin/node-trigger-in-scenes.png) |
#### Respin Feature
1. **Trigger Respin**
![Trigger](./img/respin/trigger.png)
2. **Re-trigger Respin**
![Retrigger](./img/respin/retrigger.png)
3. **Respin Win**
This step handles the outcome evaluation after a respin.
Its implementation depends on the specific game design and may be optional in some games.
---
### Handle Event
#### Respin Event Handling
- Override class: `hyper-gaming-server-handler`
| Process | Image |
|---------|-------|
| Listen for event: `"respins" | ![Script](./img/respin/handle-event.png) |
| Trigger Data from Server | ![Trigger](./img/respin/handle-trigger.png) |
| Re-trigger Data | ![Retrigger](./img/respin/handle-retrigger.png) |
---
### Feature Management
#### Feature Class Setup
- Create `feature-respin` class extending `feature-game`
- Responsibilities:
- Manage respin panel UI
- Handle trigger & retrigger logic
| Action | Image |
|--------|-------|
| Script: Feature Panel | ![Script](./img/respin/script-feature-respin.png) |
| Script: Trigger/Retrigger | ![Trigger](./img/respin/script-trigger-retrigger.png) |

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 503 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 87 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 457 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 514 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 425 KiB