Mobile Game Design Essentials

By Dr. Claudio Scolastici , David Nolte
    What do you get with a Packt Subscription?

  • Instant access to this title and 7,500+ eBooks & Videos
  • Constantly updated with 100+ new titles each month
  • Breadth and depth in over 1,000+ technologies
  1. Free Chapter
    Operating Systems – Mobile and Otherwise
About this book

The videogame industry is not affected by the economic crisis as the market expands each year. In addition to that, the mobile market offers the opportunity to small teams with limited budgets to create successful games that can compete with the big companies. This is a guide to help you take a share of this huge market.

Mobile Game Design Essentials will teach you how to develop professional quality games for mobile platforms. You will learn how to take advantage of devices and their built-in technologies. Get to know the best software and programming languages to create videogames from scratch and detailed tutorials to get your hands dirty with the common practices of game development.

Mobile Game Design Essentials introduces you to smartphones, their operating systems, and development environments. It describes in detail the roles required by an indie team of mobile developers, the most popular software to create graphics and audio for games, the most used programming languages, and the best game engines. It also provides several tutorials detailing efficient game development and prototyping.

Starting with a description of the mobile platforms and the roles to cover when building up your own indie team, Mobile Game Design Essentials then provides a description of the techniques and software used to create graphics and audio for games and the coding languages and development environments used by programmers. It also aims to acquaint you with the best practices of mobile game design and development, by addressing the importance of the prototype-test-polish cycle and the analysis of the distinctive aspects of mobile game design. Finally, it concludes with a step-by-step guide to create the presentation document for your next mobile game.

Mobile Game Design Essentials covers everything you need to know to get started in the mobile game industry; from collecting your team, recommendations on development software, to marketing and publication.

Publication date:
November 2013


Chapter 1. Operating Systems – Mobile and Otherwise

Developing games for mobile requires many decisions to be taken. Two very important ones concern the platform to develop your game for and the tools you are going to use.

Will your game be developed for a single platform or many? Which are the most popular operating systems of today's mobile phones? Which are the best tools to work with each of them?

In this chapter, we will describe what an operating system is and we will provide an introduction to the most important mobile operating systems (OS).

We will also introduce the reference tools and software to develop games for each mobile platform mentioned.

In this chapter, we will cover the following topics:

  • A general discussion on operating systems

  • Mobile operating systems

  • Android development

  • iOS development

  • Windows Phone development

  • Java ME development

  • BlackBerry development


Operating systems

An operating system (OS) is a collection of software that manages device hardware and provides common services, which allow programs to run on a device, be it a mobile phone or a personal computer.

The operating system acts as an intermediary between programs and the computer hardware, and thus, operating systems can be found on almost any device that contains a computer—from cellular phones and video game consoles to supercomputers and web servers.

The revolution of personal computers (PC) began with the introduction of BASIC and DOS Operating Systems. These operating systems ran on terminals composed of a case containing the main hardware, a monochromatic screen, and a keyboard. All these fit on a common desk, allowing computers to enter people's houses.

At that time, software used to run on magnetic tapes or on a number of 5'1/4" disks. The following image shows an old school PC of the early '80s:

The PC became an object of common use with the introduction of visual environments made of icons that could be processed with the use of a device called mouse. This solution turned operations into metaphors of real world actions: select and drag an icon to move a file, single-clicks to select contents, and double-clicks to open them.

The main advantage of this new approach to computing was that it didn't need an expert to use a computer for basic operations. Anyone could use a PC!

The evolution of visual interfaces led to touch interfaces, made possible with the introduction of screens that could process touch actions directly on the screens of the devices. This system allows users to use their fingers instead of the mouse of desktop PCs, thus triggering a revolution in user interfaces and user experience, as well as offering the possibility of developing devices, such as tablets and smartphones, that could handle the same basic operations available on a desktop PC on a smaller mobile device.

At present, the computing environment is dominated by a few operating systems. For mobile devices, there are iOS, Android, Windows Phone, Java ME, and BlackBerry. BREW and Bada, which used to be quite popular, are now out of the race.

Each OS has distinctive characteristics and a development story of its own. So before we start talking about mobile development, we will provide you with an overview on each one of them.


