Tag Archives: AGDE

Answering your top questions on Android Game Development Kit

Posted by Wayne Lu, Technical Lead Manager, Android DevRel

hand holding a phone with game and chat

We launched the Android Game Development Kit (AGDK) in July, and have collected some top questions from developers - ranging from AGDK libraries and tools, optimizing memory in Android, and implementing graphics.


AGDK and game engines

Firstly, we’ve heard questions from early, rising game developers on how to use our set of AGDK libraries and tools. We have the following recommendations depending on your setup:

  1. For game developers using popular game engines such as Defold, Godot, Unity, or Unreal - you can follow our guides to learn how to develop apps on Android. Using these game engines lets you focus on building gameplay instead of the entire technology stack.
  2. If you're using Unreal Engine and targeting multiple platforms such as PC or consoles, Android Game Development Extension (AGDE) may be a great addition to your workflow.
  3. We also support developers who want to customize and write their own game engine - you can learn more about this with our C or C++ documentation.

After choosing your game engine and workflow, you should look into our tools such as the Android Studio Profiler to inspect your game, Android GPU Inspector to profile graphics and Android Performance Tuner to optimize frame rates and loading times.


Game Mode API and Interventions

Following this, we’ve received questions on developing for Android 12. While you don’t have to do anything special for your game to run on Android 12, we’ve introduced Game Mode API and interventions to help players customise their gaming experience.

  1. Read more about the Game Mode API, and find out how to optimize your game for the best performance or longest battery life when the user selects the corresponding game mode.
  2. Learn about the Game Mode interventions - these are set by original equipment manufacturers (OEMs), to improve the performance of games that are no longer being updated by developers. For example: WindowManager backbuffer resize to reduce a device's GPU load.

Memory Access in Android

Secondly, you’ve asked us how memory access works in Android game development versus Windows. In short, here are a couple of pointers:

  1. Games need to share memory with the system. Some devices have less available memory than others, so testing is needed to check for low memory issues on a range of supported devices. Testing should be done on devices with typical apps that a user would have installed (i.e. not a clean device).
  2. The amount of memory a game can allocate depends on various factors such as the amount of physical memory, the number of dirty pages, and the amount of total zRam (for compressed swapping)
  3. Symptoms of low memory can be: onTrimMemory() calls, memory thrashing, or termination of the game by the Low Memory Killer. Use bugreport logs to check if the game was killed by the Low Memory Killer, or on Android 11 and later check the ApplicationExitInfo to see if the game was terminated because of REASON_LOW_MEMORY.
  4. Avoid memory thrashing: this occurs when there’s low but insufficient memory to kill the game. You can detect this via system tracing, and should reduce the overall memory footprint to avoid this issue.
  5. Use the Android Profiler and other tools to inspect your memory usage.

Implementing Graphics in Android

Thirdly, we’ve received questions about implementing graphics in Android. You have the following options: OpenGL ES or Vulkan graphics APIs:

  1. Learn how to configure OpenGL ES graphics for your C++ game engine by initializing variables, rendering with the game loop, scenes and objects.
  2. Read our Vulkan guides to learn how to draw a cube, compile shaders, setup validation layers, and other best practices.

Check out the Q&A video to view the top questions on AGDK and visit g.co/android/AGDK for our latest resources for Android game development.

Android Game Development Extension is now available to all Android game developers

Posted by Lily Rapaport, Product Manager

After more than a year in closed beta, we are happy to announce that Android Game Development Extension (AGDE) is now available for all game developers to download. This milestone release of Game Tools from the Android Studio team meets game developers where they are; AGDE adds Android as a platform target to Microsoft Visual Studio, making it easier to target Android with existing multi-platform Visual Studio game projects.

AGDE is part of the Android Game Development Kit, which includes both libraries and tools that support making great games on Android. AGDE is best suited for game developers that develop primarily on Microsoft Windows using Visual Studio to write C/C++ code. Game developers that do not fall under these criteria, but are using C/C++, should use Android Studio to develop for Android.

Alongside the release of AGDE 2021.1, we recently published case studies on how our partners, Epic Games and Electronic Arts found success using AGDE.

