Reader small image

You're reading from  The Android Game Developer???s Handbook

Product typeBook
Published inAug 2016
Reading LevelBeginner
PublisherPackt
ISBN-139781785885860
Edition1st Edition
Languages
Right arrow
Author (1)
Avisekhar Roy
Avisekhar Roy
author image
Avisekhar Roy

Avisekhar Roy is a B.Tech engineer in computer science. He has had a passion for coding since his school days. However, he had no plans to become a game programmer. His fate landed him in the gaming industry in 2010. Since then, he fell in love with game development. Avisekhar has worked in many formats of game development environment, ranging from small companies and individual studios to corporate companies and full-scale game development studios. He recently started his own gaming start-up in 2016 and is currently working on games for the mobile platform. Avisekhar has also worked with some big companies, such as Reliance Games in India, as well as a small-scale studio called Nautilus Mobile. He is now trying to acquire a position in the gaming industry for his own venture, Funboat Games.
Read more about Avisekhar Roy

Right arrow

Chapter 4. Android Development Style and Standards in the Industry

There is no written rule or direction to write code in Android, other than the syntactical grammar. However, most developers across the globe follow a few fundamental styles and standards for writing Android code. Android is based on Java, so most of the stylization follows Java standards.

When it comes to Android game development, there are a few design styles that should be followed. They do not cover game design, rather more technical design. These kinds of styles and standards indicate a proper project structure, class structure, and folder/file management.

Typical game design also involves following some rules while working on the Android platform. A few styles are being followed in the industry in terms of game design.

In this chapter, we will have a look at these styles and standards through the following topics:

  • The Android programming structure

  • Game programming specifications

  • Technical design standards

  • Game design standards...

The Android programming structure


Android style or recommendation is not a definite programming rule. However, a good programming practice always includes a set of rules. To code in Android, the code structure follows the Android base structure and hierarchy.

Android typically follows the standards and style of Java. So, the Android programming structure is basically Java structure, which follows the OOP style.

Class formation

Java class formats should be consistent and follow the Javadoc rule; a standard structure should follow this sequence:

  1. Copyright information

  2. License information

  3. Package declaration

  4. Library imports

  5. Class description and purpose

  6. Class definition

  7. Global variables

  8. Constructor

  9. Methods

This is the copyright and license information format:

/*
* Copyright (C) <year> authority
* 
* <License information and other details>
*/

This is the class and method description format:

/*
* <Description>
* <Purpose>
*/

Call hierarchy

Like the coding style, there is no defined call...

Game programming specifications


Game programmers are not very different from any other software programmer. However, game programming requires stronger logical skill than software programming. The sense of game design is also different.

A game is an interactive entertainment system. A software or an application is meant to reduce a human calculative real-time task. So, it is clear that a game serves a very different purpose than a software or an application.

This is why game programming has to follow a few specifications and protocols.

Game programming can be divided into these following categories:

  • Gameplay programming

  • Graphics programming

  • Technical programming

Gameplay programming

This is the most relevant programming for the gaming division. Gameplay programming requires a strong logical, mathematical, and analytical skill. A sense of game design is also required. Gameplay programming includes AI, user control, physics, display control, and so on.

Gameplay programmers are the ones who deal with...

Technical design standards


Mostly, game development revolves around game design; however, the development process is controlled by technical design. Technical design considers each and every possible aspect of the real-time feasibility of the actual game design and requirements.

A technical design contains the following sections:

  • Game analysis

  • Design pattern and flow diagram

  • Technical specification

  • Tools and other requirements

  • Resource analysis

  • Testing requirements

  • Scope analysis

  • Risk analysis

  • Change log

Game analysis

This section of technical design analyzes the game design thoroughly and figures out the sections where technology plays a major role. Game play logic development is not a part of this section. However, when game logic requires hardware dependency, then this section is also considered in technical design.

Many developers and organizations have a habit of making a technical design document after creating the game design and before starting the actual development process. This helps define...

Game design standards


Game design is documented in almost every organization in the gaming industry. This is one of the standards used most often by almost all developers. Technical design is sometimes skipped to save some time, and some designers include the most required segments from a technical document in game design. However, this approach is not recommended.

