3.3 KiB
3.3 KiB
sidebar_position
sidebar_position |
---|
2 |
Background
Is the visual scenery that appears behind the gameplay elements.
The background consists of 2 parts: Landscape and Portrait.
- Landscape use for Desktop and Mobile landscape.
- Portrait only use for Mobile portrait.
Desktop | Mobile | |
---|---|---|
Background Landscape![]() |
![]() |
![]() |
Background Portrait![]() |
![]() |
1. Prepare the assets
Assets | Description | |
---|---|---|
Static |
![]() |
Static background is necessary for the game |
Animation |
![]() |
Animation background may or may not be present, depending on the game design |
2. Setup Background Landscape
We use sprite frame background for landscape from prepared assets.

3. Setup Background Portrait
We use sprite frame background for mobile from prepared assets.

4. Setup Background Animation
If the game have design animation for background, we will do this step.
Setp 1: Using hepler to generate animation from prepared assets


Setp 2:. Stup for spine-animation
- Is Loop
: is ✅ because this animation will play through the game.
- Static Sprite Frame
: It will be displayed when the animation has not finished loading.


Setp 3:. Add animation background with components below:
**Landscape:**
- Create `Empty Node` with name `anim-background-main-game`.
- Add `animation-play-on-enable` with animation name in **Animation Provider**.
- Add `background-scaler`, used to resize according to screen resolution.

**Portrait:**
- Create `Empty Node` with name `mobile-background-anim-portrait`.
- Add `mobile-portrait-background-ui-controller` to display only on **Mobile**.
- Add `orientation-ui-controller` to display on Portrait with the options below.

- Create `Empty Node` with name `anim-background-main-game`.
- Add `animation-play-on-enable` with animation name in **Animation Provider**.
- Add `portrait-anim-background-scaler`, used to resize according to screen resolution.
