The statistics displayed by the application represent the time spent updating the HUD view, the time spent updating the Minimap, the number of minimap objects updated, the total display time for the Scaleform content and the time spent advancing the SWF.
The number of objects is the accumulation of all types of entities including friendly/enemy players, power-ups, and objectives. The update time for the HUD includes updating all the UI indicators such as the billboards, log messages, round scoreboard, and the player’s stats. The update time for the Minimap includes the time spent updating the aforementioned minimap objects, as well as the masked terrain, the compass and the player icon. Updating these views consists of executing all logic governing the visual properties of the MovieClips, such as x/y position, label, current frame, rotation, scale, and transform matrix.
Previous Scaleform implementations were limited to using the C++ GFx::Movie::SetVariable and GFx::Movie::Invoke methods to update a Movie’s view state. This unfortunately incurred a significant performance penalty due to many factors, such as resolving MovieClip paths. In contrast, the Direct Access API provides faster code paths to perform the same functionality, thus making complex HUD updating much more efficient using Scaleform 3.1 and later.
The following graph shows the significant increase in the Minimap’s performance (lowering of the update time) using the Direct Access API method compared to the SetVariable/Invoke method. The performance gain is in the order of 10-25x:
Figure 15: Performance comparison of the Direct Access API vs. SetVariable/Invoke update methods for Minimap
As shown above, the update time of the Direct Access method is optimal for all working environments as it is well below the 1ms threshold – the average allocated processing time for HUD UIs.
Average performance statistics for the whole HUD Kit over the course of one 15-minute simulation round are presented below by platform. These numbers provide an estimate for performance of a fully-featured, Flash HUD driven by Scaleform:
Platform | FPS | Update (ms) | Display (ms) | Advance (ms) | Total (ms) |
---|---|---|---|---|---|
Windows Vista on a MacBook Pro | 1148 | 0.018 | 0.512 | 0.017 | 0.527 |
Xbox 360 | 1136 | 0.032 | 0.454 | 0.010 | 0.497 |
PlayStation 3 | 752 | 0.044 | 0.668 | 0.021 | 0.733 |
Table 1: Per Platform Average Performance Statistics for Scaleform HUD Kit
As shown in Table 1, the update time for HUD is optimal for all working environments as it is well below the 1ms threshold – the average allocated processing time for HUD UIs.
Below is a memory breakdown for all uncompressed content loaded by the HUD Kit demo. Content was exported using GFxExport’s default settings. The total memory foot footprint includes .GFX files, images, components and exported fonts.
1. File Format: GFX Standard Export, Images Uncompressed
Total Memory: 1858kb
Uncompressed Images