Mobile operating systems

  • Android: Android is the open source mobile OS (developed by Google and Open Handset Alliance and released in 2007) that powers smartphones of the last generation. The main manufacturers of such phones are Samsung, HTC, Sony, LG, and Motorola. Android-equipped devices were developed to be the competitors of the Apple iPhone; they share a similar touch interface and the same orientation towards the development of applications made by third party developers to meet any user's need. Apps can be downloaded from an online store called Google Play.

  • iOS: iOS is Apple's mobile OS used on the iPhone, iPod Touch, iPad, and AppleTV. Released in 2007, iOS is based on OSX, the operating system running on Mac PCs. Like OSX, it is closed source and proprietary to Apple devices. It uses the Cocoa Touch interface for use solely with touch screen technology. It shares the benefits of OSX's stability and rapid development, as well as the capability of easy porting between iOS and OSX.

  • Windows Phone: This is a proprietary OS developed by Microsoft. It replaced its predecessor Windows Mobile in 2010. The latest version (Windows Phone 8) has many common features and components with Windows 8 which facilitates moving apps between the two. It is possible to port Windows Phone games to iOS and Android using tools, libraries, and resources made available by Microsoft.

  • Java ME: Java ME is an open source, free-to-use OS, developed by Sun Microsystems. It is a trimmed-down version of Java so it can run on any Java-enabled device. It is very popular among developers due to its ease of use and that its games don't need porting to run on various devices. There is a vast community that supports Java with tools, code libraries, and instruction. Though not as popular in the US as it once was, it is still in use in Eurasia and South America.

  • BlackBerry: This is a proprietary OS developed by RIM for its line of smartphones that mainly aim at the enterprise market. Thanks to its peculiar instant messaging and push e-mail features, and to high level security protocols as well, BlackBerry smartphones are the devices of choice for people who need a reliable handset to support their business needs.


Android is a Linux-based operating system designed to run on touch-screen mobile devices, mainly smartphones and tablets.

Released around 2007, Android was initially developed by the Android Corporation. It was then acquired by Google, who founded a consortium of hardware, software, and telecommunication companies, named the Open Handset, to further support and develop this open source project.

Today, Android powers hundreds of millions of mobile devices all over the world. Numbers say that new Android phones are activated at the rate of one million per day!

The main factor that made Android a favorite for consumers is its open source approach. It can count on an enthusiastic community of passionate developers and hundreds of hardware, software, and carrier partners whose support make Android the fastest growing mobile operating system to date.

With such partners, Android is capable of continuously pushing the boundaries of mobile hardware and software forward, allowing developers to build any kind of applications that can take advantage of the latest mobile technologies, and to support users with many differentiated and powerful applications to expand the capabilities of their mobile devices.

The main drawback with Android is that, due to the high variety in the hardware it runs on, updates tend to be quite slow in reaching devices when compared to iOS. Porting Android to specific hardware is a time and resource consuming activity for manufacturers, with the result that newest devices are prioritized, leaving older ones behind.

On the other hand, the large community of Android enthusiasts can balance this bias, building and distributing their own modified versions of the OS with new features and updates, faster than the official manufacturers.

Android gives its developers a wide range of tools to take full advantage of the hardware capabilities of each device, both smartphones and tablets. For example, it allows having a user interface that automatically adapts to look its best on each device regardless of the screen size, by defining a common set of instructions for all shared form factors and a separate set which contains optimizations for each specific device.

Android UI is based on direct manipulation through touch inputs that resemble real world actions, such as swiping, tapping, and pinching. It also takes full advantage of internal hardware, such as accelerometers, gyroscopes, and proximity sensors, to further improve the experience.

Google Play and Amazon Appstore

Google Play is the premier marketplace to sell and distribute Android apps, and has been used to download more than 25 billion apps at the rate of 1.5 billion per month.

It gives complete freedom to its users to define when and what to publish, letting developers maintain full control with regard to the devices to develop for, the technology to use, and the target audience to address.

Users also have complete freedom to adopt any business model for their apps: priced, free, with in-app products or subscriptions, as well as defining pricing and supported currencies for transactions.

Google Play also helps its users to get visibility for their products, with weekly sales charts and rankings, thus allowing even more visibility.

The premier language to develop Android apps is Java, using the Android software development kit. Other tools are available as well, such as the Native Development Kit that allows applications to be built in C and C++. Cross platform mobile frameworks are available too, such as Phonegap, Titanium, or Rhomobile.

App development

When developing apps for Android, especially if you are new to Android development, it is recommended that you use the Eclipse Integrated Development Environment (IDE). It is the fastest way to get started and it offers several guide projects as well as tools integration to make the the developer's life as easy as possible.

