Cocos2d Game Development Blueprints

Design, develop, and create your own successful iOS games using the Cocos2d game engine

Cocos2d Game Development Blueprints

Blueprints
Jorge Jordán

Design, develop, and create your own successful iOS games using the Cocos2d game engine
$29.99
$49.99
RRP $29.99
RRP $49.99
eBook
Print + eBook

Instantly access this course right now and get the skills you need in 2016

With unlimited access to a constantly growing library of over 3,500 courses, a subscription to Mapt gives you everything you need to get that next promotion or to land that dream job. Cancel anytime.

+ Collection
Free Sample

Book Details

ISBN 139781783987887
Paperback440 pages

Book Description

Cocos2d is one of the most popular 2D game engines for the iOS platform. It is packed with powerful features that set it apart from other game engines. It can be used to build games, apps, and other cross-platform GUI-based interactive programs.

This practical guide will develop your skills in designing and developing iOS games across several genres. You will start with managing collisions through building a horizontal scroll game for both iPhone and iPad, you will then go through building a shooting game. After that, you will learn how to use the accelerometer to control movement, load particle systems such as explosions, draw primitives, and create parallax effects. We also cover essential elements of the Cocos2d package including sprite sheets, multiple image file loading to animate a sprite, building physics behavior with Chipmunk, using filters and listeners, and providing powerful AI, non-playable characters, and pathfinder algorithms with a cool tower defence game.

Table of Contents

Chapter 1: Sprites, Sounds, and Collisions
Creating a new Cocos2d project
Run Xcode Run
CCNode
Your first game – RunYetiRun
1-star challenge – accurate collision detection
2-star challenge – having three lives
Summary
Chapter 2: Explosions and UFOs
Handling the accelerometer input
Implementing the parallax effect in Cocos2d
Particle systems
Extending CCSprite
2-star challenge – create explosions
Drawing and coloring
1-star challenge – collision detection between Dr. Fringe and the UFO
Summary
Chapter 3: Your First Online Game
Getting started with our project
Initializing the game
Creating labels with CCLabelBMFont
CCActions in depth
Drag, drop, and scale
Game Center
Summary
Chapter 4: Beat All Your Enemies Up
Creating an iPad-only game
Developing virtual game controls
Moving the zombie
CCSpriteBatchNode
Texture atlases
Creating your first animation
3-star challenge – hitting the air
Creating the zombie class
Creating the human enemies class
Keeping the main character in view
Taking human decisions
Drawing a life bar
Detecting collisions with enemies
2-star challenge – enemies' life bar
Game over
Summary
Chapter 5: Scenes at the Highest Level
Initializing the game
Developing a tutorial for our game
Storing data using NSUserDefault
Loading data from external files
Transitions
3-star challenge – create a map scene
Summary
Chapter 6: Physics Behavior
Physics engines
Game physics in Cocos2d
Introducing Chipmunk
Creating your first physics
Creating sprites with physics
Defining shapes
Advanced collision detection with Chipmunk
Creating a snooker game with Chipmunk
Summary
Chapter 7: Jump and Run
Initializing the game
Configuring a varied scene
Scrolling the background and blocks
Coding custom physics
Adding a menu to the game
2-star challenge – adding pinecones to the scene
1-star challenge – adding a score label
Summary
Chapter 8: Defend the Tower
Initializing the game
Developing a pathfinding algorithm
Predefining defensive positions
Placing defenses
Giving AI to the defenses
Sharing information between nodes
Loading waves of enemies
2-star challenge – adding explosions
3-star challenge – upgrading defenses
Summary

What You Will Learn

  • Load and control sprites, labels, sounds, and geometrical primitives efficiently to build the core of a game
  • Simulate movement by implementing the parallax effect and running animations
  • Implement turn-based game logic including Game Center
  • Create both iPad-only and universal versions of your games
  • Control your game using touches, an accelerometer, or a virtual game pad
  • Build menus and tutorials and define some artificial intelligence to non-played characters

Authors

Table of Contents

Chapter 1: Sprites, Sounds, and Collisions
Creating a new Cocos2d project
Run Xcode Run
CCNode
Your first game – RunYetiRun
1-star challenge – accurate collision detection
2-star challenge – having three lives
Summary
Chapter 2: Explosions and UFOs
Handling the accelerometer input
Implementing the parallax effect in Cocos2d
Particle systems
Extending CCSprite
2-star challenge – create explosions
Drawing and coloring
1-star challenge – collision detection between Dr. Fringe and the UFO
Summary
Chapter 3: Your First Online Game
Getting started with our project
Initializing the game
Creating labels with CCLabelBMFont
CCActions in depth
Drag, drop, and scale
Game Center
Summary
Chapter 4: Beat All Your Enemies Up
Creating an iPad-only game
Developing virtual game controls
Moving the zombie
CCSpriteBatchNode
Texture atlases
Creating your first animation
3-star challenge – hitting the air
Creating the zombie class
Creating the human enemies class
Keeping the main character in view
Taking human decisions
Drawing a life bar
Detecting collisions with enemies
2-star challenge – enemies' life bar
Game over
Summary
Chapter 5: Scenes at the Highest Level
Initializing the game
Developing a tutorial for our game
Storing data using NSUserDefault
Loading data from external files
Transitions
3-star challenge – create a map scene
Summary
Chapter 6: Physics Behavior
Physics engines
Game physics in Cocos2d
Introducing Chipmunk
Creating your first physics
Creating sprites with physics
Defining shapes
Advanced collision detection with Chipmunk
Creating a snooker game with Chipmunk
Summary
Chapter 7: Jump and Run
Initializing the game
Configuring a varied scene
Scrolling the background and blocks
Coding custom physics
Adding a menu to the game
2-star challenge – adding pinecones to the scene
1-star challenge – adding a score label
Summary
Chapter 8: Defend the Tower
Initializing the game
Developing a pathfinding algorithm
Predefining defensive positions
Placing defenses
Giving AI to the defenses
Sharing information between nodes
Loading waves of enemies
2-star challenge – adding explosions
3-star challenge – upgrading defenses
Summary

Book Details

ISBN 139781783987887
Paperback440 pages
Read More

Read More Reviews