-
Notifications
You must be signed in to change notification settings - Fork 42
Profiling
Metaforce has integrated support for Optick, a lightweight profiler focused on games. This profiler measures how long each frame takes, as well as which functions consumed time on each given frame, both details extremely important when profiling a game.
Just set CMake option OPTICK_ENABLED
to ON
.
- On command line, add
-DOPTICK_ENABLED=ON
to thecmake
call. - On Visual Studio, go
Project -> CMake Settings for metaforce
. In "CMake variables and cache", find OPTICK_ENABLED and toggle to ON. Otherwise, openCMakeSettings.json
directly and add it thevariables
section.
-
Download Optick, extract and open
-
Open a command prompt as administrator (non-windows can run in their own users. admin is for windows-only extra metrics)
-
Run
metaforce.exe <your_extract>
and any extra arguments you want. It can be found at<git root>\out\build\x64-MSVC-Release\Binaries\metaforce.exe
-
When the game is in a spot you want to start profiling, go to Optick (you opened in 1) and press "Start Profiling Session", the play button on top left. Game might lag a bit at this point.
a. You might need to change the target in the combo to the right of the trash icon. You can also configure an arbitrary IP address to profile another computer.
-
When you're done, go to Optick and press the same button again, but it's now a red square button. The game might lag a bit and optick will start processing stuff. After it's finished, you have juicy data to look at.
-
Press the save button to save the data you just collected for later or sharing.
This video has tips on how to look at the data: