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

Loading and rendering an exported 3D animation


We're now in a position to start rendering a 3D animation, and as with rendering a static 3D model it's also surprisingly easy to do.

Adding the IwAnim API to a project

Before we can use Marmalade's animation functionality, we first need to add the IwAnim API to our project. This API builds on top of the IwGraphics API required for rendering static 3D models.

As with all such Marmalade APIs, we add support for IwAnim to a project by listing iwanim in the subprojects section of the MKB file. We must then call IwAnimInit after IwGraphicsInit has been called, and at shutdown time we need to call IwAnimTerminate.

Loading and accessing a 3D animation

The GROUP file format comes to our rescue once again in order to get animation data loaded into memory. The export process will have created a GROUP file for us already that will include the GEO, MTL, SKEL, and SKIN files, so we just need to add entries for the ANIM files that we want to use.

With everything...