Skip to content

Commit 72429c3

Browse files
Merge pull request #2188 from madeline-underwood/godot
Godot_JA to review
2 parents abac95f + f1697ec commit 72429c3

File tree

9 files changed

+267
-163
lines changed

9 files changed

+267
-163
lines changed

content/learning-paths/mobile-graphics-and-gaming/godot_packages/_index.md

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,13 @@
11
---
2-
title: Use the Arm Performance Studio Integration extension in Godot
3-
4-
draft: true
5-
cascade:
6-
draft: true
7-
2+
title: Profile Android game performance in Godot with Arm Performance Studio
3+
84
minutes_to_complete: 15
95

10-
who_is_this_for: This is an introductory topic for Godot developers who are targeting Android devices and want to get more insight into how their game performs on devices with Arm CPUs and GPUs.
6+
who_is_this_for: This is an introductory topic for Godot developers targeting Android devices who want to optimize game performance on Arm CPUs and Mali GPUs using Arm Performance Studio tools.
117

128
learning_objectives:
139
- Install the Arm Performance Studio Integration extension in Godot
14-
- Annotate your Godot game with markers that give context to a profile in Arm Performance Studio tools
10+
- Annotate your Godot game with performance markers for profiling in Streamline and Performance Advisor
1511

1612
prerequisites:
1713
- Familiarity with Godot
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
---
2+
title: Annotate Game Events for Profiling in Godot
3+
weight: 5
4+
layout: learningpathall
5+
---
6+
7+
## Use the Performance Studio extension in your project
8+
9+
All annotation features are provided through the `PerformanceStudio` class. To begin, create an instance in your script:
10+
11+
```gdscript
12+
var performance_studio = PerformanceStudio.new()
13+
14+
15+
## Add single markers to highlight key game events
16+
17+
The simplest annotations are single markers. These appear in the Streamline timeline and help you correlate game behavior with performance data.
18+
19+
To emit a basic marker, use the `marker()` method with a descriptive label:
20+
21+
```gdscript
22+
performance_studio.marker("Game Started")
23+
```
24+
25+
This creates a timestamped marker labeled **Game Started**. When you capture a profile in Streamline, you’ll see this marker at the point the game starts.
26+
27+
![Marker annotation in Streamline#center](sl_marker.png "Marker annotation in Streamline")
28+
29+
30+
## Assign a custom color
31+
32+
You can assign a color to the marker using the `marker_color()` method:
33+
34+
```gdscript
35+
performance_studio.marker_color("Game Started", Color8(0, 255, 0))
36+
```
37+
38+
This example displays the Game Started marker in green. Use different colors to visually distinguish important game events.
39+
40+
41+
42+
43+

content/learning-paths/mobile-graphics-and-gaming/godot_packages/arm_mobile_studio_integrations.md

Lines changed: 0 additions & 155 deletions
This file was deleted.
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
---
2+
title: Create and track custom counters in Godot
3+
weight: 8
4+
layout: learningpathall
5+
---
6+
## What are counters?
7+
8+
Counters are floating-point values plotted as line charts in Streamline. Each value appears with two decimal places of precision.
9+
10+
There are two types of counters:
11+
12+
- Absolute counters: every value is treated as an independent measurement
13+
14+
- Delta counters: each value represents the change since the last measurement (for example, the number of enemy spawns since the last update)
15+
16+
## Define your counter chart
17+
18+
When charts are first defined, you can specify:
19+
20+
- A title: this names the chart in Streamline
21+
22+
- A series name: this labels the specific data stream within the chart
23+
24+
You can group multiple counter series under the same title to plot them on the same chart.
25+
26+
## Create and update a counter
27+
28+
Use the `create_counter()` method to define a counter in your script. For example:
29+
30+
```console
31+
var counter = performance_studio.create_counter("Title", "Series", false)
32+
```
33+
34+
The third parameter sets whether the counter is a delta counter `(true)` or absolute counter `(false)`.
35+
36+
To update the counter value, use:
37+
38+
```console
39+
counter.setValue(42.2)
40+
```
41+
42+
This value will appear in the timeline alongside other profiling data during a Streamline capture.
43+
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
---
2+
title: Define performance regions in Godot
3+
weight: 6
4+
layout: learningpathall
5+
---
6+
7+
## Defining regions in your Godot project
8+
9+
To define regions of interest within the game, you can specify a pair of markers prefixed with **Region Start** and **Region End**, for example:
10+
11+
```console
12+
performance_studio.marker("Region Start Times Square")
13+
# Do work
14+
performance_studio.marker("Region End Times Square")
15+
```
16+
17+
These regions are shown on the frame rate analysis chart in the Performance Advisor report.
18+
19+
![Regions in Performance Advisor#center](pa_frame_rate_regions.png "Regions in Performance Advisor")
20+
21+
Performance Advisor also includes dedicated charts for each region at the end of the report, allowing you to analyze them independently.
22+
23+
![Dedicated region charts in Performance Advisor#center](pa_dedicated_region_charts.png "Dedicated region charts in Performance Advisor")
24+
25+
26+
27+
28+
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
---
2+
title: Install the Arm Performance Studio extension in Godot
3+
weight: 4
4+
layout: learningpathall
5+
---
6+
7+
## Install the Arm Performance Studio extension in Godot
8+
9+
To profile performance in your Godot game, first install the Arm Performance Studio extension using the Godot Asset Library.
10+
11+
Start by opening your project in Godot, then select **AssetLib** from the top menu to browse available extensions.
12+
13+
Search for **Arm Performance Studio Integration**, then double-click the result to open its details.
14+
15+
In the extension dialog that appears, select **Download** to begin the installation.
16+
17+
![Extension download dialog in Godot#center](godot_install_performance_studio_extension.png "Download dialog for the Arm Performance Studio Integration extension in Godot")
18+
19+
When prompted, you can change the install folder if needed. To complete the setup, select **Install**.
20+
21+
The extension will now be added to your project and ready to use for adding markers and counters.
22+
23+
24+
25+
26+
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
---
2+
title: Profile your Godot game with Arm Performance Studio
3+
weight: 3
4+
5+
### FIXED, DO NOT MODIFY
6+
layout: learningpathall
7+
---
8+
9+
## Overview
10+
11+
In this Learning Path, you'll learn how to annotate and analyze performance in your Godot game using the Arm Performance Studio extension. You’ll add markers, counters, and timelines to capture game events and visualize them in Streamline and Performance Advisor. These tools help you identify CPU and GPU bottlenecks and optimize performance on Arm-based Android devices.
12+
13+
{{% notice Note %}}
14+
This extension is compatible with **Godot 4.3 and later**.
15+
{{% /notice %}}
16+
17+
## What is Arm Performance Studio?
18+
19+
[Arm Performance Studio](https://developer.arm.com/Tools%20and%20Software/Arm%20Performance%20Studio) is a free suite of analysis tools to profile game performance on mobile devices with Arm CPUs and GPUs. It includes:
20+
21+
- [Streamline](https://developer.arm.com/Tools%20and%20Software/Streamline%20Performance%20Analyzer): a performance analyzer that collects CPU and GPU metrics.
22+
23+
- [Performance Advisor](https://developer.arm.com/Tools%20and%20Software/Performance%20Advisor): a report generator that offers optimization suggestions.
24+
25+
Arm provides a Godot extension from [Godot games](https://godotengine.org/) that integrates with these tools, making it easier to capture performance data directly from your game.
26+
27+
## Add annotations to your Godot project
28+
29+
The Arm Performance Studio extension lets you add custom annotations to your Godot project. These annotations include timeline markers and counters that describe what's happening during gameplay,such as loading a level or spawning enemies.
30+
31+
When you record a capture in Streamline, these annotations appear in the timeline alongside CPU and GPU metrics. This context makes it easier to correlate performance issues with in-game events.
32+
33+
For example, here’s a capture showing a marker for when a wave of enemies spawns:
34+
35+
![Marker annotations in Streamline#center](sl_annotation.png "Marker annotations in Streamline")
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
---
2+
title: Use channels for threaded performance annotations
3+
weight: 7
4+
layout: learningpathall
5+
---
6+
## Use channels for threaded annotations in Godot
7+
8+
Channels are custom event timelines associated with a specific software thread. Unlike single-point markers, channel annotations span a duration and include a label and optional color. You can use them to trace task execution or track long-running operations, such as asset loading or enemy spawning.
9+
10+
## Create and annotate a channel
11+
12+
To define a new channel named **Spawner** and insert an annotation labeled **Spawning Wave**, use the following approach:
13+
14+
```console
15+
var channel : PerformanceStudio_Channel
16+
17+
func _ready() -> void:
18+
channel = performance_studio.create_channel("Spawner")
19+
20+
# Annotations can then be inserted into a channel:
21+
func _on_new_wave_started() -> void:
22+
channel.annotate_color("Spawning Wave", Color8(255, 0, 0))
23+
24+
func _on_wave_completed() -> void:
25+
channel.end()
26+
```
27+
In this example:
28+
29+
- The `annotate_color()` method begins a red-colored annotation labeled Spawning Wave
30+
31+
- The end() method marks when the annotation finishes
32+
33+
## View channels in Streamline
34+
35+
To see channels in Streamline, select the **Core Map** view, and expand the **VkThread** thread:
36+
37+
![Channel annotations in Streamline#center](sl_channel.png "Channel annotations in Streamline")

0 commit comments

Comments
 (0)