[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["没有我需要的信息","missingTheInformationINeed","thumb-down"],["太复杂/步骤太多","tooComplicatedTooManySteps","thumb-down"],["内容需要更新","outOfDate","thumb-down"],["翻译问题","translationIssue","thumb-down"],["示例/代码问题","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2024-11-06。"],[],[],null,["# Getting started with Android Dynamic Performance Framework (ADPF) in Unreal Engine\n\nAndroid Dynamic Performance Framework (ADPF) is a powerful tool from Google for\ndevelopers who want to optimize the performance of their applications. Through\nits thermal APIs, ADPF provides real-time information about the thermal state\nof the device, which is then used to adjust graphics settings in the\napplication.\n\nFor research purposes, Arm developed a demo using Unreal Engine and ADPF to\ninvestigate how ADPF is used to optimize game performance.\n\nADPF monitors the thermal status, with the graphics qualities being adjusted in\nthe game engine accordingly.\n\nKeeping developers in mind, the objective is to allow users to play the game for\nlonger without affecting the gameplay experience and the device consuming too\nmuch power.\n\nBefore you begin\n----------------\n\nBefore looking at the demo in more detail, it is important to highlight the\n[official Google documentation on ADPF](/games/optimize/adpf). This\ndocumentation is an invaluable resource which provides in-depth insights and\nguidance on how to use ADPF.\n\nHowever, for those who prefer customizable learning, the ADPF sample repository\ncontains practical examples of implementing ADPF in Android applications.\n\nGraphics settings adjustment\n----------------------------\n\nIn the context of Unreal Engine, we can adjust graphics settings dynamically to\nmaintain performance.\n\nWe used the Thermal State monitor and Thermal Headroom API in ADPF to monitor\nthermal throttling. You can then adjust quality settings, such as shadow\nquality, reflection quality and texture quality, as the device starts to\nthrottle.\n\nThe following Graphics Quality settings in Unreal Engine are used to modify\nvarious settings:\n\n- ViewDistanceQuality\n- ShadowQuality\n- GlobalIlluminationQuality\n- ReflectionQuality\n- AntiAliasingQuality\n- TextureQuality\n- VisualEffectQuality\n- PostProcessingQuality\n- FoliageQuality\n- ShadingQuality\n- OverallScalabilityLevel\n\nReal-world testing\n------------------\n\nArm creates our own demo games, which are used to research mobile graphics and\ngame technologies. This year, we have tested ADPF on one of them, the SteelArms\ndemo.\n\nSteelArms has different levels of graphics intensities and a substantial CPU\nworkload. It is built to be like modern mobile games, so we can model the game\nbehavior on today's mobile phones. It also allows us to test how different\ntechnologies might work in a game on Arm-based mobile devices.\n\n### Results\n\n**Figure 1:** SteelArms full screen comparison with and without ADPF.\n\nThe previous images show a difference between the best (Cinematic) quality and\nlowest (Low) quality when ADPF is activated to adjust graphics settings. This\nchange is gradual and not noticeable by users during gameplay.\n**Figure 2:** Game with ADPF integration: split screen.\n\nA split screen view of the highest graphics settings on the left (Blue Robot)\nside, and lowest graphics settings on the right (Red Robot) side.\n**Figure 3:** Game with ADPF Integration: side-by-side details comparison. **Figure 4:** Game with ADPF Integration: side by side.\n\nIn the previous figures 3 and 4, the same view of the robot can be seen side by\nside. If a closer look is taken, the graphics settings adjusted by using ADPF is\nseen. Notice the floor of the ring, the shoulder of the robot, the ropes of the\nring and the crowd? All of them seem to be at a slightly lower quality, which\nwas done by using ADPF.\n\nWhen throttling was imminent, these effects were scaled down in the SteelArms\ndemo. It is hard to spot these small reductions in post processing and visual\neffects. Also, users will generally not notice them when playing. This means you\ncan maintain most of the visual experience for the game without a hit to the\ngameplay experience. You can do all this while maintaining the power performance\nof your game and the battery life of your device.\n\nAs mentioned earlier, for demonstration purposes, we are comparing the highest\nwith the lowest quality settings images. This is why the difference can still be\nseen when looked at carefully. However, when downscaled during gameplay, it is\nhardly noticeable to the user, while maintaining a stable gameplay experience.\n\n### Results\n\n**Figure 5:** Comparisons of FPS, Device Temperature, Thermal State \\& Headroom when ADPF is enabled/disabled \\~57% improvement in frame rates\n\nThe device avoids overheating and keeps within 1.0 thermal headroom.\n\nPower Consumption\n-----------------\n\n**Figure 6:** Comparison of Power Consumption with ADPF enabled/disabled\n\nADPF results\n------------\n\nThe results from ADPF being off and on can be seen in the figures shown\npreviously. Showing that there is a difference in the frame rate of the game,\nand power consumption of the cores. Up to a 57% improvement in the frame rate is\nseen when ADPF is on. When ADPF is off, the GPU draws a significant amount of\npower. The big CPU core then has power spikes that are consistent with the GPU\nworkload. As it is catching up with the amount of processing that it is being\nasked to do. In comparison, when ADPF is on, the big CPU core responds to\nthrottling and brings down the overall power consumption of all cores in the\ndevice.\n\nConclusion\n----------\n\nADPF can significantly improve the power consumption of games. This ultimately\nmeans longer playtime for gamers, with improved battery life and lower\ntemperature for the device being used. From a developer perspective, ADPF\nmaintains the correct frame rate of the game. While giving them the flexibility\nto scale down quality settings and still providing the user with a great\ngameplay experience.\n\nNewer and older devices can benefit from using ADPF. It allows games to run to\na high standard on previous generations of devices without additional\noptimization work."]]