Lucky Les
Lucky Les

Reputation: 1

How can I implement Frame Pacing into an android games app

I'm an amateur app developer and have been tuning one of my projects to improve performance by reducing overdraw, removing unnecessary code and ensuring screen updates only occur when necessary. My app works well and there are no bugs that I'm aware of but when I profile the GPU rendering I get good results with the exception of occasional unexplained spikes in the GPU profile display. I've been investigating Frame Pacing without any success. My main testing is done using a Samsung GS4 device and the problem I'm struggling with is the consistency of the GPU rendering. On most occasions the animation of the token moving to the new position is smooth and I can't see any problems but intermittently the animation seems to be jumpy.

The GooglePlay pre-launch report on some devices is indicating VSync errors / Slow Ui Thread and Slow Draw commands across a small set of devices, most devices in the pre-launch report do not report the same performance errors.

I've searched you tube and googled as much as I can for any help to implement Frame Pacing (Swappy) and I've downloaded the Android Developer "games/sdk". I'm finding it difficult to follow the developer Frame Pacing guidelines and I've been unable to find a Frame Pacing example that I can understand.

https://developer.android.com/games/sdk/frame-pacing/opengl/update-build-settings

I'm using Android Studio at version 4.0.1 with Gradle 6.1.1, my code is Java and includes the following dependencies which are not being referenced by my app and I suspect these dependencies hold the answers to the performance problems in my app.

// To use the Android Frame Pacing library

implementation "androidx.gaming:gaming-frame-pacing:1.5.0-alpha01"

// To use the Android Performance Tuner

implementation "androidx.gaming:gaming-performance-tuner:1.0.0-alpha01"

I'm hoping that I don't need to learn C/C++ or convert my code to Unity as I'm just getting comfortable with Java.

Any help or advice / examples to help implement Swappy for Open GL into my app would be appreciated.

Upvotes: 0

Views: 737

Answers (1)

Will
Will

Reputation: 11

Will here, from the Android Games Team at Google.

The Android Game SDK is a solution for C/C++ and Unity games only, so it won't help you with frame pacing in a Java app, I'm afraid.

We suggest looking at the Firebase Performance Monitoring tool: https://firebase.google.com/docs/perf-mon/screen-traces This will hopefully give you insights as to where and why your frame jank is occurring.

Best regards.

Upvotes: 1

Related Questions