The Eclipse IDE is an open source project that basically consists of a collection of plugins that integrate with the platform, to provide a wide range of features. Most of these plugins are written in Java.

Android Development Tools (ADT) is a plugin for the Eclipse IDE that is designed to provide a powerful, integrated environment in which to build Android applications.

The ADT plugin for Eclipse is provided with the Android SDK. The SDK is a collection of tools that allow developing, testing, and debugging applications developed for Android.

Though the premier code language for Eclipse is Java, Eclipse is a multi-language environment that allows other languages to be used as well.

If you are an eager C\C++ programmer and prefer to develop your games in native code language, then the NDK is a very helpful tool set that allows, for example, reusing already existing code libraries and possibly increasing performance. But such options have their costs. Generally speaking, native code on Android doesn't always produce a performance improvement, while it increases the app complexity. So, the decision whether to use the NDK or not should never be dictated by the assumption that "I simply prefer programming with C\C++".

Games for Android

When pondering the decision whether to develop a mobile game on Android, there are two types of device to take into consideration as reference models, based on their processor (CPU) and Graphic Processing Unit (GPU), the piece of hardware that specifically takes care of graphics on the display. As we write, there is the HTC Dream (or G1), the first Android powered phone, which is equipped with Half Video Graphics Array (HVGA) screens and average 500 MHz CPUs (low-end). The other model is the Nexus One, which is equipped with a Wide Video Graphics Array (WVGA) screen, a faster CPU, and a GPU that support OpenGL ES 2.0 hardware acceleration (high-end).

Since performance changes very much between the two groups, it is very important to carefully choose the target device for your game, because games that can scale between high and low end devices get, obviously, a broader audience.

What follows is a description about how a new Android project is started with Eclipse:

  1. First you need to create an Android Virtual Device (AVD).

  2. Navigate to Window | Android SDK | AVD Manger | New.

  3. You can leave all parameters with the current default settings, but if you plan to use multi-touch features, you need to work with Version 2.2 or higher.

  4. Click on Create AVD to create your virtual Android Virtual Device to work with.

Then you need to create a project.

  1. From the menu, navigate to New | Project and choose Android Project.

  2. The name of your game is set in the Application name: space, while classes are grouped in the Package name:.

  3. Again, set Android 2.2 as Build Target.

    It is then very important to flag the Create Activity: check. The activity is the class that is instantiated when starting application. It handles input (actions on touch screen), creates the window that displays the game, and other necessary activities.

  4. Click on Finish to create your application. Now you can run your newly created application.

  5. Right-click on the project and navigate to Run As | Android Application.

  6. Choose the Virtual Device you configured before and remember that you don't need to close its window once it has started—Eclipse launches the application you are working on inside the current running device, so it will save you some time having the Virtual Device already running!

These are the basic steps to create a new project and launch an application on a Virtual Device with Eclipse. The creation of a working app is beyond the scope of this preparatory chapter on the Android platform, but we will come back with more details in the later chapters of the book.

Eclipse versus Intellij

Eclipse is not the only possible choice to develop games for Android. Among the others, Intellij can be considered the main competitor of Eclipse, which mainly works with Java.

Eclipse offers a larger number of plugins and supports multiple coding languages, because it is easier to extend, compared to Intellij. When working on specific new technologies, it is very likely that if a plugin exists, it will be an Eclipse plugin.

On the other hand, when dealing with completion of code and assistance, Intellij is definitely better (and faster) than Eclipse. Especially for rookie developers, Intellij can give you a hand improving your code and offers a friendlier user interface. The learning curve is smoother and developing with Intellij generally feels easier and more natural.

From a performance point of view, Eclipse works better than Intellij. Projects open faster and they are handled more efficiently, especially very large ones.

To make a general statement, Intellij is easier to use, thanks to a more user friendly user interface, while Eclipse is more versatile, thanks to a larger number of available plugins and a stronger community behind it.

A last thing to consider: Intellij provides a full functional 30 day trial version, and then a license is required for commercial purposes, while Eclipse is an open source project and thus, its license is totally cost free.


iOS is a mobile operating system developed by Apple. It was released in 2007 for the iPhone and the iPod Touch, and then was extended to support the iPad. It is Apple's specific policy that the iOS cannot be installed on non-Apple devices.

