Cocos2d-x Game Development Blueprints
图书信息
| 作者 | Karan Sequeira |
| 出版社 | Packt Publishing |
| ISBN | 9781783985272 |
| 出版时间 | 2015-07-27 |
| 字数 | 259.0万 |
| 分类 | 进口书,外文原版书,电脑,网络 |
读书简介
If you are a proficient Cocos2d game developer who wants to enhance his or her game development skill set using Cocos2d-x to build different types of games, this book is for you.
目录
Cocos2d-x Game Development Blueprints
Table of Contents
Cocos2d-x Game Development Blueprints
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. A Colorful Start
An overview of ColourSmash
Setting up the environment for Cocos2d-html5
Creating a project in Cocos2d-html5
Getting acquainted with the project structure
Creating the first scene – the main menu
Moving on to the game world
Declaring and initializing the variables
Creating the background
Creating the tiles
Creating the Heads-Up Display
The countdown timer
Let's get touchy...
The core gameplay
Finding the tiles
Removing the tiles
Finding and shifting tiles from above
Adding new tiles
Adding score and bonus
Updating the timer
Summary
2. How to Fly a Dragon!
Getting to know sprite sheets
Creating a lively menu screen
Creating a fairy tale
Building an infinitely long castle in 20 lines of code
Adding the stars
Setting things into motion
On to the game world
The core gameplay
Creating the dragon
Creating the towers
The update loop
Updating the dragon
Updating the towers
Collision detection
Flying the dragon
Farewell dear dragon
Saving a high score using LocalStorage
Let's make some HTML5 noise
Summary
3. Not Just a Space Game
An overview of SpaceCraze
Creating a project
Defining the global variables of the game
Creating your own Sprite
On to the game world...
The Player class
The Enemy class
The Brick class
Parsing the level file
Creating enemies
Creating bricks
Creating the player
Creating HUD elements
The start and stop functions
Moving the enemies
Fire the bullets!
The update function
Checking for collisions
Touch controls
Level complete and game over
Summary
4. Back to the Drawing Board
An introduction to Inverse Universe
The CCDrawNode class
Figuring out the geometry
Defining the elements of Inverse Universe
The Player class
The Enemy class
The PowerUp class
The Bomb class
The Blast class
The MissileLauncher class
The Missile class
The Shield class
Creating the game
The update loop
Adding tilt controls
Moving the player
Adding progression and difficulty levels
Summary
5. Let's Get Physical!
An overview of Jumpy Clown
The basics of Box2D
Creating the world
Using debug draw
Stepping into the world
Creating the GameObject class
Creating the walls
Creating the base
Creating the clown
Defining the clown's state machine
Creating the platform
Adding and removing platforms
Adding the controls
Listening for collisions
The Collectible class
Creating and reusing collectibles
The update loop
Summary
6. Creativity with Textures
An introduction to Penguins Can Fly
The Terrain class
Generating the striped texture
Drawing the stripes
Adding a gradient
Adding some highlight
Drawing the border
Adding some noise
Generating the hills
Generating the hill key points
Generating the curve of the hill
Creating the Box2D body for the hill
Rendering the hills
Updating the hill
The Penguin class
Updating the penguin
On to the game world
Summary
7. Old is Gold!
An introduction to Iceman
What is a tile-based game?
What is the Tiled Map Editor?
Creating a new tile map
Adding a tileset
Adding a tile layer
Adding an objects layer
Tile-based collision detection
The GameObject class
The Hero class
The Enemy class
Collisions with moving platforms and enemies
Summary
8. Box2D Meets RUBE
An introduction to Angry Fish
A brief introduction to RUBE
Creating bodies
Running the scene
Importing images
Creating a level with RUBE
Creating the catapult
Adding custom properties
Generating a world using data exported from RUBE
Defining the fish
The Fish class
The ShootingFish class
The SplittingFish class
The ExplodingFish class
Using Box2D's RayCast
The Cat class
The PostSolve function
Creating and spawning the fish
Creating a mouse joint
Summary
9. The Two Towers
Introduction to Pumpkin Defense
Defining the properties of the tower
Defining the properties of the enemy
Defining the XML file for a level
Designing the level in Tiled
The Tower class
The Lightning class
The Enemy class
Spawning waves of enemies
The GestureLayer class
Spawning the towers
Fast forwarding the gameplay
Summary
10. Cross-platform Building
Setting up the environment for Android
Java Development Kit 7+
The Android SDK
Eclipse or the ADT bundle
ADT plugin for Eclipse
Installing Cygwin for Windows
The Android NDK
Building Pumpkin Defense on Android
Creating an Android Virtual Device
Running Pumpkin Defense on Android
Setting up the environment for Windows Phone 8
Building Pumpkin Defense on Windows Phone 8
What to do next?
Summary
Index
- 求知文库:世界经典寓言(张潜)
- 我要做好孩子-导读版(黄蓓佳)
- 半城市化:农民进城策略研究(陈文琼)
- 孩子学口才的第一本书-修订版(寿长华编)
- 神秘超市(精装)(孙诗洋)
- 观文化.看政治-印度后殖民时代的电视.女性和国家([美]普尔尼马・曼克卡尔著,晋群译)
- 东方画谱辽宁省博物馆3东方画谱.馆藏精品选(文物出版社)
- 提高篇-聪明宝宝学前600字(风车文化)
