Time for action – testing on an Android device

A game file is not required for this session. We're going to create a blank game for our initial mobile test.

  1. Attach the Android device to the development PC using the appropriate USB cable.
  2. Open Stencyl and create a new game called Mobile Testing Android.
  3. Create a new scene called Test Scene, and set the Background color to Light Turquoise.
  4. In the main Stencyl toolbar, select Android in the target device drop-down box next to the Test Game button, as shown in the following screenshot:
    Time for action – testing on an Android device
  5. Ensure that Stencyl's Log Viewer window is open: View | Log Viewer in the main Stencyl menu.
  6. Click on Test Game.
  7. Follow any prompts to download and install the relevant software development kits (SDKs), which may be required if not already installed on the computer.
  8. After the installation of any required SDKs, there may be a prompt to restart Stencyl. So quit and restart Stencyl, load the Mobile Testing Android game, ensure the Log Viewer window is open, and test the game again.
  9. The compilation process can take several minutes, depending on the speed of the development computer. Be patient!
  10. When the compilation process has completed, Stencyl will display a Sending to Device… message, and shortly after this, the game (a blank blue screen) will appear on the mobile device!

What just happened?

We have created an empty test game with a colored background, and tested it on our Android device. We selected a colored background to help us determine if the game is being displayed correctly on the mobile device's screen; if we had selected a white or black background, it might not be very clear whether or not the game is running correctly. However, with the colored background, it is clear that our game is being displayed as expected.

The first time we attempt to test a game on a mobile device, Stencyl checks if the relevant SDKs have been installed. The two required SDKs are the Java Development Kit and the Android Development Kit, and Stencyl provides the relevant prompts and instructions where these are required. Some users may already have one or both of these kits installed on their development computer, so Stencyl will only prompt for installation if needed.

During the compilation process, a detailed log of events is displayed in the Log Viewer window, which can provide useful information in the event when something goes wrong.

Testing on an iOS device

As discussed earlier in this chapter, it is important to understand that creating games for iOS devices (even test games that will not appear in the Apple App Store) requires paid membership to Apple's iOS development program.

Also, prior to testing on an iOS device, it is important to ensure that the relevant certificates and provisioning profiles have been created, downloaded, and configured in advance; otherwise the compilation process will fail at the final stages. See the earlier section, Considering certification requirements, for further information.

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

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