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.tscnscene so delete the one in the default folder
2. Create Metrics scene
- Create a new scene called
Metrics.tscn - Use a
Controlnode for the main node - Add the
MetricsManagerscript to the main node - Add a
SpriteorAnimatedSpritefor 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
MetricTogglescript to hide or show a life or other object
3. Add Metrics
- Use the
DeafaultSceneorLevel1and addMetricsto theUIscene - Select the
SceneManagerand connect theMetricsnode to the Script Variables
4. Documentation
- Post screen shots of the Godot layouts on Open Lab