We built AGDE as part of our effort to address game developers facing issues in targeting Android with their cross-platform workflows. At the top of the list of issues was developers’ preference to remain in a single IDE instead of maintaining multiple projects for different platforms. AGDE enables this for game developers using Visual Studio by removing the need to switch between IDEs when switching between platforms. In addition, we wanted to solve pain points around existing Visual Studio tools for Android that are often dated or suffer from integration issues. Our team is committed to having AGDE support the latest versions of the Android SDK, and NDK as well as providing updated tools easily accessible from Visual Studio. Finally, we wanted to bring you quick access to some of the most useful Android Studio capabilities, built into AGDE. Therefore, we invested in creating seamless integrations to our most popular tools, such as Studio profilers, logcat, and the Android SDK and device manager. Overall, these features are designed to make you more productive in your day-to-day game development workflow.

Build with AGDE

After downloading and installing AGDE in a Visual Studio project, you can treat Android development as you would any other platform.

  • AGDE integrates with MSBuild to compile and link C++ code for Android.
  • Project build settings are configured using the standard Visual Studio property system. After the MSBuild process, AGDE uses Gradle to complete the build and package the project. This Gradle stage can be used to integrate Android libraries containing Java or Kotlin code into the final application bundle.
  • The Android SDK manager provides access to additional tools and frameworks to assist with building Android games.
  • The Android Virtual Device (AVD) manager allows you to launch directly into emulator snapshots so that you can have a repeatable test environment.

Debug with AGDE

AGDE supports deploying to, running on, and debugging with both an Android emulator and a physical device. Debug sessions run inside Visual Studio, using its standard interface for breakpoints, tracing and variable inspection.

  • AGDE interfaces with LLDB for debugging support.
  • Register views, and disassembly of native code allow you to set a breakpoint, and step right into the disassembly of your OpenGL. The assembly view shows the assembly in-line with the current C++, allowing you to step into or over each instruction as they are executed. This is useful for building context and understanding what is running on your device.
    gif demonstrating AGDE supports deploying to, running on, and debugging with both an Android emulator and a physical device.
  • The memory view shows the current values within a block of memory. As we step through the running game, AGDE in Visual Studio automatically highlights the areas of memory that have changed. In the screenshot below we show where in memory the view matrix has changed, as indicated by the red text.
  • Sometimes when debugging isn’t enough to figure out what is going on, we know that having access to the logs can be helpful to dig deeper. The logcat tool allows for searching and filtering logs to pinpoint exactly the data you want.

Profile with AGDE

AGDE integrates with a standalone version of Android Studio Profilers. This profiler can be launched from Visual Studio and attached to a running game session.

  • The Android Studio Profilers display real time usage statistics for CPU, memory, network, and energy.
  • We added support for native memory sampling. Now you can better understand where your memory is going and how to optimize your game for a broader reach of devices.
gif demonstrating how AGDE integrates with a standalone version of Android Studio Profilers.

Integrations

We know everyone has a unique build setup and there is no “one-size-fits-all” solution. That is why we are investing in making AGDE compatible with various tools commonly used by game developers.

  • We partnered with Epic Games to integrate with Unreal Engine (UE 4.26.1+) to provide a seamless Android experience for Unreal Engine game developers.
  • We are working with Sony Distributed Build System (SN-DBS) to enable SN-DBS users to leverage the power of distributed builds for Android with AGDE (coming soon)
  • AGDE is compatible with Incredibuild, a distributed build tool.

Getting started

Download AGDE 2021.1 and see our documentation for additional details. To help you get to know AGDE quickly, we put together a few samples that demonstrate different ways you can use AGDE to configure your project.

Visual Studio IntelliSense features are compatible with AGDE. All current Android CPU architectures are supported: both ARM and Intel in 32-bit and 64-bit.

We appreciate any feedback on things you like, and issues or features you would like to see. If you find a bug or issue, feel free to file an issue. Learn more about Android game development, and follow us -- the Android Studio development team ‐ on Twitter and on Medium.

Microsoft and Visual Studio are trademarks of the Microsoft group of companies.

Android Game Development Extension is now available to all Android game developers

Posted by Lily Rapaport, Product Manager

After more than a year in closed beta, we are happy to announce that Android Game Development Extension (AGDE) is now available for all game developers to download. This milestone release of Game Tools from the Android Studio team meets game developers where they are; AGDE adds Android as a platform target to Microsoft Visual Studio, making it easier to target Android with existing multi-platform Visual Studio game projects.

AGDE is part of the Android Game Development Kit, which includes both libraries and tools that support making great games on Android. AGDE is best suited for game developers that develop primarily on Microsoft Windows using Visual Studio to write C/C++ code. Game developers that do not fall under these criteria, but are using C/C++, should use Android Studio to develop for Android.

Alongside the release of AGDE 2021.1, we recently published case studies on how our partners, Epic Games and Electronic Arts found success using AGDE.