With around 25 million devices sold in the last quarter of 2012 (falling from 35 million in Q2) and more than 250 million of total units sold, the iOS that powers the iPhone (the iPad and iPod as well) is, together with Android, the best target platform for those who intend to develop mobile games.

The Apple Store, the distribution platform where iPhone apps can be downloaded, hosts more than 700,000 applications and downloads have been counted in the order of more than 30 billion.

The direct manipulation of icons using multi-touch gestures is the basic concept behind the iOS user interface and a trademark of mobile devices developed by Apple. Regardless of many attempts to imitate its distinctive user experience by other manufacturers, the iPhone must be acknowledged as the device that offers the best UI\UX in the entire smartphone market.

The interface elements are sliders, switches, and buttons. The interaction is via actions, such as swiping, tapping, and pinching, with each of these actions having a meaning in the Apple iOS environment.

Applications also make use of the sensors and other features, such as the accelerometer, to obtain effects, such as shaking the device to undo the last action or rotating it to switch between portrait and landscape modes.

iOS is Apple's mobile version of the OS X operating system used on Apple computers, but not many people know that the OS X operating system is Unix based.

Apple tends to be a company with a strong bottom-up control policy on their devices. A positive consequence is that updates of the iOS platform are released methodically and developers are informed when updates will be coming, in order to plan accordingly and be sure that their newly developed apps will keep working and will be stable on the new platform.

Together with the fact that all iOS devices are built by the same manufacturer, there is no need for multiple tests on many different devices for newly developed apps, as can be the case for example, when developing software for Android or Java ME.

The App Store

When a new application is developed for the iOS, it can be distributed through the Apple Store. Developers are free to set any price above a minimum for their apps or games, of which, Apple takes 30 percent of the revenue, while the developers take 70 percent. In case the app is distributed for free, the only cost to the developer is the necessary membership fee needed to install newly created apps on physical devices.

To submit your game to the Apple Store, you first set its selling price, then you need a descriptive text for the game that will be found in the App Store, three icons (29x29, 57x57, and 512x512), a launch image that appears while the game is loading, one-four screenshots of your game, and the contract information. If the game is not rejected for some reason by Apple's full time reviewers, in around 10 to 15 days it will be available in the store (depending on the shipping date you provided for your game). Reasons that games are rejected can be, among others, that it contains pornography, it is considered malicious software, or it is not stable.

Development on iOS

Most consumers agree that iOS devices offer a better UI experience and its development tools are generally considered more user friendly.

This is a result of the importance Apple always gives to design and its distinctive focus on innovation and user experience. The down side of this approach is that Apple wields quite lot of control on what people can or cannot do with its devices.

The iOS is not an open environment in the first place. It puts excellent tools in the hands of developers, tools that generally allow making hard things as easy as possible, but the cost is that when working with iOS it can be frustrating being limited to Apple's features. When compared to Android or Java ME platforms, which are open source and thus, put total control in the hands of the developer, working with iOS may seem limited in some ways, as its approach is based on the assumption that "the platform developer knows better than you". In other words, if you need to achieve something that was not provided by the manufacturer, you need to struggle to bypass several constraints.

The iOS SDK is the software development kit used to make native applications for the iPhone and iPod touch, released in 2008 by Apple.

Though developers can make use of the SDK to build their own applications for the iPhone, loading an application onto the devices is only possible after paying an iPhone Developer Program fee, which costs $99 per year.

The no-cost alternative is to run apps in the iPhone simulator, which is provided with the SDK and runs your application in pretty much the same way as an actual iOS device. The simulator is quick to launch and debug, and is a very efficient tool to test both logic and interface of your apps or games. Touch gestures and sensor events can be simulated as well with the mouse. For testing multi-touch interactions well, you need to pay the fee.

All the necessary tools for the SDK are contained in a single installer package that is easy to download, though not very light (it is a single 4.5 GB file). Moreover, if a new update is available, you need to download and reinstall everything. It seems like the iOS SDK team doesn't believe in patches!

There are other barriers which may come into play when developing for the iOS. Unless you use specific cross platform tools, iOS apps require a Mac to be developed, which means that if you don't already have one, you may be forced to buy a Mac to develop with iOS. This can be a high entry cost since Macs generally are much more expensive than their PC equivalents. Naturally, a developer needs a computer to develop apps anyway, but for example, Android apps can be developed on Mac, PC, and Linux machines equally and without much effort.

