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 graphics primer


Before we get our hands dirty with rendering code, let's just touch on some of the basics of how 3D rendering can be achieved. If you already have a good handle of 3D rendering techniques then feel free to skip this section.

Describing a 3D model

In computer graphics a 3D representation of an object is often referred to as a model. When we build a model in three dimensions for use in a video game, we create a group of triangles that define the shape of the model. We can also use quadrilaterals to make the modeling process easier, but these ultimately get converted into two triangles when it comes to rendering time.

The simplest representation of a 3D model is therefore little more than a big list of vertices which define the triangles required to render the model, but we often specify a host of extra information so we can control exactly how the model should appear on screen.

Specifying a model's vertex stream

Every 3D model has a pivot point, also called its origin...