Add visible metrics to a game scene to show the score, number of items or lives. It uses art created in the Rewards art lab
1. Setup
- Use your game project or download the Default Project Template
- Download the Assets folder if needed
- For artwork, you will need the rewards such as extra lives and items and any other icons you may want to use to represent in the metrics
- We’re going to rebuild the
Metrics.tscn
scene so delete the one in the default folder
2. Create Metrics scene
- Create a new scene called
Metrics.tscn
- Use a
Control
node for the main node - Add the
MetricsManager
script to the main node - Add a
Sprite
orAnimatedSprite
for each icon for the metrics, for items and extra lives - Add a Label and script for
MetricCount
, a counter than goes with a number- Optional: Use a custom font
- An Icon can also use a
MetricToggle
script to hide or show a life or other object
3. Add Metrics
- Use the
DeafaultScene
orLevel1
and addMetrics
to theUI
scene - Select the
SceneManager
and connect theMetrics
node to the Script Variables
4. Documentation
- Post screen shots of the Godot layouts on Open Lab