Another crucial element when deciding whether to develop apps and games for the iOS, is the lack of a feature called garbage collection. Garbage collection means that the developer is not asked to learn the rules to manually manage the memory of the device when developing apps. With such a feature, a programmer is not required to specify which objects to de-allocate in order to free memory resources for other computing.

Garbage collection is a way to enhance the performance of an application and to drastically accelerate the development process. For this reason alone, most programmers would agree that the absence of such a feature in the iOS environment makes it preferable for beginners to develop apps for Android.


The development environment for iOS SDK is called Xcode (now distributed in its Version 4) and like iOS and OS X, it is written in objective-C.

Xcode contains all the necessary development tools made by Apple to build applications for OS X and iOS: a source code editor and a user interface editor.

Together with the Cocoa framework, it provides a very productive and easy-to-use development environment, powerful enough to develop the same kind of tools used by Apple to produce iOS.

For example, as you write code, Xcode finds mistakes in syntax and logic, highlights them, and also suggests fixes.

Workflow in the IDE is performed in a single window, so that all relevant info is available at once.

The UI editor, called the Interface Builder, permits specifying the details of the user interface and its connections to the logic and data of the app in a very intuitive graphical environment, and to work very closely with the source code editor to get from design to implementation as quickly as possible.

Using Xcode

To create a new project with Xcode, follow the given steps:

  1. Navigate to File | New Project. A dialog will appear, as shown in the following screenshot:

  2. Once a new project has been started, you need to name it and choose the device type for it to be built (generally iPhone).

  3. In the Company Identifier field, use a unique string. It will be used to generate a Bundle Identifier for your game.

Now a quick glimpse at the structure of the app, which, as we said, is written in Objective-C language.

There will be a main.m file that instantiates the App Controller, while objects are declared in header files (*.h).

All non-code files are held in a directory called Supporting Files, where you'll want to put images, text files, and other stuff.

The directory structure of your newly created project could look like this:

More on game developing for iOS will be seen in the later chapters about mobile engines. For now, this ends our trip in the iOS world.

Windows Phone

Windows Phone is the operating system developed by Microsoft for mobile devices and is the successor to its former Windows Mobile platform.

While Windows Mobile OS was mainly aimed at enterprises, with Windows Phone, Microsoft turned its attention to the consumer market, allowing easier access to third party services and development, and thus to indie mobile games development as well.

To further improve the usability of Windows Phone, Microsoft developed a new design language, called Modern Style UI, to create a new user interface and set minimum requirements for the hardware the new services run on.

To get to the widest audience and target the emerging Asian markets (China in primis), in 2012, Microsoft released an update to its OS, known as Tango, which lowered the requirements for devices to run Windows Phone, allowing the new OS to effectively run on lower-end hardware.

On February 2011, at a press event in London, Microsoft and Nokia CEOs announced a partnership between the two colossi for Windows Phone to become the primary operating system for Nokia smartphones, thus declaring Windows Phone as the third competitor in the smartphones OS market against Android and iOS.

The first Nokia phone models to run Windows Phone are the Lumia 800 and the Lumia 710.

By the end of 2012, Microsoft released the latest edition of its mobile platform, Windows Phone 8, that replaces the previous CE-based architecture with one based on the Windows NT kernel and several shared components with the new Windows 8 (developed for PCs and tablets), allowing applications to be easily ported between these two platforms.

As we said, Windows Phone features a new user interface named Modern Style UI. The main innovation of the new UI consists in Live Tiles that are displayed on the so-called Start Screen. Tiles are links to apps (contacts, web pages, and media items) that dynamically update their icons in real time, for example, showing the number of unread messages for an e-mail account or live updates for a weather app.

Another innovation is the organization of features into Hubs that allow content integration with popular social networks, such as Facebook, Windows Live, and Twitter, so that, for example, the Pictures hub shows photos made with the camera equipped on the phone. From the Hub, users can directly comment and like updates on their favorite social networks.

The main Hub for the interests of this book is, obviously, the Widows Phone Store!

Windows Phone Store

The Windows Phone Store (formerly, Windows Phone Marketplace) is the service provided by Microsoft to allow users to browse and download applications developed by third parties for their Windows Phone powered phones. The Modern Style UI presents a panoramic view, where users can browse items by categories, see featured items, and get details, such as ratings, reviews, screenshots, and pricing information.

