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

Graphics APIs provided by the Marmalade SDK


Now that we are familiar with resource management, we can get on to the more interesting task of showing a picture on the display.

Marmalade spoils us by providing several different ways in which we can draw graphics on the screen. The following sections provide an overview of the different options available to us.

The s3eSurface API

The lowest level of display access is the s3eSurface API. This provides access to the display by using a memory pointer that you can then use to directly read or alter pixels.

You can discover the width and height of the display in pixels and also the pitch, which is the number of bytes that you need to skip through memory to get to the next row of the display image.

The pitch is affected by the pixel format of the display (16-, 24-, or 32-bit displays are all possible) and often extra padding bytes are also added to allow each row to begin on a word-aligned memory address, which can improve display memory access times...