万本电子书0元读

万本电子书0元读

顶部广告

Learning iPhone Game Development with Cocos2D 3.0电子书

售       价:¥

60人正在读 | 0人评论 9.8

作       者:Kirill Muzykov

出  版  社:Packt Publishing

出版时间:2014-06-25

字       数:176.3万

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

温馨提示:此类商品不支持退换货,不支持下载打印

为你推荐

  • 读书简介
  • 目录
  • 累计评论(0条)
  • 读书简介
  • 目录
  • 累计评论(0条)
This book is an easy-to-follow, step-by-step beginner's guide covering the full process of creating a game. It is packed with examples and illustrations, with comprehensive coverage of each topic. If you want to learn how to make games using the Cocos2D framework, this book is for you. If you would like to build a good foundation for a career in game development as an independent game developer or at a game studio, or if you just want to make games as a hobby, then you'll love this book. You should have some basic programming experience with Objective-C and Xcode. To run the code in this book, you will also need an Intel-based Macintosh running OS X Mountain Lion (or later).
目录展开

Learning iPhone Game Development with Cocos2D 3.0

Table of Contents

Learning iPhone Game Development with Cocos2D 3.0

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

Sections

Time for action – heading

What just happened?

Pop quiz – heading

Have a go hero – heading

Reader feedback

Customer support

Downloading the example code

Downloading the color images of this book

Errata

Piracy

Questions

1. All About Cocos2D

Game engines

So what is a game engine?

So what is this all about?

Why Cocos2D?

Cocos2D is easy

Cocos2D is free

Cocos2D is popular

Cocos2D is open source

Want more?

Games created with Cocos2D

BADLAND

Feed Me Oil 2

Lep's World 2

Other games

Summary

2. Hello Cocos2D

Starting with Xcode

Integrating Cocos2D with Xcode

Time for action – downloading and installing Cocos2D

What just happened?

Creating a Hello World project

Time for action – creating a new project from a template

What just happened?

Testing your projects on a device and simulator

Time for action – running the project on the simulator

What just happened?

Modifying the project

Time for action – creating a new scene

What just happened?

Time for action – displaying the world

What just happened?

Time for action – displaying the welcome label

What just happened?

Have a go hero

Reviewing Cocos2D distribution

Time for action – running tests

What just happened?

Pop quiz – hello quiz

Summary

3. Cocos2D – Under the Hood

Reviewing Cocos2D

Have Cocos2D your way

Rendering on the screen and the birth of CCNode

Organizing the game with CCScene

Children of CCNode

Back to real Cocos2D

Cocos2D game life cycle

Reviewing the AppDelegate class

Cocos2D configuration options

Further life of the game

Reviewing the CCDirector class

Pop quiz – under the hood

Summary

4. Rendering Sprites

Creating the game project

Time for action – creating the Cocohunt Xcode project

What just happened?

Time for action – creating GameScene

What just happened?

Adding sprites to your game

Time for action – adding the background sprite

What just happened?

Adding the background image to the Xcode project

Adding a background sprite to the GameScene

Time for action – adding the player character

What just happened?

Preparations step

Adding images to the hunter character

Adding the hunter object to our game scene

Time for action – fixing z-order

What just happened?

Adding more sprites and moving them

Time for action – adding birds

What just happened?

Time for action – making the bird move

What just happened?

Meeting the update: method

Reviewing bird movement in the update: method

Understanding debug FPS labels

Have a go hero

Spritesheets and animation

Time for action – creating a spritesheet

What just happened?

Time for action – modifying the game to use spritesheets

What just happened?

Changes in GameScene

Changes in the Hunter and Bird classes

Understanding spritesheet's limitations

Automatic batching

Time for action – animating the birds

What just happened?

Pop quiz – sprites

Summary

5. Starting the Action

Making the hunter aim and shoot

Time for action – handling touches

What just happened?

Time for action – aiming at the touch position

What just happened?

Time for action – shooting the arrow

What just happened?

Adding more birds to the GameScene class

Time for action – adding more birds

What just happened?

Time for action – detecting if the arrow hits the bird

What just happened?

Winning, losing, and other states

Time for action – using states for the bird's life cycle

What just happened?

Time for action – animating the shooting and limiting the shooting rate

What just happened?

Time for action – winning or losing the game

What just happened?

Improving the gameplay

Time for action – limiting the aiming range

What just happened?

Time for action – alternative control using a gyroscope

What just happened

Have a go hero

Pop quiz – geometry and actions

Summary

6. Rendering Text

The easy way – CCLabelTTF

Time for action – adding labels

What just happened?

Time for action – updating labels

What just happened?