The Windows Phone Store was launched in 2010 along with Windows Phone 7 and by 2012, it already offered more than 100,000 available apps.

To submit apps to the Windows Phone Store, an annual subscription fee of $99 is required, which offers an unlimited number of submissions on the Apps+Games section of the store.

Apps must be approved by Microsoft: a strict control is wielded on the contents in order to forbid pornography, promotion of violence, discrimination, hate, usage of drugs, and the like to be included in the applications available on the Windows Phone Store.

For apps that are sold on the store, Microsoft takes 30 percent of the revenue (70 percent goes to the developer). Developers are paid only if they reach a set sales figure, but above a revenue of $25k, the shares become 20 percent to Microsoft and 80 percent to the developer.

Developing apps with Windows Phone

Apps and games for Windows Phone can be designed with Visual Studio 2010, Standard and Express editions.

Windows Phone 8 offers full support for native C\C++ libraries, thus allowing easy porting of Windows programs to Windows Phone 8. This also allows developers to port iOS and Android applications, since much of their code can be maintained, thus widening the range of available apps for Windows Phone.

Desktop games designed for Windows 8 can also be easily ported, thanks to the full support Windows Phone offers to Direct X architectures, and HTML 5 can be used to develop apps as well, depending on the features needed by games and apps.

To specifically develop high performance games, XNA is the optimal IDE Microsoft offers to developers to include the best graphics and audio for your mobile games for Windows Phone.

There is also the Windows Phone SDK 8.0, which offers all the tools needed to develop games for Windows Phone: editors, software templates, and the Windows Phone Emulator 8 for testing your apps. The Windows Phone SDK provides a stand alone Visual Studio Express 2012 edition for Windows Phone or works as an add-on to Visual Studio 2012 Professional, Premium, or Ultimate editions.

Testing apps on Windows phone devices requires a developer's account and a registered testing device.

Remember that the development of Windows Phone 8 apps is supported only on 64-bit Windows 8 Pro or higher: Windows Phone apps cannot be developed on Windows 7, Windows Server 2008, and 2012.

Developing a game for Windows Phone with XNA

To create a new Windows Phone project, follow the steps shown:

  1. Navigate to File | New Project.

    A dialog window that lists several project templates appears as shown in the following screenshot:

    The dialog window contains the following project templates:

    • Windows Phone Game (4.0): This is a project for creating an XNA Framework 4.0 game application for Windows Phone.

    • Windows Phone Game Library (4.0): A project for creating an XNA Framework 4.0 game library for Windows Phone.

    • Windows Phone Silverlight and XNA Application: A project for creating a Windows Phone Silverlight Application capable of rendering graphics using the XNA Framework.

    • Content Pipeline Extension Library (4.0): A project for creating an XNA Framework 4.0 Content Pipeline Extension Library.

  2. Once Windows Phone Game (4.0) is selected, type a name for the project in the text box and click on OK.

    A new dialog appears which requires us to select the version of Windows Phone to target, as shown in the following screenshot:

  3. Select the Windows Phone OS version and click on OK.

The following screenshot shows the features contained in the new Windows Phone project:

The properties control several aspects of your current project. They include general application settings, debug settings, and additional project resources. The Project Designer can be used to modify the values of these properties.

Many tutorials on how to develop apps for Windows Phone can be found on the Internet. You can start your searches from

Java ME

Java ME is a platform designed for mobile devices and PDAs by Sun Microsystems.

Although it is not used on today's newest mobile platforms, such as iPhones and Android-powered smartphones, it is still very popular on low-end devices, such as the Nokia's Series 40, and in general, on several million devices worldwide that are Java enabled.

For the first decade of the 21st century, Java has been the most popular choice for game development, as it was identified as the most convenient and versatile platform to develop mobile games. It has been considered as a standard and was backed by all major mobile phones makers, and still most of the present day mobile phones are Java-enabled.

The reason why Java ME is so popular is that it is a free and open platform that keeps the development costs low and provides all the necessary flexibility, while support for developers is freely available.

Its highly portable nature, expressed by the sentence "write once, run anywhere", ensures that a game written having a specific handset in mind will work with all other handsets which are Java enabled as well.

Applications and games written with Java ME are stable and robust, allowing developers to create the best performing mobile apps.

Its programming environment is especially suitable for developing games, considering that Java ME apps can run both online and offline. And, in any case, Java ME is supported by most of today's smartphones.

