Book Image

Marmalade SDK Mobile Game Development Essentials

By : Sean Scaplehorn
Book Image

Marmalade SDK Mobile Game Development Essentials

By: Sean Scaplehorn

Overview of this book

Modern mobile devices are capable of supporting video games of amazing quality but there are so many different devices and platforms how can you support them all? The answer is to use the Marmalade SDK to write your code once and deploy it to all popular mobile platforms at the touch of a button.Marmalade SDK Mobile Game Development Essentials will provide you with everything you need to know to transfer your existing C++ videogame programming knowledge to mobile devices. From graphics and sound to input methods and actual deployment to device, this book covers the lot.Learn how to make use of keys, touch screen and accelerometer inputs for controlling your game.Take the pain out of supporting a varied range of target devices, both across multiple platforms and multiple specifications.Step by step from "Hello World" to a complete game, this book will show how to use the Marmalade SDK to develop games for mobile devices.Learn how to make dazzling 2D and 3D games complete with fully animated characters, music and sound effects that can be deployed to all the leading mobile platforms, whilst ensuring it can run on a wide range of possible devices, from low specification to high end.If you want to join the exciting world of mobile videogames then Learning Mobile Game Development with Marmalade will show you how to do so, fast!
Table of Contents (17 chapters)
Marmalade SDK Mobile Game Development Essentials
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

The s3eSound API


If you want to add spot sound effects to your game, such as laser bolts and explosions, the s3eSound API is what you need to use. This API allows multiple sound samples to be played simultaneously at different volumes and pitch by mixing them together into a single output.

To make use of the s3eSound API, simply include the file s3eSound.h in your source code.

The API expects all sound effects to be supplied as uncompressed 16-bit signed PCM. File formats such as WAV are not supported by the API, so you must write your own code to load and extract the sample data from such files.

As you read through this section you may start to think that there's an awful lot to do in order to play some sound effects. While this may appear to be the case, s3eSound is actually a very low-level API and provides enough flexibility to allow you to code your own complex sound routines.

Later in this chapter we will be covering the SoundEngine module, which comes with Marmalade to provide a wrapper...