A basic approach to maintain a standard game design contains the following sections:

  • Game overview

  • Gameplay details

  • Game progression

  • Storyboard and game elements

  • Level design

  • Artificial intelligence

  • Art style

  • Technical reference

  • Change log

Game overview

This section defines the nature of the game along with its target audience. This section contains a brief about the game concept, gameplay, and the look and feel. The working title is mentioned beforehand.

Game overview is basically the brief on almost all aspects of the game to be made. This section may project a market study to support the game concept and genre chosen for the game.

Gameplay...

Other styles and standards


The standard mentioned in the previous sections defines the general process of making a game. We will discuss a few of these processes that are used widely in the game development industry.

Most large-scale organizations follow a certain project management and tracking system. This may make the development process slower, but effective enough to minimize risk and improve game quality. A few small organizations or individual developers do not follow such processes in order to finalize the product as early as possible.

These styles are opposite to each other, and have different consequences. However, it is recommended that you follow a procedure that helps in the long run. A quick fix cannot be a permanent solution.

One more commonly used practice is patching code to resolve bugs. This is also extremely vulnerable to threats such as project crash, deadline failure, and creation of a major bug. In game development, the most common problem is a device crashing, which...

Different styles for different development engines


We have already discussed a few development tools and engines. The current gaming industry does not encourage the development of a game only for a specific hardware or operating platform. We can find a lot of games that are platform exclusive, but this implies a business decision.

It is quite obvious that the same development is not applicable on every development engine. For example, the development style in native Android will differ from the development style in the Unity3D game engine. The basic reasons are:

  • Different programming languages

  • Different work principles

  • Different target platforms

Different programming languages

Each and every programming language has its own style and structure of programming. Developing games with Android NDK through C++ is not the same as making games in Android SDK using Java. Developing games using third-party cross-platform engines is also different.

We are not talking about the syntactical difference here...

Industry best practices


Although there are plenty of styles and standards out there, most developers like to maintain some common standards to create stability in the game development procedure. Let's discuss some of these area of standards commonly practiced by the industry:

  • Design standards

  • Programming standards

  • Testing standards

Design standards

Design and concepts vary for every game. The best design standard practice is to make it properly documented along with scope for improvement. The document must be clear enough for the users to understand. No matter what the concept is, developers cannot implement it without a proper understanding of the standard.

The design scope must not be so widely open that it can change the entire game; this causes serious delay in production time. However, it should always have a limited scope to improve the production time over time with ideas.

Design must specify the target genre and audience along with a valid reason. This should also include probable target...

Summary


Any software development must follow a certain protocol and standard. Game development is not an exception. Following a standard helps the product sustain for a longer period of time. The modern age Android game life cycle includes many updates after launch, and in many cases the game sustains for years. For an organization, the same developer might not be working on the same game for a long period time, which is a very common scenario in the game industry.

The development project must be readable enough to be adopted by new developers and be flexible enough to accommodate new changes for updates to the game.

Finally, let's summarize the mandatory tasks, which are common in the Android game development industry. Game developers should follow the game development principles. First, they must create a proper game design document to make it easy for programmers and artists to understand clearly. Then, they should create a proper technical design document to supply all the possible technical...

lock icon
The rest of the chapter is locked
You have been reading a chapter from
The Android Game Developer???s Handbook
Published in: Aug 2016Publisher: PacktISBN-13: 9781785885860
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
undefined
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €14.99/month. Cancel anytime

Author (1)

author image
Avisekhar Roy

Avisekhar Roy is a B.Tech engineer in computer science. He has had a passion for coding since his school days. However, he had no plans to become a game programmer. His fate landed him in the gaming industry in 2010. Since then, he fell in love with game development. Avisekhar has worked in many formats of game development environment, ranging from small companies and individual studios to corporate companies and full-scale game development studios. He recently started his own gaming start-up in 2016 and is currently working on games for the mobile platform. Avisekhar has also worked with some big companies, such as Reliance Games in India, as well as a small-scale studio called Nautilus Mobile. He is now trying to acquire a position in the gaming industry for his own venture, Funboat Games.
Read more about Avisekhar Roy