The usual problems with mobile games development, that relate to screen size, memory availability, and app download size, can be effectively approached with Java ME, thanks to specific development frameworks that detect the device characteristics and provide enough flexibility so that the app itself can adjust.

Java ME is an industry-wide technology, with most manufacturers offering a range of devices that support it. Your Java ME game will not only have the opportunity to run on over one billion Nokia cell phones in use today, but it can also reach over three billion devices which are still in use all over the world!

Though Java ME is losing a significant share of the mobile phone market due to the proliferation of the iPhone, Android, and BlackBerry platforms, there are still several reasons to consider this technology, the most important being that development with Java ME is cheaper and easier, compared to the other platforms.

Even if it can be said that it is a dying platform for mobile apps, and games in particular, Java ME is still the prevalent supported platform in many parts of the world, especially India, Middle East, and Southeast Asia, which are, as we know, emerging and promising markets, as well as North Africa and South America, the latter being a very profitable market for mobile games, too.

Developing games with Java ME

Mobile devices powered by the Java ME platform implement a profile called Mobile Information Device Profile (MIPD). Profiles contain a configuration of a restricted number of Java libraries, a minimum amount of classes needed for the Java virtual machine to work.

The profile which is implemented on Java ME powered mobile phones is called Connected Limited Device Configuration (CLDC), and it provides the most basic libraries and virtual machine features to run a Java ME environment.

The CLDC, coupled with the MIPD, allows us to develop downloadable apps and games that run on a very large number of cell phones and PDAs.

The MIPD basically contains a GUI, a data storage API, and a basic gaming API that allow developers to build their own applications, called MIDlets.

The latest available MIPD version, the 3.0 specification approved on December 2009, includes several new features that enable Java ME developers to create sophisticated and compelling mobile applications.

The MIPD 3.0 extends the capabilities of Version 2.1 with the following features:

  • Enables multiple concurrent MIDlets

  • Enables MIDlets to run in background

  • Enables auto-launched MIDlets and screensavers

  • Enables inter MIDlet communication

  • Tightens specs to improve cross device interoperability

  • Improves the UI for applications

  • Better support for devices with larger displays

  • Enables richer and higher performance games

There are several different ways and tools to create MIDP applications: code can be written in a plain text editor, or one can use a more advanced IDE, such as NetBeans, IntelliJ (with bundled Java ME plugin), or Eclipse (with plugins, such as Eclipse ME).


NetBeans is an open source IDE to develop apps and games for Java ME-powered devices. Applications can be developed from a set of modular software components called modules and can be extended by third party developers. Among its features, it includes the Update Center module that allows users to download upgrades and new features into the running application, so that reinstalling an upgrade or a new release does not force the users to download the entire application again.

The latest released version of NetBeans is 7.2.

To create a new project with NetBeans, follow the given steps:

  1. Start the NetBeans IDE.

  2. Navigate to File | New Project.

    The New Project Wizard will open. Expand the Java category and select Java Application as shown in the following screenshot:

  3. Click on Next.

In the Name and Location page do the following (refer to the following screenshot):

  1. Name your project in the Project Name: field, such as HelloWorldApp.

  2. Leave the Use Dedicated Folder for Storing Libraries unchecked.

  3. In the Create Main Class field, type something like helloworldapp.HelloWorldApp.

  4. Click on Finish.

Your project is now ready to go.

The Project window contains a tree view of the components of the actual project, in particular, the source files and the libraries.

The Source Editor window contains a file called HelloWorldApp with code.

Use the Navigator window to navigate between elements related to the selected class.

No need to delve into further details here. The Web is full of good tutorials, if you are interested in improving your knowledge of the Java ME platform, starting with:


For the sake of completeness, we mention here the characteristics of the BlackBerry operating system. Though it doesn't offer the same commercial opportunities as iOS or Android-based phones, with about eight million devices worldwide, BlackBerry can be an interesting market niche, less competitive but not necessarily less remunerative than the iOS or Android markets. Studies state that the average revenue for a BlackBerry app is about $4000 per month, much higher than average revenues for the apps developed for iOS and Android.

Moreover, Reasearch In Motion (RIM) (the company behind BlackBerry devices) offers a guarantee that if a quality certified app doesn't make $10,000 in the first year, they will pay up the difference to the developers. No other platform owner company offers such a guarantee!

