万本电子书0元读

万本电子书0元读

顶部广告

Building Android Games with Cocos2d-x电子书

售       价:¥

3人正在读 | 0人评论 9.8

作       者:Raydelto Hernandez

出  版  社:Packt Publishing

出版时间:2015-03-30

字       数:38.3万

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

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

为你推荐

  • 读书简介
  • 目录
  • 累计评论(0条)
  • 读书简介
  • 目录
  • 累计评论(0条)
If you have a basic understanding of the C++ programming language and want to create videogames for the Android platform, then this technology and book is ideal for you.
目录展开

Building Android Games with Cocos2d-x

Table of Contents

Building Android Games with Cocos2d-x

Credits

Foreword

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

Errata

Piracy

Questions

1. Setting Up Your Development Environment

Cocos2d-x overview

Setting up Java

Setting up the Android SDK

Downloading the Android SDK

Downloading Eclipse

Setting up the Eclipse ADT plugin

Setting up the Android Native Development Kit

Setting up Apache Ant

Setting up Python

Setting up Cocos2d-x

Creating your first project

Setting up the Eclipse IDE

Template code walk-through

Java classes

Android application configuration

C++ classes

Scenes

Summary

2. Graphics

Creating scenes

Understanding Layers

Using the director

Pausing the game

Organizing our resources files

Creating our pause scene header file

Creating the pause scene implementation file

Transitions

Understanding nodes

Understanding sprites

Creating sprites

Positioning sprites

Setting anchor points

Understanding the Cocos2d-x coordinate system

Adding sprites to the scene

Positioning sprites outside the visible area

Positioning the player sprite

Understanding actions

Moving sprites

Creating sequences

Animating sprites

Improving performance with sprite sheets

Game menus

Handling multiple screen resolutions

Putting everything together

Summary

3. Understanding Game Physics

Setting up the physics world

Collision detection

Handling gravity

Handling physics properties

Applying velocity

Linear damping

Applying force

Applying impulse

Applying torque

Putting everything together

Summary

4. User Input

Understanding the Event Dispatcher mechanism

Handling the touch event

Handling multi-touch events

Handling accelerometer events

Keeping the screen alive

Handling the Android back key pressed event

Putting everything together

Summary

5. Handling Text and Fonts

Creating TrueType font labels

Creating our GameOverScene

Calling our GameOverScene when a player loses

Customizing the GameOverScene

Adding label effects

Creating system fonts

Creating bitmap font labels

Adding more bombs to our game

Putting everything together

Summary

6. Audio

Playing background music and sound effects

Modifying audio properties

Handling audio when leaving the game

The new audio engine

New features included in the new audio engine

Adding a mute button to our game

Putting everything together

Summary

7. Creating Particle Systems

Creating collections of the Cocos2d-x objects

Exploding bombs

Adding particle systems to our game

Configuring the particle systems

Creating customized particle systems

Putting everything together

Summary

8. Adding Native Java Code

Understanding the Cocos2d-x structure for the Android platform

Understanding the JNI capabilities

Adding Java code to the Cocos2d-x game

Adding ads to the game by inserting Java code

Configuring the environment

Modifying the Android manifest

Adding the Java code

Putting everything together

Summary

Index

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

发表评论

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

买过这本书的人还买过

读了这本书的人还在读

回顶部