[UPBEAT MUSIC]
SCOTT CARBON-OGDEN: Hi, everyone.
Welcome to this talk about the Android Game Development Kit.
I'm Scott Carbon-Ogden, a product manager
based in London working on Android games and graphics.
Today I'm very excited to talk to you all about the Android
Game Development Kit, or AGDK for short.
We have a lot of big exciting announcements.
But first I'll refresh your memory
on what the Android Game Development Kit is.
Simply put, the AGDK is a range of tools and libraries
to help you develop, optimize, launch,
and iterate on high quality Android games.
Everything in the AGDK follows three key tenets.
It's all code built for gaming.
All of our libraries are intended to be used in C
or C++, and have been built and tested with performance
in mind.
Secondly, we intend to reduce fragmentation.
The tools and libraries that we're going to show you today
work across many different Android SDK and NDK levels.
And lastly, these tools were built for Android by Android.
These features will be enhanced by future Android platform
updates.
They'll be updated before new versions of Android land.
And they're backwards-compatible,
having undergone extensive testing.
There are three key areas of game development
with where the AGDK can help.
Firstly, we have a variety of integrated workflow tools
to make Android development efficient.
For example, the Android Game Development Extension
helps you use your favorite Android tools
inside of Visual Studio.
AGDK also includes a suite of C and C++ development libraries
to make games easy to build, debug, and maintain.
For example, Game Activity and Game Text Input
help you focus on the most important code
and minimize the amount of Java native interface
that you have to use.
And lastly, we have a focus on performance optimization
to improve your game's performance
both pre and post-launch, such as with our new Android GPU
Inspector.
AGDK launched in July last year, and the response
has been really incredible.
I'd like to thank you all for your help with the Android Game
Development Kit, whether it was by submitting feedback
and bugs, by directly contributing code,
or even just for your kind words of encouragement.
AGDK has matured from multiple releases,
and now has over 15,000 downloads.
But we've heard some feedback about areas where
you want us to focus next.
JNI and debugging is still difficult.
Memory has been a persistent issue.
And we've heard that you want more tools and techniques
for improving game performance.
With this in mind, we've revamped the AGDK
with a variety of tools and libraries
to help with these additional needs.
Let's start with Integrated Workflows, where the Android
Game Development Extension has some rather exciting
new updates.
For those of you not as familiar with the Android Game
Development Extension, it is a Microsoft Visual Studio
extension for developers of C++ games and game engines.
It allows developers to use existing Visual Studio
workflows to create Android games.
The new version that we're releasing today
adds support for Visual Studio 2022 and enhancements
to make debugging Java and Java native interface even easier.
Based on your feedback, it also features improved deploy speed
and improved device compatibility with VR headsets.
With the AGDK in general, we're trying to make it possible
to develop your game in C or C++ as much as possible.
But inevitably, you're almost always
going to need to use some Java in your Android game.
Previously, to switch between Android Studio and Visual
Studio with AGDE, it could be quite a difficult process.
And we heard many developers having to maintain and manage
separate projects.
With our new Android Studio Java debugging capability for AGDE,
it's easy to use a single project to debug Java and C++
using Android Studio.
The first step to this is to go into Android Studio
and patch your build.Gradle file.
Now you can open your project in Android Studio.
Here we change the debugger to allow us
a step through both Java and native code.
After doing so, we can compile and launch directly
from Android Studio.
We can add some breakpoints in both Java and C++,
and it will show local variables and debugger information.
When you're done modifying files in Android Studio,
you can quickly jump back to editing and debugging
in Visual Studio with AGDE.
It's available now.
Just make sure that you have the most recent version
of the Android Game Development Extension, Android Studio,
and the Android Gradle plugin.
You can learn more at g.co/android/extension.
As well as trying to make JNI debugging easier,
we've also expanded our C and C++ library collection.
Last year, we launched three new libraries.
Firstly, Game Activity-- this provides a foundation for C++
games to be built on.
It provides C interfaces for all the Android events
that you'd expect, from screen rotation to app lifecycle.
This way, you can minimize the amount of development time
that you spend in the Java language.
Game Text Input is a stable way to use a software keyboard in C
that is officially supported and will
work across different Android versions.
And in this game controller, this
is a way to handle input from game controllers in C
to map their functions and to reconnect to the device
when necessary.
This is on top of our frame pacing API,
which improves frame stability and touch latency.
As well as, of course, our high performance audio library,
which reduces audio latency and provides an easy way
to use the most efficient audio API for a given device.
Since we launched these new and updated libraries last year,
they've been very well received.
We have been listening to your feedback, though.
We added fine-tuned filtering for input and activity,
and additional listeners to help you better position
your keyboard.
As always, to get these updates, you
can get our libraries as part of the SDK,
through Jetpack, or as source code.
We also heard that the SDK was getting inconveniently large.
So we're introducing a new express download
that's much smaller, but still has
everything you need to get going so long as you're on the most
recent version of the NDK.
As well as these updates, we're introducing a new library
today-- the Memory Advice API.
Now, when a game uses too much memory,
the low memory killer will sometimes kill the app.
This can be a bad experience for the player,
as it seems just like a crash.
It's also a bad experience for you, the developer.
And there's often no telemetry or signal about what happened.
To solve this problem, we're introducing the Memory Advice
API.
This is a new API that uses an ML model to combine the best
signals for a given device to determine how close the device
is to being low memory killed.
You can use it in a few different ways.
We've heard that many developers are using onTrimMemory
as a signal for low memory, and then
adjusting their memory usage.
For most devices, our new library
can be used as a drop and replacement for onTrimMemory,
but is much more accurate for that purpose.
You can also use it for telemetry
to record when devices approaching a low memory kill.
And then you can tune and adjust your game or content
on those devices to lower the risk in future.
This library is available now, and is part
of the AGK Libraries package.
You can also learn more about memory
and this library in Victor and Bill's talk about memory.
We've also seen a large number of emerging
and popular game engines start adopting our library.
To take one example, let's talk about the Frame Pacing API.
It's a library to help game engines ensure frame stability
and to lower touch latency--
in some cases, by as much as 10%.
Well, this is now available as part of Unity
from 2019.3, Unreal 4.25 onwards.
Cocos Creator will be launching it in 3.5.
And it's coming soon to Godot.
Having these libraries built into the engine
makes it even easier for you to use our new technologies,
as you don't have to do the integration work yourself.
Performance optimization is the third focus of the Android Game
Development Kit.
Our suite is designed to help developers quickly
find any stability or performance
issues before launch and to monitor performance post-launch
to catch any issues.
We started with the most important metrics,
like frame rate, loading time, and memory.
And we'll be expanding it to new metrics over time.
Smooth performance is essential for making an enjoyable game.
But it can be hard to work out what's causing slowdowns.
The Android GPU inspector is a tool
to help you analyze graphics performance regardless of what
type of GPU you're running on.
It helps you identify bottlenecks in your rendering,
whether they be in the GPU or elsewhere.
Once you've decided that you're memory-bound,
Vertex tell rate-bound, or whatever else it is,
it can help you pinpoint the location of these bottlenecks
in your render passes.
Last year we shared the AGI beta with you.
We've heard a lot of feedback and feature requests
from you since then, many of which
we've been able to incorporate into the product.
As a result of that, we're proud to announce that AGI is fully
launching today.
And you can grab it from our website.
When Jay spoke about AGI last year,
he mentioned a new area that we were
exploring-- frame profiling.
Frame profiling allows you to dive down
into a particular issue to see which render passes are taking
all the time, and then statically inspect
individual calls to find exactly where your problems are.
This makes it much easier to get to the root of the problem
and get your game running again.
Lastly, we also heard feedback that you wanted a simpler,
more efficient UI.
So we've overhauled the UI, helping you get
to important counters quickly.
You can find out more about AGI in Pascal's talk on the Android
GPU Inspector.
Or you can check it out at g.co/android/agdk.
Android Performance Tuner is a telemetry offering
that is part of AGDK and Android Vitals.
It helps you measure the quality of your user experience
by showing you frame time, loading times, and abandonment
rates.
It helps you diagnose and prioritize your game
performance issues by helping you understand
when game problems are happening and in what situations.
And lastly, it helps you get the best out of every device
by helping you better map quality levels to devices.
In the past year, we've seen some great examples
of developers using APT to better understand what
their field performance is, and to adjust
the availability of their game.
"The Witcher-- Monster Slayer" used Android Performance Tuner
to massively increase their device
reach while they're soft launching.
The developer, Spokko, used Android Performance Tuner
to assess the game's performance on different devices based
on actual usage during soft launch.
They also used Play Console and Device Catalog
to add additional devices over time.
With this information, they're able to turn off
underperforming devices and confidently launch
on a wide variety of devices.
This led to an increase in device reach
by 18-fold and an increase in downloads of 10%.
Although, of course, this is just
one case study and every app developer's experience with APT
is going to be different.
Lastly, when we think about optimization,
it's important to consider any signals from the user.
On select devices, the user can choose
between performance or battery saving mode for a game.
Game Mode APIs allow developers to query that preference
and react to it.
The Game Mode API is a part of the OS
itself rather than AGDK, and is available from Android ES.
With this, you can listen to callbacks
to tell you if your user it has entered a battery preference
or performance preference so you can adjust accordingly.
Currently, this is supported by Pixel and Samsung devices
running Android ES, with more devices coming soon.
This is part of our broader game dashboard initiative
to give users more control over their gameplay experience.
You can find out more about the Game Mode API
in our Developer Documentation.
We've covered a lot today.
To recap, the AGDK includes integrated workflows like
our updated Visual Studio extension,
a suite of C and C++ development libraries like our new Memory
Advice API.
And lastly, we have a focus on performance optimization
to improve your game's performance both pre-
and post-launch, such as our new updated GPU Frame Profiler.
That's just a taste of what's on offer in the Android Game
Development Kit.
It's got something for every game developer,
from integrated workflows, to C and C++ game libraries,
to performance optimization.
Make sure that you stay tuned for other videos.
And you can download and try the AGK now at g.co/android/agdk.
We'll put details and links in the description.
Thank you for your time today, and happy game development.
[UPBEAT MUSIC]