Using bitmap fonts for better performance

Choosing a bitmap font generator

Time for action – creating a bitmap font using Glyph Designer

What just happened?

Using the bitmap font in the game

Time for action – adding hit points

What just happened?

Time for action – adding the win and lose labels

What just happened?

Have a go hero

Pop quiz – labels

Summary

7. Animations and Particle Systems

Using frame-based animation

Time for action – exploding coconut

What just happened?

Coconut explosion animation

Easing actions

Adding a splash screen

When to use frame-based animation

Animating using actions

Time for action – hitting the bird animation

What just happened?

Skeletal animation

Creating particle systems for advanced effects

Time for action – adding the feathers explosion

What just happened?

Time for action – adding a fire to the scene

What just happened?

Time for action – using Particle Designer

What just happened?

Have a go hero

Pop quiz – animations and particle systems

Summary

8. Adding Sound Effects and Music

Creating AudioManager and playing sound effects

Time for action – adding the AudioManager class

What just happened?

Time for action – finding and playing our first sound effect

What just happened?

Time for action – playing the remaining sound effects

What just happened?

Have a go hero

Music and background sounds

Time for action – adding background sounds

What just happened?

Time for action – adding music

What just happened?

Enhancing Cocohunt sound effects

Time for action – preloading sound effects

What just happened?

Time for action – playing a sound at position

What just happened?

Have a go hero

Pop quiz – playing audio

Summary

9. User Interface and Navigation

Using buttons

Time for action – adding menu buttons

What just happened?

Adding buttons

Using normalized coordinates

Replacing the currently running scene

Time for action – toggling sound and music

What just happened?

Time for action – storing settings in NSUserDefaults

What just happened?

Have a go hero

Navigating between scenes

Time for action – pushing AboutScene

What just happened?

Displaying AboutScene using the pushScene: method

Using 9-slice scaling on AboutScene

Creating rectangular multiline labels

Time for action – using more transitions

What just happened?

Time for action – using the scroll view to select levels

What just happened?

Have a go hero

Creating modal dialogs and using text input

Time for action – pausing the game with a pause dialog

What just happened?

Using a background image as a container for UI elements

Swallowing touches

Pausing and resuming the game

Time for action – restarting and exiting the game

What just happened?

Time for action – displaying stats when losing and winning

What just happened?

Entering and displaying highscores

Time for action – displaying highscores with CCTableView

What just happened?

Time for action – using the text field

What just happened?

Have a go hero

Pop quiz

Summary

10. Physics

Creating a physics world

Time for action – creating a game level with physics

What just happened?

Understanding physics bodies

Linking physics bodies with Cocos2D nodes

Time for action – adding ground to the scene

What just happened?

Have a go hero

Time for action – adding the hunter

What just happened?

Understanding the fixedUpdate: method

Time for action – fixing the hunter movement

What just happened?

Detecting and filtering collisions

Time for action – detecting and ignoring collisions

What just happened?

Sensors

Time for action – filtering collisions using a collision mask

What just happened?

Time for action – filtering collisions using collision groups

What just happened?

Applying forces and impulses and using joints

Time for action – launching stones

What just happened?

Impulses versus forces

Have a go hero

Time for action – adding angry birds

What just happened?

Creating the PhysicsBird class and giving it the stone

The PhysicsBird class – using joints and applying force

Have a go hero

Pop quiz – physics

Summary

11. Working with Tile Maps

Creating tile maps

Time for action – creating a tileset

What just happened?

Time for action – creating a tile map

What just happened?

Time for action – creating the Retina version of the tile map

What just happened?

Using the tile maps

Time for action – creating TilemapScene

What just happened?

Time for action – moving and following the bird

What just happened?

Time for action – using parallax scrolling

What just happened?

Have a go hero

Pop quiz – tile maps

Summary

A. Pop Quiz Answers

Chapter 2, Hello Cocos2D

Pop quiz – hello quiz

Chapter 3, Cocos2D – Under the Hood

Pop quiz – under the hood

Chapter 4, Rendering Sprites

Pop quiz – sprites

Chapter 5, Starting the Action

Pop quiz – geometry and actions

Chapter 6, Rendering Text

Pop quiz – labels

Chapter 7, Animations and Particle Systems

Pop quiz – animations and particle systems

Chapter 8, Adding Sound Effects and Music

Pop quiz – playing audio

Chapter 9, User Interface and Navigation

Pop quiz

Chapter 10, Physics

Pop quiz – physics

Chapter 11, Working with Tile Maps

Pop quiz – tile maps

Index

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

发表评论

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

买过这本书的人还买过

读了这本书的人还在读

回顶部