Skip to reading
Progress Bars, Hints & Journals

3. Understand the number and the range

Edition 0.86.4.1 HF1

0.86.4.1 Hotfix 1 edition. Earlier lessons and screenshots retain their original version context; revised references and supplements describe the newer behavior.

Download PDFView illustrations

Figure 3. Maximum sets the full amount; Preview Value chooses the sample shown in the designer.

Source table from 3. Understand the number and the range, page 6
SetupResult
Current 30, Maximum 10030% full.
Current 3, Maximum 560% full.
Current 2, Maximum 3About 66.67% full; a percentage caption can show the decimals.
Current above MaximumThe displayed bar clamps to full.
Current below 0The displayed bar clamps to empty.

The bar’s lower end is zero. Maximum must stay positive; this build enforces a small positive minimum. If a puzzle has five parts, Maximum 5 is usually clearer than converting every step to a percentage yourself.

Display clamping does not repair the source variable. In the runtime test, power = 150 displayed a full 100-point bar while the variable still contained 150. Clamp the number in the game logic too when later comparisons depend on it.

A meter is a display, not a slider. Clicking or dragging across it does not choose a new value. Use separate Buttons, actions or a Slider when the player needs to change the amount.

Page 6 of 53Permalink
Go to page