如果您使用 Visual Studio 在 Windows 上开发游戏,可以使用适用于 Visual Studio 的 Android Game Development Extension (AGDE) 将 Android 添加为目标开发平台。这个为进阶游戏开发者提供的选项针对那些开发中且使用 Visual C++ 项目的游戏。您可以使用 AGDE 执行以下操作:
如需为游戏添加社交功能、查看游戏内容统计数据,并在多种设备上提供跨平台游戏内容,您可以使用 Google Play 游戏服务。您可以在 Google Play 管理中心内设置和管理 Play 游戏服务。然后,您可以使用适用于 Android、C 和 Unity 的 Play 游戏服务 API 添加功能。如需了解详情,请参阅 Play 游戏服务概览。
使用图形 API 进行开发
为了实现最佳 2D 和 3D 图形性能,您的 Android 游戏必须使用低级别图形 API 与 GPU 进行通信。受支持范围较广且适用于 Android 游戏开发的选项包括:
OpenGL ES
Vulkan
必须使用 OpenGL ES 或 Vulkan 才能使用 Android Games Development Kit (AGDK) 通过 C 或 C++ 开发游戏。Android GPU 检查器 (AGI) 图形性能分析工具只支持这两个图形 API。
[[["易于理解","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):2025-07-27。"],[],[],null,["# Game development basics\n\nThere are three basic components of your development environment that you\nmust decide on before you start developing an Android game.\nThese include:\n\n- Game engines\n- Integrated development environments (IDEs)\n- Graphics APIs\n\nDevelop with game engines\n-------------------------\n\nA *game engine* is a software framework that includes a set of libraries and\ntools for game development. Using a game engine lets you focus on game\ncontent and optimization, while easily implementing things like:\n\n- Graphics\n- Animation\n- Sound\n- Game loops\n- Input device support\n\nGame engines usually include an IDE and other tools for configuring features,\ndesigning, developing, compiling, and exporting your game to Android and other\nplatforms.\n\nTo work with a game engine, you can choose from among the following approaches:\n\n- Use an unmodified game engine (recommended)\n- Customize an existing game engine\n- Develop a new game engine\n\n### Use an unmodified game engine (recommended)\n\nWorking with an unmodified game engine is the simplest approach to developing\nAndroid games. To do so, you must choose a game engine that meets Android\ndevelopment requirements.\n\n#### Game engines you can use without modification\n\nHere are some existing game engines that support Android development:\n\n- **Unity**: commercial; uses the C# programming language.\n- **Godot**: open source; supports multiple programming languages including GDScript, C#, and C++.\n- **Defold**: open source; uses the Lua programming language.\n- **Unreal**: commercial; uses the Blueprint visual scripting system and C++. (Specializes in high-end 3D graphics)\n\nFor information about setting up and working with these engines, see\n[Using a game engine on Android](/games/engines/engines-overview).\n\nDevelop with IDEs\n-----------------\n\nThe IDE you use to develop Android games depends on the game engine you use and\nyour workflow. The most common game engines include a game editor for design and\ncode editing, which game developers typically use along with Android Studio.\n\n### Game editors\n\nA *game editor* often tightly integrates game design features with code editing.\nIn some cases these editors help designers complete development tasks\nwithout writing code.\n\nIf you are developing your first Android game, the simplest and best option is\nto use a game editor along with Android Studio, because game editors:\n\n- Provide UI and a toolset focused on game design.\n- Integrate asset design and code editing tasks.\n- Focus on the supported programming language.\n- Include modeling and rendering tools.\n\n### Android Studio\n\nAndroid Studio is the official IDE for developing Android apps. You should\ninstall it along with any other IDEs that you plan to use. With Android Studio,\nyou can:\n\n- Debug code written in C/C++, Java, or Kotlin.\n- Manage the Android SDK, which you must use to build Android games.\n- Build, test, profile, and optimize games.\n- Edit C/C++ code using the [Android NDK](/ndk).\n- Configure app packages and Google Play settings.\n\nFor more information, see [Android Studio](/studio).\n\n### Visual Studio\n\nIf you're developing your game on Windows using Visual Studio, you can add\nAndroid as a target using the Android Game Development Extension (AGDE) for\nVisual Studio. This option for advanced game developers targets games that are\nalready in development using a Visual C++ project. You can use AGDE to do the\nfollowing:\n\n- Use an existing Visual C++ project to create an Android game.\n- Debug and profile your game using Visual Studio.\n- Use distributed build systems such as Incredibuild or SN-DBS.\n\nFor more information, see [AGDE](/games/agde).\n\nDevelop with Google Play Games Services\n---------------------------------------\n\nTo add social features to your game, view gameplay statistics, and provide\ncross-platform gameplay across multiple devices, you can use Google Play Games Services.\nYou can set up and manage Play Games Services in the Google Play Console. You\ncan then add features using the Play Games Services APIs for Android, C, and\nUnity.\nFor more information, see [Play Games Services overview](/games/pgs/overview).\n\nDevelop with Graphics APIs\n--------------------------\n\nTo achieve the best 2D and 3D graphics performance, your Android game must use a\nlow-level graphics API to communicate with a GPU. The most widely supported\noptions for Android game development are:\n\n- OpenGL ES\n- Vulkan\n\nOpenGL ES or Vulkan are required to use the Android Games Development Kit (AGDK)\nto develop a game in C or C++. They are the only two graphics APIs\nsupported by the Android GPU Inspector (AGI) graphics profiling tool.\n\nFor information about the Android GPU Inspector, see\n[AGI](/agi)."]]