๐ค๏ธ Minigame "Jump Sky"
Editing the "Jump Sky" Minigame
The Jump Sky minigame challenges the player to ascend by jumping across platforms while collecting coins. It is structured in vertical stages with specific rules for spawning platforms, coins, and visual feedback. Here's how to customize or expand it:
๐ช How to Add New Stages
Each vertical stage is defined using a StageDefinitionJump
ScriptableObject.
โ Steps to Create a New Stage:
Right-click in the Project panel โ Create โ PetCareGame โ Minigame-Jump โ Stage Definition
Configure the following fields:
minHeight / maxHeight: Defines the vertical range in world-space Y where this stage applies.
stageColor: Background color applied when the player is in this stage.
platformPrefabs: List of platform prefabs to randomly spawn in this stage.
coinPrefabs: List of coin prefabs that may spawn with platforms.
lineSpacing: Distance between horizontal rows of platforms.
maxPlatformsPerLine: Maximum number of platforms per row.
coinSpawnChance: Probability of spawning a coin per platform.
minGold / maxGold: Range of gold rewarded per coin.
โ
Assign the new stage:
In the GameManager GameObject (found in the Minigame_Jump
scene), add your new StageDefinitionJump
asset to the stages
list in the Inspector.
๐งฑ How to Modify Platforms
Platforms are spawned dynamically and must follow two key rules:
Tag and Layer:
Assign the Tag
"Platform"
Assign the Layer
"Platform"
Prefab Setup:
Ensure your platform prefab has the correct
Collider2D
orCollider
component.Any special behavior (e.g. moving, breaking, bouncing) can be scripted and added per prefab.
Example:
๐ง Player Setup
The player character used in the Jump Sky scene must:
Have the Tag
"Player"
Be on the Layer
"Player"
This is essential for proper collision detection with the DeadZone, platforms, and other mechanics.
๐ฎ Gameplay Flow
The player starts jumping from the base.
As they ascend, the
BlockSpawnerJump
loads new stages based on their Y position.The background color changes depending on the current stage.
Coins grant gold, and reaching a defined
finalHeight
results in a Win.Falling below a certain threshold triggers a Lose state.
๐งพ Tips
Stage order matters โ the first stages in the list will be used for lower altitudes.
Avoid overlapping min/max height ranges between stages to prevent unpredictable transitions.
You can reuse platforms and coins across stages or create entirely new visuals per stage for variation.
Last updated