<aside> <img src="/icons/reorder_gray.svg" alt="/icons/reorder_gray.svg" width="40px" />

Navigation

</aside>

🏠 Home Page

Getting Started

Architecture

Level System

Characters & Vehicles

Run Mechanics

World Objects

Boosters & Modifiers

Progression & Economy

UI

Save & Debugging

Modules

Publishing

Reference

💰 Monetization (Ads & IAP)

<aside> 💡 The Balance window checks that a sled level can be finished and calculates the upgrade bonuses and prices. It simulates the runs with an analytic model, not with PhysX.

</aside>

Open the window from Tools → Slope Masters → Balance. The tool is in Assets/Project Files/Game/Editor/Balance.

Subsystems

The model covers a sled. It uses gravity, ground friction and the friction relief of the sled upgrade. It has no steering losses and no obstacles.

balance-window.png

Two stages

Stage 1: terrain and friction

Free iteration. The tool never edits the level.

  1. Open the level scene.
  2. In the Balance window, press Load.
  3. Read the inputs: the launcher force range and angle, the friction of the terrain and the sled, the level start and finish, the money per meter.
  4. Read the Feasibility verdict. It shows whether the best loadout finishes the level.
  5. Use the tables to see what each hill asks for: the launch speed that just reaches a point, and where the sled can coast.
  6. Use What-if friction to test another friction. The assets are not changed.
  7. Use Preview a loadout to see the reach for a chosen launcher level and efficiency.

Stage 2: upgrades

  1. Add BalanceMarker components to objects along the road of the level scene, or press Add in the window. The markers are ordered by Z. Marker n is where the run after the n-th upgrade should stop. The run without upgrades has no marker.
  2. Press Reload markers.
  3. Set the solver settings and press Solve. The solver finds the bonus of each stage by bisection on the model reach. The price of a stage is a share of the income that the player has just made.
  4. Check the planned runs, the crests and the notes. The window lists violations in red.
  5. Press Apply to assets to write the bonuses and the prices into the upgrade assets. Copy report copies the result.

The root object of the markers is tagged EditorOnly, so builds drop it. Nothing uses the markers at runtime.

Model vs real physics

Run probe enters Play mode in the open level scene and launches the sled once for each scenario with a forced speed and efficiency. It records where each run stops and compares the result with the model. The player save is not changed: the upgrade levels are bypassed and the run events of GameController are muted.

Control Description
Mute level objects Disables the level objects during the probe.
Fit terrain friction to these runs Sets the what-if friction override from the probe result.

The probe shows the mean error of the stopped runs. A positive value means that the model goes farther than PhysX.

Tests

SledBalanceTests in Assets/Project Files/Game/Tests/Editor run the model checks in the Test Runner.

Notes