官术网_书友最值得收藏!

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
主站蜘蛛池模板: 阿坝县| 平山县| 曲松县| 安庆市| 观塘区| 东乌珠穆沁旗| 永登县| 托克逊县| 伽师县| 黄骅市| 遵化市| 巩留县| 赤水市| 武宣县| 简阳市| 邹平县| 台安县| 天津市| 广元市| 宜春市| 玉田县| 紫阳县| 汨罗市| 炉霍县| 文成县| 腾冲县| 抚顺市| 双桥区| 曲周县| 德清县| 安宁市| 台湾省| 扶余县| 登封市| 华阴市| 房产| 大洼县| 昌乐县| 鄂托克旗| 高密市| 于田县|