116 lines
4.8 KiB
Markdown
116 lines
4.8 KiB
Markdown
---
|
||
sidebar_position: 13
|
||
---
|
||
|
||
# Game Logo
|
||
|
||
## Overview
|
||
The **Game Logo** is a key branding element displayed consistently across all platforms and orientations to reinforce the game’s identity.
|
||
|
||
| Platform | Orientation | Preview |
|
||
|----------|-------------|---------|
|
||
| Desktop | Standard |  |
|
||
| Mobile | Landscape |  |
|
||
| Mobile | Portrait |  |
|
||
|
||
## Implementation
|
||
|
||
### Prepare Assets
|
||
|
||
#### 1. Core Setup
|
||
- **Location**: `assets/core-assets/hyper-core/packages/hyper-logo-animation`
|
||
- **Script**: Initialize animation states for the logo.
|
||
```typescript
|
||
// File: assets/core-assets/hyper-core/packages/logo-animation/hyper-logo-animation.js
|
||
onLoad: function () {
|
||
const self = this;
|
||
// Initialize animation states
|
||
self.animPlay = AnimationProvider.Instance.GetAnimation('anim-logo-play');
|
||
self.animIdle = AnimationProvider.Instance.GetAnimation('anim-logo-idle');
|
||
}
|
||
```
|
||
|
||
#### 2. Required Assets
|
||
|
||
**Static Assets**:
|
||
| Platform | Location | Preview |
|
||
|----------|----------|---------|
|
||
| Desktop | `assets/game-assets/textures/desktop/preloads/main-game/custom-scale` |  |
|
||
| Mobile | `assets/game-assets/textures/mobile/preloads/main-game/custom-scale` |  |
|
||
|
||
**Animation Assets**:
|
||
| Platform | Location | Preview |
|
||
|----------|----------|---------|
|
||
| Desktop | `assets/game-assets/textures/desktop/postloads/main-game/animations` |  |
|
||
| Mobile | `assets/game-assets/textures/mobile/postloads/main-game/animations` |  |
|
||
|
||
#### 3. Animation Settings
|
||
1. **Configure Animation Provider**:
|
||
- Register the logo animations in the Animation Provider.
|
||
- 
|
||
|
||
2. **Set Up Animation States**:
|
||
- Enable a static frame for the loading state in `anim-logo-play` and `anim-logo-idle`.
|
||
- 
|
||
- Configure continuous loop playback for animations.
|
||
- 
|
||
|
||
### Setup
|
||
|
||
#### Desktop Configuration
|
||
1. **Base Settings**:
|
||
- Configure the logo node in the main scene.
|
||
- 
|
||
|
||
2. **Node Setup**:
|
||
- Add the `hyper-logo-animation` component to the logo node.
|
||
- ```typescript
|
||
Components: {
|
||
animation: 'hyper-logo-animation',
|
||
}
|
||
```
|
||
- 
|
||
|
||
**Tip**: Adjust position and size according to the game design specifications.
|
||
|
||
#### Mobile Configuration
|
||
|
||
##### Landscape Mode
|
||
1. **Node Setup**:
|
||
- Configure the logo node with the following components:
|
||
| Component | Description |
|
||
|-----------|-------------|
|
||
| `hyper-logo-animation` | Plays and manages the logo animation. |
|
||
| `node-position-by-jackpot` | Adjusts logo position based on jackpot display state. |
|
||
| `landscape-logo-spine-aspect-ratio-keeper` | Maintains consistent logo size (e.g., 1.0). |
|
||
- 
|
||
|
||
##### Portrait Mode
|
||
1. **Node Setup**:
|
||
- Configure the logo node with the following components:
|
||
| Component | Description |
|
||
|-----------|-------------|
|
||
| `hyper-logo-animation` | Plays and manages the logo animation. |
|
||
| `node-position-by-jackpot` | Adjusts logo position based on jackpot display state. |
|
||
| `spine-aspect-ratio-keeper` | Maintains consistent logo size (e.g., 1.0). |
|
||
- 
|
||
|
||
2. **Position Settings**:
|
||
- Adjust logo position based on jackpot state:
|
||
| State | Position | Example |
|
||
|-------|----------|---------|
|
||
| Jackpot Active | Upper position |  |
|
||
| Jackpot Inactive | Default position |  |
|
||
|
||
3. **Size Settings**:
|
||
- Use the `spine-aspect-ratio-keeper` component to maintain logo proportions.
|
||
- 
|
||
- **Settings**:
|
||
| Setting | Description | Default Value |
|
||
|---------|-------------|---------------|
|
||
| **Default Scale** | Initial scale factor for the node. | Configurable (e.g., 1.0) |
|
||
| **Default Size** | Base width and height for scaling. | Configurable (e.g., 1050 x 1680) |
|
||
|
||
**Tip**:
|
||
- Test the static logo display under slow network conditions to ensure fallback works.
|
||
- Verify animation states (`play` and `idle`) for smooth transitions. |