- Mastering Android Game Development
- Raul Portales
- 241字
- 2021-07-16 13:59:06
Chapter 1. Setting Up the Project
In this chapter, we will describe the situations in which it makes sense to use the Android SDK for a game and those where it is best to use an external engine, explaining the pros and cons of each case.
We will create a simple project that we will be improving throughout the book, until it becomes a complete game. The particular game we are going to build is a Space Shooter.
A few top-level decisions will be made and explained, such as which orientation to use and how are we going to use activities and fragments.
We will describe the top-level architecture of a game engine, study how it is different from a typical app's, explaining why there is an UpdateThread
and how it interacts with the user input and why it is separated from the DrawThread
; we will include those elements in our project.
Once the game engine is completed, we will expand the project to show a pause dialog, handle the Android back key properly, be consistent with the Activity
lifecycle, and make it fullscreen.
Finally, we will summarize some best practices in writing code for games.
Topics that will be covered in this chapter are as follows:
- The right tool for the right game
- Setting up the project with Android Studio
- Game architecture
- Alert dialogs
- Handling the back key
- Dealing with the fullscreen mode
- Good practices for game developers
- Google Flutter Mobile Development Quick Start Guide
- 自己動手實現Lua:虛擬機、編譯器和標準庫
- Java高并發核心編程(卷2):多線程、鎖、JMM、JUC、高并發設計模式
- Servlet/JSP深入詳解
- Interactive Applications Using Matplotlib
- Drupal 8 Configuration Management
- HTML5與CSS3基礎教程(第8版)
- Python圖形化編程(微課版)
- Java Web開發就該這樣學
- SQL Server 2008中文版項目教程(第3版)
- Python計算機視覺和自然語言處理
- Java7程序設計入門經典
- Learning D
- Java 9 with JShell
- 面向對象程序設計及C++(第3版)