万本电子书0元读

万本电子书0元读

顶部广告

Marmalade SDK Mobile Game Development Essentials电子书

售       价:¥

0人正在读 | 0人评论 9.8

作       者:Sean Scaplehorn

出  版  社:Packt Publishing

出版时间:2012-11-15

字       数:361.8万

所属分类: 进口书 > 外文原版书 > 电脑/网络

温馨提示:数字商品不支持退换货,不提供源文件,不支持导出打印

为你推荐

  • 读书简介
  • 目录
  • 累计评论(0条)
  • 读书简介
  • 目录
  • 累计评论(0条)
A practical tutorial that's easy to follow with lots of tips, examples and diagrams, including a full game project that grows with each chapter,This book targets Professional and Indie game developers who want to develop games quickly and easily to run across a huge range of smartphones and tablets. You are expected to have some experience writing games using C++ on other platforms. Its aim is to show how to take your existing skills and apply them to writing games for mobile devices (including iOS and Android) by explaining the use of the Marmalade SDK,Familiarity with games and 3D graphics programming would be helpful. No knowledge of specific mobile SDKs such as iOS or Android is required.
目录展开

Marmalade SDK Mobile Game Development Essentials

Table of Contents

Marmalade SDK Mobile Game Development Essentials

Credits

About the Author

About the Reviewers

www.PacktPub.com

Support files, eBooks, discount offers and more

Why Subscribe?

Free Access for Packt account holders

Preface

What this book covers

What you need for this book

Who this book is for

Conventions

Reader feedback

Customer support

Downloading the example code

Downloading the color images of this book

Errata

Piracy

Questions

1. Getting Started with Marmalade

Installing the Marmalade SDK

Installing a development environment

Choosing your Marmalade license type

Downloading and installing Marmalade

Using the Marmalade Configuration Utility

Managing your Marmalade account and licenses

Viewing an overview of your account

Updating your profile information

Managing your licenses

Managing your user list

Creating a Marmalade project

Creating the "Hello World" project

The MKB file for the "Hello World" project

The source file for the "Hello World" project

Building the "Hello World" project

The build directory

The data directory

The app.config.txt file

The app.icf file

Building and running in the Windows simulator

Deploying a Marmalade project

Compiling the "Hello World" project for the ARM CPU

Deploying the "Hello World" project

Installing on Android devices


Installing on iOS devices

Installing on BlackBerry QNX devices

Installing on Bada devices

Summary

2. Resource Management and 2D Graphics Rendering

The Marmalade ITX file format

The CIwManaged class

Instantiating a class with the class factory

Parsing a class

Serializing a class

Resolving a class

The Marmalade resource manager

Adding IwResManager to a project

Specifying resources with a GROUP file

Loading groups and accessing resources

The CIwResource class

GROUP file serialization

Resource handlers

Graphics APIs provided by the Marmalade SDK

The s3eSurface API

The IwGL API and OpenGL ES

The Iw2D API

The IwGx API

Using IwGx to render 2D graphics

IwGx initialization and termination

Rendering a polygon

Materials and textures

Creating materials in code

Creating materials using an MTL file

Vertex streams

Color streams

UV streams

Drawing a polygon

Displaying the rendered image

Example code

The ITX project

The Graphics2D project

The Skiing project

The GameObject class

The ModeManager and Mode classes

Summary

3. User Input

Detecting key input

Initialization and update of key information

Detecting key state

Detecting key state changes using polling

Detecting key state changes using callbacks

Detecting character code input

Detecting character code input using polling

Detecting character code input using callbacks

Inputting strings

Detecting touch screen and pointer input

Determining available pointer functionality

Determining the type of pointer input

Determining the type of stylus input

Updating current pointer input status

Detecting single touch input

Detecting single touch input using polling

Detecting single touch input using callbacks

Detecting multi-touch input

Detecting multi-touch input using polling

Multi-touch input using callbacks

Recognizing gesture inputs

Detecting a swipe gesture

Detecting a pinch gesture

Detecting accelerometer input

Starting and stopping accelerometer input

Reading accelerometer input

Smoothing accelerometer input

Testing accelerometer input on the Windows simulator

Example code

The Gesture project

The Slide project

The Skiing project

Player rotation

The ModeTitle and ModeGameOver classes

The Camera class

The Input Manager classes

The SkierController class

Summary

4. 3D Graphics Rendering

A quick 3D graphics primer

Describing a 3D model

Specifying a model's vertex stream

Specifying a model's index stream

Specifying a model's color, UV, and normal streams

Performing 3D to 2D projection

Understanding matrices for 3D graphics

Converting between coordinate systems

Clipping planes

Lighting

Emissive lighting

Ambient lighting

Diffuse lighting

Specular lighting

Using IwGx to render 3D graphics

Preparing IwGx for 3D rendering

Setting lighting information

Model data for the cube

The view matrix

The model matrix

Rendering the model

Using a 3D modeling package to create model data

The Marmalade 3D exporter plugins

Installing the plugins

Exporting a model

The Blender plugin

Installing Blender and the exporter plugin

Exporting a model

The Marmalade 3D model datafile formats

