Utilizing the accelerometer

Most mobile devices now have an accelerometer embedded in them. This is the electronic component in a tablet or smartphone that enables applications and games to determine at what angle the device is being held. Typically, the mobile device's operating system will use the accelerometer to rotate the screen to display content in either portrait or landscape mode. However, game developers can access this positioning information and use it to allow players to control the action within their games!

Note that the rest of Time for action sections in this chapter apply to both iOS and Android devices, and will work on all the supported development platforms. However, if the mobile device being used for testing does not support the feature being tested, it will not work on that device!

Note

iOS developers should ensure that, if using the download file provided on the Packt Publishing website, a valid provisioning profile and certificate should be specified in Stencyl's Settings dialog box.

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

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