We built AGDE as part of our effort to address game developers facing issues in targeting Android with their cross-platform workflows. At the top of the list of issues was developers’ preference to remain in a single IDE instead of maintaining multiple projects for different platforms. AGDE enables this for game developers using Visual Studio by removing the need to switch between IDEs when switching between platforms. In addition, we wanted to solve pain points around existing Visual Studio tools for Android that are often dated or suffer from integration issues. Our team is committed to having AGDE support the latest versions of the Android SDK, and NDK as well as providing updated tools easily accessible from Visual Studio. Finally, we wanted to bring you quick access to some of the most useful Android Studio capabilities, built into AGDE. Therefore, we invested in creating seamless integrations to our most popular tools, such as Studio profilers, logcat, and the Android SDK and device manager. Overall, these features are designed to make you more productive in your day-to-day game development workflow.

Build with AGDE

After downloading and installing AGDE in a Visual Studio project, you can treat Android development as you would any other platform.

  • AGDE integrates with MSBuild to compile and link C++ code for Android.
  • Project build settings are configured using the standard Visual Studio property system. After the MSBuild process, AGDE uses Gradle to complete the build and package the project. This Gradle stage can be used to integrate Android libraries containing Java or Kotlin code into the final application bundle.
  • The Android SDK manager provides access to additional tools and frameworks to assist with building Android games.
  • The Android Virtual Device (AVD) manager allows you to launch directly into emulator snapshots so that you can have a repeatable test environment.

Debug with AGDE

AGDE supports deploying to, running on, and debugging with both an Android emulator and a physical device. Debug sessions run inside Visual Studio, using its standard interface for breakpoints, tracing and variable inspection.

  • AGDE interfaces with LLDB for debugging support.
  • Register views, and disassembly of native code allow you to set a breakpoint, and step right into the disassembly of your OpenGL. The assembly view shows the assembly in-line with the current C++, allowing you to step into or over each instruction as they are executed. This is useful for building context and understanding what is running on your device.
    gif demonstrating AGDE supports deploying to, running on, and debugging with both an Android emulator and a physical device.
  • The memory view shows the current values within a block of memory. As we step through the running game, AGDE in Visual Studio automatically highlights the areas of memory that have changed. In the screenshot below we show where in memory the view matrix has changed, as indicated by the red text.
  • Sometimes when debugging isn’t enough to figure out what is going on, we know that having access to the logs can be helpful to dig deeper. The logcat tool allows for searching and filtering logs to pinpoint exactly the data you want.

Profile with AGDE

AGDE integrates with a standalone version of Android Studio Profilers. This profiler can be launched from Visual Studio and attached to a running game session.

  • The Android Studio Profilers display real time usage statistics for CPU, memory, network, and energy.
  • We added support for native memory sampling. Now you can better understand where your memory is going and how to optimize your game for a broader reach of devices.
gif demonstrating how AGDE integrates with a standalone version of Android Studio Profilers.

Integrations

We know everyone has a unique build setup and there is no “one-size-fits-all” solution. That is why we are investing in making AGDE compatible with various tools commonly used by game developers.

  • We partnered with Epic Games to integrate with Unreal Engine (UE 4.26.1+) to provide a seamless Android experience for Unreal Engine game developers.
  • We are working with Sony Distributed Build System (SN-DBS) to enable SN-DBS users to leverage the power of distributed builds for Android with AGDE (coming soon)
  • AGDE is compatible with Incredibuild, a distributed build tool.

Getting started

Download AGDE 2021.1 and see our documentation for additional details. To help you get to know AGDE quickly, we put together a few samples that demonstrate different ways you can use AGDE to configure your project.

Visual Studio IntelliSense features are compatible with AGDE. All current Android CPU architectures are supported: both ARM and Intel in 32-bit and 64-bit.

We appreciate any feedback on things you like, and issues or features you would like to see. If you find a bug or issue, feel free to file an issue. Learn more about Android game development, and follow us -- the Android Studio development team ‐ on Twitter and on Medium.

Microsoft and Visual Studio are trademarks of the Microsoft group of companies.

Android Game Development Extension is now available to all Android game developers

Posted by Lily Rapaport, Product Manager

After more than a year in closed beta, we are happy to announce that Android Game Development Extension (AGDE) is now available for all game developers to download. This milestone release of Game Tools from the Android Studio team meets game developers where they are; AGDE adds Android as a platform target to Microsoft Visual Studio, making it easier to target Android with existing multi-platform Visual Studio game projects.

