售 价:¥
温馨提示:数字商品不支持退换货,不提供源文件,不支持导出打印
为你推荐
The Android Game Developer's Handbook
Table of Contents
The Android Game Developer's Handbook
Credits
About the Author
About the Reviewer
www.PacktPub.com
eBooks, discount offers, and more
Why subscribe?
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Errata
Piracy
Questions
1. Android Game Development
Android game development
Features and support
Challenges
User experience
Design constraints
A game is not just an application
Games versus applications
Life cycle of Android application and games
Performance of games and applications
Memory management of games and applications
Choosing the target device configuration
Game scale
Target audience
Feature requirement
Scope for portability
Best practices for making an Android game
Maintaining game quality
Minimalistic user interface
Supporting maximum resolutions
Supporting maximum devices
Background behavior
Interruption handling
Maintaining battery usage
Extended support for multiple visual quality
Introducing social networking and multiplayer
Summary
2. Introduction to Different Android Platforms
Exploring Android mobiles
Exploring Android tablets
Exploring Android televisions and STBs
Exploring Android consoles
Exploring Android watches
Development insights on Android mobiles
Development insights on Android tablets
Development insights on Android TV and STBs
UI and game design
Overscan
Development insights on Android consoles
Development insights on Android watches
Creating and setting up a wearable application
Including the correct libraries in the project
Hardware compatibility issues with Android versions
Platform-specific specialties
Android mobiles
Android tablets
Android televisions and STBs
Android consoles
Android watches
Summary
3. Different Android Development Tools
Android SDK
Android Development Tool
Android Virtual Device
Configuring AVD
Android Debug Bridge
Using adb on an Android device
Dalvik Debug Monitor Server
Other tools
Eclipse
Hierarchy Viewer
Draw 9-Patch
ProGuard
Asset optimization tools
Full asset optimization
Creating sprites
Tools for testing
Creating a test case
Setting up your test fixture
Adding test preconditions
Adding test methods to verify an activity
Performance profiling tools
Android Studio
Android project view
Memory and CPU monitor
Cross-platform tools
Cocos2d-x
Unity3D
Unreal Engine
PhoneGap
Corona
Titanium
Summary
4. Android Development Style and Standards in the Industry
The Android programming structure
Class formation
Call hierarchy
Game programming specifications
Gameplay programming
Graphics programming
Technical programming
Sound programming
Network programming
Game tool programming
Research and development programming
Technical design standards
Game analysis
Design pattern and flow diagram
Technical specification
Tools and other requirements
Resource analysis
Testing requirements
Scope analysis
Risk analysis
Change log
Game design standards
Game overview
Gameplay details
Game progression
Storyboard and game elements
Level design
Artificial intelligence
Art style
Technical reference
Change log
Other styles and standards
Different styles for different development engines
Different programming languages
Different work principles
Different target platforms
Industry best practices
Design standards
Programming standards
Testing standards
Summary
5. Understanding the Game Loop and Frame Rate
Introduction to the game loop
User input
Game update
State update
Rendering frames
Creating a sample game loop using the Android SDK
Game life cycle
Game update and user interface
Interrupt handling
General idea of a game state machine
The FPS system
Hardware dependency
Display or rendering
Memory load/unload operations
Heap memory
Stack memory
Register memory
ROM
Logical operations
Balance between performance and memory
Controlling FPS
Summary
6. Improving Performance of 2D/3D Games
2D game development constraints
2D art assets
Sets of 2D art assets
Same asset set for multiple resolutions
Number of assets drawn on screen
Use of font files
Sprite font
Bitmap font
TrueType font
2D rendering system
2D mapping
2D physics
Box2D
LiquidFun
Performance impact on games
2D collision detection
Rectangle collision
Rectangle and circle collision
Circle and circle collision
Performance comparison
3D game development constraints
Vertices and triangles
3D transformation matrix
3D object and polygon count
3D rendering system
3D mesh
Materials, shaders, and textures
Textures
Shaders
Materials
Collision detection
Primitive colliders
Mesh colliders
Ray casting
Concept of "world"
Elements of the game world
Light sources in the game world
Cameras in the game world
The rendering pipeline in Android
The 2D rendering pipeline
The 3D rendering pipeline
Optimizing 2D assets
Size optimization
Data optimization
Process optimization
Optimizing 3D assets
Limiting the polygon count
Model optimization
Common game development mistakes
Use of non-optimized images
Use of full utility third-party libraries
Use of unmanaged networking connections
Using substandard programming
Taking a shortcut
2D/3D performance comparison
Different look and feel
3D processing is way heavier than 2D processing
Device configuration
Processor
RAM
GPU
Display quality
Battery capacity
Summary
7. Working with Shaders
Introduction to shaders
What is a shader?
Necessity of shaders
Scope of shaders
How shaders work
Types of shaders
Pixel shaders
Vertex shaders
Geometry shaders
Tessellation shaders
Android library shaders
Writing custom shaders
Shaders through OpenGL
Use of shaders in games
Shaders in a 2D game space
Shaders in a 3D game space
Summary
8. Performance and Memory Optimization
Fields of optimization in Android games
Resource optimization
Art optimization
Sound optimization
Data file optimization
Design optimization
Game design optimization
Technical design optimization
Memory optimization
Don't create unnecessary objects during runtime
Use primitive data types as far as possible
Don't use unmanaged static objects
Don't create unnecessary classes or interfaces
Use the minimum possible abstraction
Keep a check on services
Optimize bitmaps
Release unnecessary memory blocks
Use external tools such as zipalign and ProGuard
Performance optimization
Using minimum objects possible per task
Using minimum floating points
Using fewer abstraction layers
Using enhanced loops wherever possible
Avoid getter/setters of variables for internal use
Use static final for constants
Using minimum possible inner classes
Relationship between performance and memory management
Memory management in Android
Shared application memory
Memory allocation and deallocation
Application memory distribution
Processing segments in Android
Application priority
Active process
Visible process
Active services
Background process
Void process
Application services
Service life cycle
Resource processing
Drawable resources
Layout resources
Color resources
Menu resources
Tween animation resources
Other resources
Different memory segments
Stack memory
Heap memory
Register memory
Importance of memory optimization
Optimizing overall performance
Choosing the base resolution
Defining the portability range
Program structure
Managing the database
Managing the network connection
Increasing the frame rate
Importance of performance optimization
Common optimization mistakes
Programming mistakes
Design mistakes
Wrong game data structure
Using game services incorrectly
Best optimization practices
Design constraints
Development optimization
Data structure model
Asset-using techniques
Art assets
Audio assets
Other assets
Handling cache data
Summary
9. Testing Code and Debugging
Android AVDs
Name of the AVD
AVD resolution
AVD display size
Android version API level
Android target version
CPU architecture
RAM amount
Hardware input options
Other options
Extended AVD settings
Android DDMS
Connecting an Android device filesystem
Profiling methods
Thread information monitoring
Heap information monitoring
Tracking memory allocation
Monitoring and managing network traffic
Tracking log information using Logcat
Emulating device operations
Android device testing and debugging
Device testing
Prototype testing
Full or complete testing
Regression testing
Release testing or run testing
Device debugging
Use of breakpoints
Monitoring the memory footprint
Checking log messages
Dalvik message log
ART message log
Checking heap updates
Tracking memory allocation
Checking overall memory usage
Private RAM
Proportional set size (PSS)
Tracking memory leaks
Strategic placement of different debug statements
Memory allocation
Tracking the object state at runtime
Checking the program flow
Tracking object values
Exception handling in Android games
Syntax
Scope
Null pointer exceptions
Index out of bound exceptions
Arithmetic exceptions
Input/output exceptions
Network exceptions
Custom exceptions
Debugging for Android while working with cross-platform engines
Best testing practices
Tools and APIs
Testing techniques
Local test
Instrumented test
Summary
10. Scope for Android in VR Games
Understanding VR
Evolution of VR
Modern VR systems
Use of VR
Video games
Education and learning
Architectural design
Fine arts
Urban design
Motion pictures
Medical therapy
VR in Android games
History of Android VR games
Technical specifications
Current Android VR game industry
Future of Android in VR
Google Daydream
Game development for VR devices
VR game design
VR target audience
VR game development constraints
Introduction to the Cardboard SDK
Cardboard headset components
Cardboard application working principle
Upgrades and variations
Basic guide to develop games with the Cardboard SDK
Launching and exiting the VR game
Hitting the Back button
Hitting the Home button
VR device adaptation
Display properties
In-game components
Game controls
Control concepts
Types of controls
Fuse button
Visual countdown
Fuse button indication
Control placement
VR game development through Google VR
Google VR using the Android SDK
Google VR using Android NDK
Android VR development best practices
Draw call limitations
Triangle count limitations
Keeping a steady FPS
Overcoming overheating problems
Better audio experience
Setting up proper project settings
Using a proper test environment
Challenges with the Android VR game market
Low target audience
Limited game genres
Long game sessions
Limited device support
Real-time constraints
Expanded VR gaming concepts and development
Summary
11. Android Game Development Using C++ and OpenGL
Introduction to the Android NDK
How the NDK works
Native shared library
Native static library
Build dependency
Android SDK
C++ compiler
Python
Gradle
Cygwin
Java
Native project build configuration
Android.mk configuration
Application.mk configuration
C++ for games – pros and cons
Advantages of using C++
Universal game programming language
Cross-platform portability
Faster execution
CPU architecture support
Disadvantages of using C++
High program complexity
Platform-dependent compiler
Manual memory management
Conclusion
Native code performance
Rendering using OpenGL
OpenGL versions
OpenGL 1.x
OpenGL 2.0
OpenGL 3.0
OpenGL 3.1
Detecting and setting the OpenGL version
Texture compression and OpenGL
ATC
PVRTC
DXTC
OpenGL manifest configuration
Choosing the target OpenGL ES version
Performance
Texture support
Device support
Rendering feature
Programming comfort
Different CPU architecture support
Available CPU architectures
ARM
x86
Neon
MIPS
Advantages and disadvantages of integrating multiple architecture support
Summary
12. Polishing Android Games
Requirements for polishing
Development polishing
Memory optimization
Performance optimization
Portability
Art polishing
UI polishing
Animation polishing
Marketing graphics
Design polishing
Designing UX
Polishing the game flow
Polishing the metagame
Game economy balance
Game difficulty balance
Play testing
User gameplay difficulty levels
User actions during gameplay
User actions while browsing the game
Whether the user is paying or not
Whether the game is running smoothly
Whether the user can adopt the gameplay
User retention
Taking care of the UX
Visual effects
Sound effects
Theme music
SFXs
Transaction effects
Action feedback
Android-specific polishing
Optimum use of hardware buttons
Sticking to basic Android features and functionalities
Longer background running
Following Google guidelines for Play Store efficiency
Game portability
Support for various screen sizes
Support for multiple resolutions
Support for multiple hardware configurations
Summary
13. Third-Party Integration, Monetization, and Services
Google Play Services
Google Analytics
Significance
Integration tips
Best utilization
Google IAB
The Google IAB model
Consumable items
Non-consumable items
Subscriptions
Integrating Google IAB
Advantages and disadvantages of Google IAB
Google Leaderboard
Significance
Integrating Google Leaderboard
Variety of leaderboards
Social Leaderboard
Public Leaderboard
Options for storing and displaying leaderboards
Push notifications
Database
Server
Target device
GCM service
Workflow of the push notification system using GCM
Integrating push notifications
Application integration
GCM setup
Server setup
Significance of push notifications
User retention
User control
Knowing user behavior
Alternative communication channel
Multiplayer implementation
Real-time multiplayer
Turn-based multiplayer
Single-screen real-time multiplayer
Pass and play turn-based multiplayer
Local network multiplayer
Analytic tools
Requirement of analytics tools
User behavior
Game crash reports
Game event triggers
Gameplay session timing
Gameplay frequency
Game balancing
User retention
Piracy prevention
Monetization aspects of analytic tools
Identify popular regions of the game
Identify a user's likes and dislikes
Validate and improve the metagame
Track paying users
Track and count advertisement display
Some useful analytic tools
Flurry
GameAnalytics
Crashlytics
AppsFlyer
Apsalar
Mixpanel
Localytics
Appcelerator
Android in-app purchase integration
What are in-app purchases?
In-app purchase options
Store billing services
Amazon billing services
ResponseReceiver
PurchasingService
PurchasingListener
Career billing services
Types of in-app purchases
Consumable items
Non-consumable items
Subscriptions
Android in-game advertisements
Requirement for advertisements
Terminologies in advertisement monetization
eCPM
CPC/CPA
CPI
RPM
Fillrate
Types of advertisements
Banner advertisements
Interstitial advertisements
Integration best practice
Video advertisements
Full length ads
Short length ads
In-game dynamic advertisements
Monetization techniques
Premium model
Free model
Freemium model
Try-and-buy model
Planning game revenue
Revenue versus profit
Revenue sources
Advertisement revenue
In-app purchase revenue
Other revenue sources
Regional variations of revenue plan
User base variations
User behavior variations
User acquisition techniques
Game promotion channels
YouTube channels
Android forums
Sports forums
Facebook promotion
Twitter and other social platforms
Game blogs and forum discussions
Paid user acquisition
Other techniques
User retention techniques
Daily bonus
Leaderboards and achievements
Offerwall Integration
Push notifications
Frequent updates
Featuring Android games
Creativity and uniqueness
User reviews and ratings
Download count
Revenue amount
Publishing Android games
Self publishing
Publishing through publishers
Summary
Index
买过这本书的人还买过
读了这本书的人还在读
同类图书排行榜