🌤️ 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:

  1. Right-click in the Project panel → Create → PetCareGame → Minigame-Jump → Stage Definition

  2. 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:

  1. Tag and Layer:

    • Assign the Tag "Platform"

    • Assign the Layer "Platform"

  2. Prefab Setup:

    • Ensure your platform prefab has the correct Collider2D or Collider component.

    • Any special behavior (e.g. moving, breaking, bouncing) can be scripted and added per prefab.

Example:

plaintextCopiarEditarPlatform_Moving.prefab
└── Tag: Platform
└── Layer: Platform
└── Components: SpriteRenderer, BoxCollider2D, MovingPlatform.cs

🧍 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