The GROUP file

The MTL file

The GEO file

Loading and rendering an exported 3D model

Adding the IwGraphics API to a project

Loading and accessing an exported 3D model

Rendering an exported 3D model

Releasing 3D model data

Example code

The Cube project

The Cube2 project

The Skiing project

Migration to 3D

Addition of a collision detection system

Summary

5. Animating 3D Graphics

A quick 3D animation primer

Animating with model matrices

Animating by translation

Animating by rotation

Rotation using Euler angles

Rotation using axis-angle pairs

Rotation using quaternions

Animating by scaling

3D model animation

Using morph targets

Using boned animations

Using a 3D modeling package to create animation data

Exporting animations using the Marmalade 3D exporter plugins

Exporting animations using the Blender plugin

The Marmalade 3D animation file formats

The SKEL file

The SKIN file

The ANIM file

Loading and rendering an exported 3D animation

Adding the IwAnim API to a project

Loading and accessing a 3D animation

Playing back a 3D animation

Rendering a 3D animation

Exploring 3D animation further

Playing an animation backwards

Blending between animations

Detecting animation playback events

Optimizing animation playback

Playing sub-animations

Offset animations

Obtaining bone positions and rotations

Example code

The Flag project

The Skiing project

New gameplay features

Animations added

Summary

6. Implementing Fonts, User Interfaces, and Localization

Implementing fonts

Adding the IwGxFont API to a project

Creating a font resource

The GXFONT file format

Loading and accessing font resources

Drawing text using a font resource

Drawing text on screen

Text wrapping and justification

Changing font size at runtime

Optimizing drawing by preparing text

Implementing user interfaces

The IwUI API

The IwNUI API

Implementing our own user interface solution

Using a generic approach

Making good use of class inheritance

Implementing a data-driven system

Responding to user input events

Screen resolution and orientation

Adding template functionality

Localizing your project

Creating a text spreadsheet

Getting the text into the game

Comma-separated values files

Processing using a Python script

Selecting the correct language to use at runtime

Example code

The Font project

The UI project

The Skiing project

Summary

7. Adding Sound and Video

Multimedia support in Marmalade

The s3eAudio API

Starting audio playback

Pausing, resuming, and stopping playback

Changing volume

Other audio queries

End of track notification

The s3eSound API

Starting sound playback

Pausing, resuming, and stopping playback

Global sound settings

Sound notifications

The SoundEngine module

Adding the SoundEngine module to a project

Loading and accessing sound resources

Playing, stopping, and altering sound parameters

The s3eVideo API

Starting video playback

Determining video codec support

Pausing, resuming, and stopping video playback

End of video notification

Other video queries

Example code

The Sound project

The Video project

The Skiing project

Summary

8. Supporting a Wide Range of Devices

Accommodating a wide range of device types

Dealing with different screen resolutions

Using different resources for different screen resolutions

Checking device capabilities

Configuring your game using ICF file settings

Built-in ICF settings

Defining new ICF settings

Accessing ICF settings in code

Limiting ICF settings by platform and device

Creating multiple resource sets

Using build styles

Adding extra resource directories

Supported build style platforms

Specifying which build style to use

Using resource templates

Defining material templates

Defining image templates

Defining model templates

Defining animation templates

Defining GROUP file templates

Producing binary versions of resources

Compressing resources using the Derbh archiver

Creating a Derbh archive

Using a Derbh archive in code

The automatic Derbh method

Creating different deployment types

Specifying icons, application names, and other details

Specifying asset lists

Creating and using deployment types

Example code

The build styles project

The Skiing project

Summary

9. Adding Social Media and Other Online Services

Launching a web page in the device browser

Integrating with social media

Using Facebook

Creating a Facebook app

Creating a Facebook test user

Adding the s3eFacebook API to a Marmalade project

Checking for s3eFacebook support

Initialization and termination

Logging in and out of Facebook

Posting a message to a user's wall

Further s3eFacebook features

Using Twitter

Connecting to other types of online services

Supporting social gaming networks

Using Apple's Game Center

Using Scoreloop

Supporting in-app purchases

Adding in-app purchasing for iOS devices

Adding in-app purchasing for Android devices

Using advertising

Implementing iAd support for iOS devices

Using other advertising solutions

Example code

The Facebook project

The Skiing project

Summary

10. Extending Marmalade with the Extensions Development Kit (EDK)

Why is the EDK necessary?

Creating an extension for gyroscope input

Declaring the extension API

Making an extension for Windows

Creating a Windows extension

Implementing a Windows extension

Building a Windows extension

Making an Android extension

Installing the required software for Android development

Creating an Android extension

Implementing an Android extension

Building an Android extension

Making an iOS extension

Installing the required software for iOS development

Creating an iOS extension

Implementing an iOS extension

Building an iOS extension

Using the Gyroscope extension

Example code

The Gyroscope project

The GyroTest project

The Skiing project

Summary

Index

累计评论(0条) 0个书友正在讨论这本书 发表评论

发表评论

发表评论,分享你的想法吧!

买过这本书的人还买过

读了这本书的人还在读

回顶部