AGDE is part of the Android Game Development Kit, which includes both libraries and tools that support making great games on Android. AGDE is best suited for game developers that develop primarily on Microsoft Windows using Visual Studio to write C/C++ code. Game developers that do not fall under these criteria, but are using C/C++, should use Android Studio to develop for Android.

Alongside the release of AGDE 2021.1, we recently published case studies on how our partners, Epic Games and Electronic Arts found success using AGDE.

We built AGDE as part of our effort to address game developers facing issues in targeting Android with their cross-platform workflows. At the top of the list of issues was developers’ preference to remain in a single IDE instead of maintaining multiple projects for different platforms. AGDE enables this for game developers using Visual Studio by removing the need to switch between IDEs when switching between platforms. In addition, we wanted to solve pain points around existing Visual Studio tools for Android that are often dated or suffer from integration issues. Our team is committed to having AGDE support the latest versions of the Android SDK, and NDK as well as providing updated tools easily accessible from Visual Studio. Finally, we wanted to bring you quick access to some of the most useful Android Studio capabilities, built into AGDE. Therefore, we invested in creating seamless integrations to our most popular tools, such as Studio profilers, logcat, and the Android SDK and device manager. Overall, these features are designed to make you more productive in your day-to-day game development workflow.

Build with AGDE

After downloading and installing AGDE in a Visual Studio project, you can treat Android development as you would any other platform.

  • AGDE integrates with MSBuild to compile and link C++ code for Android.
  • Project build settings are configured using the standard Visual Studio property system. After the MSBuild process, AGDE uses Gradle to complete the build and package the project. This Gradle stage can be used to integrate Android libraries containing Java or Kotlin code into the final application bundle.
  • The Android SDK manager provides access to additional tools and frameworks to assist with building Android games.
  • The Android Virtual Device (AVD) manager allows you to launch directly into emulator snapshots so that you can have a repeatable test environment.

Debug with AGDE

AGDE supports deploying to, running on, and debugging with both an Android emulator and a physical device. Debug sessions run inside Visual Studio, using its standard interface for breakpoints, tracing and variable inspection.

  • AGDE interfaces with LLDB for debugging support.
  • Register views, and disassembly of native code allow you to set a breakpoint, and step right into the disassembly of your OpenGL. The assembly view shows the assembly in-line with the current C++, allowing you to step into or over each instruction as they are executed. This is useful for building context and understanding what is running on your device.
    gif demonstrating AGDE supports deploying to, running on, and debugging with both an Android emulator and a physical device.
  • The memory view shows the current values within a block of memory. As we step through the running game, AGDE in Visual Studio automatically highlights the areas of memory that have changed. In the screenshot below we show where in memory the view matrix has changed, as indicated by the red text.
  • Sometimes when debugging isn’t enough to figure out what is going on, we know that having access to the logs can be helpful to dig deeper. The logcat tool allows for searching and filtering logs to pinpoint exactly the data you want.

Profile with AGDE

AGDE integrates with a standalone version of Android Studio Profilers. This profiler can be launched from Visual Studio and attached to a running game session.

  • The Android Studio Profilers display real time usage statistics for CPU, memory, network, and energy.
  • We added support for native memory sampling. Now you can better understand where your memory is going and how to optimize your game for a broader reach of devices.
gif demonstrating how AGDE integrates with a standalone version of Android Studio Profilers.

Integrations

We know everyone has a unique build setup and there is no “one-size-fits-all” solution. That is why we are investing in making AGDE compatible with various tools commonly used by game developers.

  • We partnered with Epic Games to integrate with Unreal Engine (UE 4.26.1+) to provide a seamless Android experience for Unreal Engine game developers.
  • We are working with Sony Distributed Build System (SN-DBS) to enable SN-DBS users to leverage the power of distributed builds for Android with AGDE (coming soon)
  • AGDE is compatible with Incredibuild, a distributed build tool.

Getting started

Download AGDE 2021.1 and see our documentation for additional details. To help you get to know AGDE quickly, we put together a few samples that demonstrate different ways you can use AGDE to configure your project.

Visual Studio IntelliSense features are compatible with AGDE. All current Android CPU architectures are supported: both ARM and Intel in 32-bit and 64-bit.

We appreciate any feedback on things you like, and issues or features you would like to see. If you find a bug or issue, feel free to file an issue. Learn more about Android game development, and follow us -- the Android Studio development team ‐ on Twitter and on Medium.

Microsoft and Visual Studio are trademarks of the Microsoft group of companies.