Chapter 10. Targeting Mobile Platforms

The mobile game market is growing dramatically. Although data does vary depending on the sources of information, the general consensus from analysts is that the mobile game market generated in the region of US $10 billion in revenue in 2012, and it is expected to be around double that amount by the end of 2016.

In the past, developing for mobile platforms, such as smartphones and tablet devices, required very specialist skills (each mobile platform has its own SDK (software development kit)), and special tools were required to create applications for each target platform. For example, developing for Apple's iOS operating system for iPad and iPhone required the developer to learn Objective-C (a unique variant of the popular C programming language), and Google's Android platform required different tools and another programming language called Java.

As a result of this mobile-platform diversification, developing games for mobile devices was more expensive and time-consuming than it should have been. Larger software houses were required to have teams developing for each platform, and the only option for independent developers was either to learn multiple programming languages or to find someone who could convert their game for them!

Stencyl alleviates this multiplatform problem by allowing us to develop games on a single platform, and to output those games to many different target platforms including mobile devices. We're going to learn how we can easily utilize some of the unique features of mobile devices to control games and provide feedback for our players.

In this chapter we will be:

  • Understanding testing versus publishing
  • Considering certification requirements
  • Examining platform differences
  • Testing on a mobile device
  • Utilizing the accelerometer
  • Implementing touch controls
  • Exploring additional mobile device features

Before proceeding, be aware that mobile device technologies and development techniques can change very rapidly. The information in this book was accurate at the time of publishing, but the Stencyl toolkit and its features may have been updated since publication, and the third-party organizations that have been referred to may have updated their tools and licensing requirements.

While Stencyl makes developing games for mobile devices very easy when compared to traditional coding requirements, the configuration processes required outside of Stencyl in order to provision mobile development on iOS devices are notoriously complex (testing on Android devices is much more straightforward). The purpose of this chapter is to provide guidance for creating mobile games with Stencyl, along with hands-on tutorials that will enable us to quickly implement the unique features of mobile devices, such as the accelerometer and touchscreen controls. Where appropriate, links to external resources, which will aid the developer in configuring their computer ready for mobile development, have been provided.

Note

For the latest information relating to mobile game development with Stencyl, and for the latest news relating to the features of the Stencyl development toolkit, please read the online help and also visit the official Stencyl forums at www.stencyl.com.

Let's start by looking at what we need, in order to start creating games for platforms other than Flash and HTML.

Understanding testing versus publishing

One of the most amazing features of the free version of Stencyl is that it enables developers to develop games for and to test games on all the supported platforms listed as follows:

  • Flash (desktop Player and web browser)
  • HTML5 (web browser)
  • Microsoft Windows (desktop)
  • Mac OS X (desktop)
  • Linux (desktop)
  • iOS (iPhone / iPad / iPod touch)
  • Android (tablets / smartphones)

For more details about the supported versions of each of the above platforms, please refer to Chapter 1, Introduction, and for the very latest information, visit www.stencyl.com.

Before we learn how to use the mobile development tools available to us in Stencyl, it's important to understand the difference between testing and publishing games.

Testing games with the free version of Stencyl

When we develop a game in Stencyl, we not only design and create the game, but we also test it. During the development of our Monkey Run game, we were testing it using the desktop Flash Player application. When we first installed Stencyl, the Flash Player was installed automatically, so that when we click on the Test Game button in Stencyl, the game is automatically compiled and then run in the Flash Player on the desktop. However, if we had access to the appropriate hardware, we could have tested our game on any of the available target platforms listed previously.

Note

Although unrelated to mobile development, it's also worth noting that when creating desktop applications, the target desktop platform is limited to that of the development platform. That is, Microsoft Windows desktop games can only be created on a Windows PC, Linux desktop games can only be created on a Linux PC, and Mac OS X games can only be created on a Mac.

When developing for mobile devices, the most practical way in which to test our games is to connect the mobile device to the desktop computer with the appropriate cable, so Stencyl can send the game directly to the device. The following table shows the mobile devices that we can test on with the free version of Stencyl:

Testing games with the free version of Stencyl

As shown in the previous table, the free version of Stencyl includes the ability to test games on iOS devices when developing on the MS Windows platform. However, this is, at the time of writing, an experimental feature with technical limitations.

Note

More information about this experimental feature can be found in Stencyl's online help at www.stencyl.com/help/view/testing-ios-windows.

Developers with an appropriate paid subscription version of Stencyl, running on Microsoft Windows, can create games for iOS devices using an online service called StencylBuilder. The Stencyl game file is automatically uploaded to Stencyl LLC's servers, and is compiled on a Mac. The developer can then download the target file for testing on an iOS device, or for publishing to the Apple App Store (both subject to membership of Apple's iOS Developer Program).

It's important to understand that in terms of mobile target platforms, there is a difference between testing Stencyl games and publishing them. When we test a mobile game using Stencyl, we compile the game and then run it on the target device, such as a smartphone or tablet, but we cannot publish the game for others to download and install on their mobile devices. However, the ability to run the game on the device enables us to ensure that the game works correctly — we'll see exactly what the players of our game can see, and we can modify or improve the game as required. This means that we can fully develop and test our game without paying for a subscription to Stencyl. We only need to part with our money when we are confident that our game works on the target platform, and we are then ready for publishing.

Publishing Stencyl games

When we publish to a mobile platform, we mean that the game is ready to be uploaded to the relevant app store; for Android, it is the Google Play Store, and for Apple, it is the App Store on iTunes.

Each of the above app stores has its own requirements for licensing, so be sure to read the relevant terms and conditions carefully before making a commitment to either organization. However, the most important consideration for many developers is cost.

In order to publish a Stencyl game for a mobile device, a premium Stencyl subscription is required. Stencyl's Mobile and Studio subscriptions include the facility to publish to the Google and Apple app stores, so one of these Stencyl subscriptions will be required. In addition, both Apple and Google charge a fee to join their developer programs.

Developer licensing for Google Android devices

Google's fee (currently a one-time US $25 payment) is only required for developers who wish to publish to the Google Play Store; neither a fee nor any kind of registration is required in order to develop, test, or distribute apps for Android devices. This means that we only need to pay Google if we wish to upload our games to the Google Play Store!

In practice, the vast majority of developers pay the one-off registration fee to Google, so that they can upload their apps and games to the Google Play Store and gain the widest possible exposure for their work. However, some developers do choose to distribute their apps and games from their own websites, and to manage customer payments using their own or a third-party system, or they simply give away their games and apps for free!

Developer licensing for Apple iOS devices

Apple's fee for developers wishing to join the iOS Developer Program is currently US $99 per year. Membership of the iOS Developer program is required for both testing games on an iOS device and for publishing to the Apple App Store on iTunes. Currently, there is no Apple-authorized method to bypass Apple's registration and licensing requirements.

Note

Be aware that membership of the iOS Developer Program is required to maintain apps in the Apple App Store. If a developer's annual membership lapses, any existing apps will no longer be available in the App Store for customers to download.

As discussed previously, the free version of Stencyl can be used to develop games and to test them on an iOS device. However, paid membership of the Apple Developer Program is a mandatory requirement.

Mobile game distribution costs

When using the Apple App Store or the Google Play Store to distribute games, the respective organization will charge an item fee for processing each sale. Currently, both Apple and Google charge a fee of 30 percent of the sale price of the game. They will take care of receiving payments from customers and will make the relevant payments to the developer, subject to the terms and conditions of the relevant developer agreement.

The Apple and Google app stores can also be used to distribute free games, in which case, there is no item processing fee.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.223.209.98