O'Reilly logo

Marmalade SDK Mobile Game Development Essentials by Sean Scaplehorn

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Creating an extension for gyroscope input

To illustrate the process of creating a Marmalade extension, we'll take a look at how to add support for gyroscope input. This is a useful addition since it lets us add a whole new input method to our games yet it also demonstrates just how easy it is to extend Marmalade's functionality.

Our extension will consist of the following functions:

Function

Description

GyroscopeAvailable

This function is automatically generated for us by the EDK build process. It returns S3E_TRUE if the Gyroscope extension is supported for the current platform, and S3E_FALSE if it isn't.

GyroscopeSupported

Not all mobile devices actually contain gyroscope hardware, so this function is provided to determine whether ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required