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

A quick 3D animation primer


Let's start by looking at the ways in which animation of 3D models can be achieved.

Animating with model matrices

By far the simplest and most obvious way of animating a 3D model is to alter its position, orientation, and size. All three of these properties can be specified using the model matrix set at the time of rendering the model.

We could store a matrix in our game class, and for each frame multiply it by a second matrix representing the change in position, rotation, and scale; but this approach is generally not reliable. Over time the matrix starts to degrade due to the cumulative effect of precision errors in the multiplications and additions involved. The matrix will often end up becoming non-orthogonal (that is, its three axes are no longer at right angles to each other), which yields a shearing effect on the 3D model. The scale can also be affected by these precision errors, causing the 3D model to gradually shrink in size!

A far more reliable way is to...