BlackBerry is a brand of smartphones and handheld devices developed by RIM. The main features of these devices are the ability to send and receive push e-mails and instant messages, while maintaining a high level security. That's what made BlackBerry an optimal choice for companies that provide their employees with smartphones for business use. They also share many features of other smartphones, including media players, Internet browsers, cameras, and obviously, gaming capabilities.

The OS used by BlackBerry devices is a proprietary environment developed by RIM and designed to take advantage of their distinctive input devices: the track wheel, the track ball, the track pad, and the QWERTY keyboard. The BlackBerry OS also provides support for Java MIPD 1.0 and 2.0 (refer to the Java ME section), thus allowing third party developers to create apps for this platform.

A developer must have an account with RIM and be digitally signed in order to guarantee his/her authorship.

There are several tools that can be used to develop games for BlackBerry, such as the open source project GamePlay, that don't require developers to learn entirely new skills to build apps for the platform.

With the BlackBerry 10 platform released in 2013, one can find many reasons to consider this option, having the BlackBerry Play Book tablets in mind!

The BlackBerry App World

The BlackBerry App World is the service provided by RIM to BlackBerry owners to browse and download apps for their devices. Launched in April 2009 and with fewer apps than the Apple Store or Google Play, the BlackBerry App World offers all fundamental services provided by its direct competitors: intuitive user interface to browse applications by category, the possibility of reinstalling already purchased apps, several flexible payment options, and a rating and review system for apps available for shopping.

Apps submitted to the App World must be approved by RIM and a fee of $200 is involved in the submission process, which covers 10 submissions. Note that the fee is refunded if the developer's account is not approved.

Developing games for BlackBerry

When getting to the game development for BlackBerry, there are two options available.

The first is to build native apps using the BlackBerry SDK and its C++ framework. The BlackBerry SDK is aimed at the newest devices equipped with OS 10 and to the BlackBerry tablet, known as the PlayBook. Being a framework for native apps, it guarantees better performances, thanks to the full integration with the specific APIs of the BlackBerry platform.

The other possibility is to use the Java SDK, or even better, the Java Plugin for Eclipse which extends the Eclipse development framework. The main advantage, for a developer, of using Java to create games for BlackBerry is that MIDlets (Java applications) can equally run on any device powered by OS 7 and on, thus widening the potential audience for their games.

Everyone interested in delving into the game development for BlackBerry can research on the Internet, starting from:



We have discussed what an operating system is and how it acts as the interface between the hardware and software of a computer or a handheld device.

We mentioned the general characteristics and evolution of the operating systems running on Personal Computers and examined in detail today's most popular mobile OS (Android, iOS, Windows Phone, Java ME, and BlackBerry).

We also provided the basic references to approach the development and distribution of apps and games for mobile platforms and gave a general description of the best tools to develop for each of them.

In the next chapter, we will discuss the working pipeline of a typical indie mobile team and provide a description of the main roles. We will also describe the tasks each role is accountable for, the most popular tools to accomplish these tasks, and provide information on the academic background expected for each role.

About the Authors
  • Dr. Claudio Scolastici

    Dr. Claudio Scolastici is a former researcher at the Department of Cognitive Sciences of the National Research Council of Rome. In 2002, he started working in the video game industry as a tester for Electronic Arts. After he graduated in General and Experimental Psychology with a specialization in Artificial Intelligence, he worked as a consultant game designer for Italian game developers such as SpinVector and Palzoun Game First. In 2012, he joined the No.One indie team to develop XX La Breccia, the first quality first person shooter ever made in Italy using the Unreal Engine. Today he authors tutorials on game development for Digital Tutors and Game Programming Italia, and acts as a game design consultant for indie developers and start-ups in Rome, where he currently resides.

    Browse publications by this author
  • David Nolte

    David Nolte graduated with a Bachelor of Fine Arts degree from the University of Hawaii, Manoa. He spent 15 years in the advertising industry in Honolulu, working his way from paste-up artist to print production manager. He then worked 23 years in the video game industry as a game designer and production manager. Most of that was time spent working on Tetris and its variants for a variety of platforms. He was the producer of Faceball 2000, the only real-time first person shooter released on the original Gameboy. It won best Gameboy Game of the Year award at the Consumer Electronics Show, 1991. He has over 20 published games to his credit on a variety of platforms.

    Browse publications by this author
Mobile Game Design Essentials
Unlock this book and the full library FREE for 7 days
Start now