Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Arrow up icon
GO TO TOP
Learning Cocos2d-x Game Development

You're reading from   Learning Cocos2d-x Game Development Learn cross-platform game development with Cocos2d-x

Arrow left icon
Product type Paperback
Published in Sep 2014
Publisher
ISBN-13 9781783988266
Length 266 pages
Edition 1st Edition
Arrow right icon
Author (1):
Arrow left icon
Siddharth Shekar Siddharth Shekar
Author Profile Icon Siddharth Shekar
Siddharth Shekar
Arrow right icon
View More author details
Toc

Table of Contents (19) Chapters Close

Learning Cocos2d-x Game Development
Credits
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
1. Getting Started FREE CHAPTER 2. Displaying the Hero and Controls 3. Enemies and Controls 4. Collision Detection and Scoring 5. HUD, Parallax Background, and the Pause Button 6. Animations 7. Particle Systems 8. Adding Main and Option Menu Scenes 9. Adding Sounds and Effects 10. Publishing to the Windows Phone Store 11. Porting, References, and Final Remarks Index

Index

A

  • accelerometer
    • movement, enabling with / Movement with the accelerometer
  • Android SDK
    • URL, for downloading / Running the game on the Android simulator using the Eclipse IDE
  • Android simulator
    • Cocos2d-x project running, Eclipse used / Running the project on an Android simulator using Eclipse
    • game executing, with Eclipse IDE / Running the game on the Android simulator using the Eclipse IDE
  • Android Virtual Device (AVD) / Running the project on an Android simulator using Eclipse
  • Angle project / Project breakup
  • animation
    • about / Animation basics
    • spritesheet animation / Spritesheet animation
    • skeletal animation / Skeletal animation
  • app
    • preparing / Preparing/creating the app
    • creating / Creating the app and setting pricing
    • submitting / Creating the app and setting pricing
    • pricing, setting / Creating the app and setting pricing
  • app icon
    • creating / Preparing/creating the app
    • uploading, for review / Uploading the XAP file, icons, and screenshots for review
  • applicationDidFinishLaunching function / Project breakup
  • applicationWillEnterForeGround function / Project breakup
  • Apply Chain feature / Audio in Cocos2d-x
  • app name
    • modifying / Changing the name of the app
  • Audacity
    • about / Audio in Cocos2d-x
    • URL, for downloading / Audio in Cocos2d-x
  • audio, Cocos2d-x
    • about / Audio in Cocos2d-x
    • background music / Audio in Cocos2d-x
    • sound effects / Audio in Cocos2d-x
  • audio formats
    • .mid file / Audio in Cocos2d-x
    • .wav file / Audio in Cocos2d-x
    • .mp3 file / Audio in Cocos2d-x
    • .caf file / Audio in Cocos2d-x
    • .ogg file / Audio in Cocos2d-x
  • autorelease pool
    • about / Creating the enemy class
    • reference link / Creating the enemy class

B

  • Background, Particle2dx
    • about / Background
  • background image
    • displaying / Displaying the background image
  • background music
    • adding / Adding looped background music
  • bitmap font generator
    • about / Bitmap font generator
    • URL, for downloading / Bitmap font generator
  • bitmap fonts
    • about / Texts and fonts
  • BlackBerry simulator
    • game executing, with Momentics IDE / Running on the BlackBerry simulator using the Momentics IDE
  • bool gameOver variable / Keeping track of the score and the game over condition
  • bounding box collision
    • about / Bounding box collision
  • Box2D
    • about / Other collision detection methods
    • using / Other collision detection methods
  • Box2d
    • URL / Project breakup

C

  • CCArray
    • about / Adding the gameplay layer
  • CCDelayTime action / Movement with touches
  • CCDirector class / Project breakup
  • CCLabeITTF class, Cocos2d-x / Basic classes of Cocos2d-x
  • CCLabelBMFont
    • about / Texts and fonts
    • versus, CCLabelTTF / Texts and fonts
  • CCLabelTTF
    • about / Texts and fonts
    • versus, CCLabelBMFont / Texts and fonts
  • CCLayer class, Cocos2d-x / Basic classes of Cocos2d-x
  • CCMenu class, Cocos2d-x / Basic classes of Cocos2d-x
  • CCObjects
    • about / Adding the gameplay layer
    • reference link / Adding the gameplay layer
  • CCRotateBy action / Movement with touches
  • CCScene class, Cocos2d-x / Basic classes of Cocos2d-x
  • CCSequence action / Movement with touches
  • CCSprite class, Cocos2d-x / Basic classes of Cocos2d-x
  • CCTintTo action / Movement with touches
  • CC_SAFE_DELETE macro / Creating the enemy class
  • character movement
    • about / Character movement
    • enabling, with touches / Movement with touches
  • Chipmunk
    • URL / Project breakup
  • circular collision
    • about / Circular collision
  • Cocos2d-Swift
    • learning resources / Cocos2d-Swift
    • URL / Cocos2d-Swift
  • Cocos2d-x
    • URL / Downloading Cocos2d-x, Cocos2d-x
    • downloading, steps / Downloading Cocos2d-x
    • coordinate systems / Coordinate system
    • classes / Basic classes of Cocos2d-x
    • Gameplay scene / Basic classes of Cocos2d-x
    • functions, for control schemes / Enabling the touch function
    • inbuilt particle system / Cocos2d-x's inbuilt particle system
    • URL, for particle system / Adding the gun muzzle particle system
    • audio / Audio in Cocos2d-x
    • learning resources / Cocos2d-x
  • Cocos2d-x, classes
    • CCScene / Basic classes of Cocos2d-x
    • CCLayer / Basic classes of Cocos2d-x
    • CCSprite / Basic classes of Cocos2d-x
    • CCLabeITTF / Basic classes of Cocos2d-x
    • CCMenu / Basic classes of Cocos2d-x
  • Cocos2d-x project
    • creating / Creating a new project
    • Solution Explorer structure / Project breakup
    • breakup / Project breakup
    • running, on multiple platforms / Running the project on multiple platforms
    • running, on Windows (desktop mode) / Running the project on Windows (desktop mode)
    • running, on Windows RT (tile mode) / Running the project on Windows RT (tile mode)
    • running, on Android simulator with Eclipse / Running the project on an Android simulator using Eclipse
  • Cocos2d-x project, running on multiple platforms
    • about / Running the project on multiple platforms
    • Windows (desktop mode) / Running the project on Windows (desktop mode)
    • on Windows RT (tile mode) / Running the project on Windows RT (tile mode)
    • on iPhone simulator, Xcode used / Running the project on the iPhone simulator using Xcode
    • on Android simulator, Eclipse used / Running the project on an Android simulator using Eclipse
  • CocosDenshion / Project breakup
  • CocosStudio
    • URL / Project breakup
  • collision detection
    • about / Theory of collision detection
    • circular collision / Circular collision
    • bounding box collision / Bounding box collision
    • pixel perfect collision / Pixel perfect collision
    • other methods / Other collision detection methods
    • coding / Coding collision detection
  • collision detection, other methods
    • point in shape / Other collision detection methods
    • separate axis theorem / Other collision detection methods
    • Box2D / Other collision detection methods
  • Color&Shape, Particle2dx
    • about / Color
  • Color Settings, Particle Designer
    • Start and End Color / Color Settings
    • about / Color Settings
    • Blend Source and Destination / Color Settings
  • coordinate systems
    • about / Coordinate system
  • createEnemy() function / Creating the enemy class
  • custom controls
    • about / Custom controls
  • custom particle system
    • creating / Creating your own particle system
  • Cygwin
    • URL, for downloading / Running the game on the Android simulator using the Eclipse IDE

D

  • display section, TexturePacker
    • about / The display section
    • Data Format / The display section
    • Data file / The display section
    • Texture format / The display section
    • Png OPT file / The display section
    • Image format / The display section
    • AutoSD / The display section
    • Content protection / The display section

E

  • Eclipse
    • used, for running Cocos2d-x project on Android simulator / Running the project on an Android simulator using Eclipse
  • Eclipse IDE
    • used, for executing game on Android simulator / Running the game on the Android simulator using the Eclipse IDE
  • emitter
    • about / What is a particle system?
  • Emitter Configuration, Particle Designer
    • about / Emitter Configuration
    • Duration / Emitter Configuration
    • Source Position Variance X and Y / Emitter Configuration
    • Maximum Particles / Emitter Configuration
    • Emit Angle / Emitter Configuration
    • Emit Angle Variance / Emitter Configuration
    • SpeedTopicn / Emitter Configuration
    • Speed VarianceTopicn / Emitter Configuration
    • X and Y Gravity / Emitter Configuration
    • Radial Acceleration / Emitter Configuration
    • Tangential Acceleration / Emitter Configuration
  • enemy animation
    • creating / Creating and coding enemy animation
    • coding / Creating and coding enemy animation
  • enemy class
    • creating / Creating the enemy class
    • enemy movement, adding / Adding the enemy movement
  • enemy movement
    • adding, with update() function / Adding the enemy movement
  • explosion particle system
    • adding / Adding an explosion particle system

F

  • .fnt file extension / Texts and fonts
  • fireRocket function / Adding the gun muzzle particle system
  • flame particle effect
    • creating / Adding particles for jetpack when a player moves upwards
  • fonts
    • about / Texts and fonts
    • Literra / Literra
    • URL, for downloading / Literra
    • bitmap font generator / Bitmap font generator
    • GlyphDesigner / GlyphDesigner
  • frame
    • about / Animation basics
  • frames per second (fps) / Character movement
  • frames per second (FPS)
    • about / Animation basics
  • FSM
    • about / Coding the player animation
    • reference link / Coding the player animation
  • functions, Cocos2d-x
    • TouchesBegan() / Enabling the touch function
    • TouchesMoved() / Enabling the touch function
    • TouchesEnded() / Enabling the touch function
    • TouchesCancelled() / Enabling the touch function

G

  • game
    • creating, from scratch / First things first
    • executing, on Windows desktop / Running the game on the Windows desktop
    • executing, on Android simulator with Eclipse IDE / Running the game on the Android simulator using the Eclipse IDE
    • requisites, for executing on Android / Running the game on the Android simulator using the Eclipse IDE
    • executing, on BlackBerry simulator with Momentics IDE / Running on the BlackBerry simulator using the Momentics IDE
    • executing, on iOS simulator with Xcode / Running on an iOS simulator using Xcode
  • gamedev.stackexchange.com
    • about / gamedev.stackexchange.com/stackoverflow
  • game execution requisites, for Android
    • Android SDK (ADT Bundle) / Running the game on the Android simulator using the Eclipse IDE
    • Android NDK / Running the game on the Android simulator using the Eclipse IDE
    • JDK/JRE / Running the game on the Android simulator using the Eclipse IDE
    • Cygwin / Running the game on the Android simulator using the Eclipse IDE
  • Gameover() function / Keeping track of the score and the game over condition
  • game over condition
    • checking / Keeping track of the score and the game over condition
  • gameplay layer
    • adding / Adding the gameplay layer
  • Geometry section, TexturePacker
    • about / The Geometry section
    • Max size / The Geometry section
    • Fixed size / The Geometry section
    • Size constraint / The Geometry section
    • Scale / The Geometry section
  • GlyphDesigner
    • about / GlyphDesigner
    • URL, for downloading / GlyphDesigner
  • gun muzzle particle system
    • adding / Adding the gun muzzle particle system

H

  • Heads Up User Display (HUD) / Basic classes of Cocos2d-x
  • hero controls
    • adding / Adding hero controls
  • high score
    • storing / Storing high scores
  • HUD layer
    • creating / Creating the HUD layer and displaying as well as updating scores
    • score, displaying on / Creating the HUD layer and displaying as well as updating scores
    • score, updating on / Creating the HUD layer and displaying as well as updating scores

I

  • inbuilt particle system, Cocos2d-x
    • about / Cocos2d-x's inbuilt particle system
    • Fire / Cocos2d-x's inbuilt particle system
    • Fireworks / Cocos2d-x's inbuilt particle system
    • Sun / Cocos2d-x's inbuilt particle system
    • Galaxy / Cocos2d-x's inbuilt particle system
    • Meteor / Cocos2d-x's inbuilt particle system
    • Spiral / Cocos2d-x's inbuilt particle system
    • Explosion / Cocos2d-x's inbuilt particle system
    • Flower / Cocos2d-x's inbuilt particle system
    • Smoke / Cocos2d-x's inbuilt particle system
    • Snow / Cocos2d-x's inbuilt particle system
    • Rain / Cocos2d-x's inbuilt particle system
  • initEnemy() function / Creating the enemy class
  • InOut, Particle2dx
    • about / InOut
  • installation, Python / Downloading and installing Python
  • installation, Spine / Creating the skeletal animation
  • installation, Visual Studio / Downloading and installing Visual Studio
  • installation, Windows Phone SDK / Downloading and installing the Windows Phone SDK
  • int score variable / Keeping track of the score and the game over condition
  • iOS simulator
    • game executing, with Xcode / Running on an iOS simulator using Xcode
  • iPhone simulator
    • Cocos2d-x project running, Xcode used / Running the project on the iPhone simulator using Xcode

J

  • Java Script Object Notification (JSON)
    • about / The display section
  • JDK
    • URL, for downloading / Running the game on the Android simulator using the Eclipse IDE
  • jetpack
    • particles, adding / Adding particles for jetpack when a player moves upwards
  • JRE
    • URL, for downloading / Running the game on the Android simulator using the Eclipse IDE

L

  • Layout section, TexturePacker
    • about / The Layout section
    • Algorithm / The Layout section
    • Border Padding / Shape Padding / The Layout section
    • Trim / The Layout section
  • libbox2d / Project breakup
  • libChipmunk / Project breakup
  • libExtensions / Project breakup
  • Literra
    • about / Literra
    • URL / Literra

M

  • .mp3 file
    • converting, to .wav file / Audio in Cocos2d-x
  • main menu scene
    • creating / Creating the main menu scene
    • loading, on startup / Loading the menu scene at start of the app
  • math class, CPP
    • reference link / Circular collision
  • Microsoft Download Center
    • URL / Downloading and installing Visual Studio
  • Momentics IDE
    • used, for executing game on BlackBerry simulator / Running on the BlackBerry simulator using the Momentics IDE
    • URL, for downloading / Running on the BlackBerry simulator using the Momentics IDE
  • Motion, Particle2dx
    • Duration / Motion
    • Lifetime / Motion
    • EmissionRate / Motion
    • Angle / Motion
    • EmitArea / Motion
    • Gravity / Motion
    • Speed / Motion
    • AccelTan / Motion
  • movement
    • enabling, with accelerometer / Movement with the accelerometer
  • MSOpenTech GitHub page
    • URL / Project breakup
  • Multitouch
    • enabling / Enabling multitouch
  • mute button
    • adding / Adding the mute button

N

  • NDK
    • URL, for downloading / Running the game on the Android simulator using the Eclipse IDE

O

  • Options scene
    • creating / Creating the Options scene

P

  • .plist extension / Particle Designer
  • parallax scrolling layer
    • creating / Creating the parallax scrolling layer
  • Particle2dx
    • about / Particle designing, Particle2dx
    • URL / Particle2dx
    • Motion / Motion
    • Color&Shape / Color
    • Template / Template
    • InOut / InOut
    • Background / Background
  • Particle Configuration, Particle Designer
    • about / Particle Configuration
    • Lifespan / Particle Configuration
    • StartSize / Particle Configuration
    • EndSize / Particle Configuration
    • Start Rotation / Particle Configuration
    • End Rotation / Particle Configuration
  • Particle Designer
    • about / Particle designing, Particle Designer
    • URL, for downloading / Particle Designer
    • Emitter Configuration / Emitter Configuration
    • Particle Configuration / Particle Configuration
    • Color Settings / Color Settings
    • Texture Settings / Texture Settings
  • particle designing
    • about / Particle designing
  • particles
    • adding, for jetpack / Adding particles for jetpack when a player moves upwards
  • particle system
    • about / What is a particle system?
  • pause button
    • creating / Creating the pause button and showing the pause screen
    • implementing / Implementing pause and resuming the game
  • pause screen
    • displaying / Creating the pause button and showing the pause screen
  • Physics Editor
    • about / Other collision detection methods
    • URL, for downloading / Other collision detection methods
  • pixel perfect collision
    • about / Pixel perfect collision
    • URL / Pixel perfect collision
  • player
    • spritesheet, creating for / Creating a spritesheet for the player
  • player animation
    • coding / Coding the player animation
  • player walk cycle
    • coding / Coding the player walk cycle
  • point in shape
    • about / Other collision detection methods
  • power of 2 (POT)
    • about / The Geometry section
  • pricing, app
    • setting / Creating the app and setting pricing
  • projectile class
    • creating / Creating the projectile class
  • Pythagoras theorem
    • about / Circular collision
  • Python
    • installing / Downloading and installing Python
    • downloading / Downloading and installing Python

R

  • radius (R)
    • about / Circular collision
  • Rain
    • about / What is a particle system?
  • resume button
    • implementing / Implementing pause and resuming the game

S

  • scheduleUpdate() function / Character movement
  • schedule_selector macro / Creating the projectile class
  • score
    • tracking / Keeping track of the score and the game over condition
    • updating, on HUD layer / Creating the HUD layer and displaying as well as updating scores
    • displaying, on HUD layer / Creating the HUD layer and displaying as well as updating scores
  • screenshots, app
    • uploading, for review / Uploading the XAP file, icons, and screenshots for review
    • URL, for downloading / Uploading the XAP file, icons, and screenshots for review
  • scrolling layer class
    • adding / Adding the scrolling layer class
  • separate axis theorem
    • about / Other collision detection methods
    • URL / Other collision detection methods
  • setStartColor function / Adding the gun muzzle particle system
  • setTouchEnabled() function / Enabling the touch function
  • sideloading
    • about / Preparing/creating the app
  • Simple Audio Engine
    • about / Adding looped background music
  • skeletal animation
    • about / Skeletal animation
    • using / Creating the skeletal animation
  • Solution Explorer pane, Cocos2d-x project
    • CocosDenshion / Project breakup
    • libbox2d / Project breakup
    • libChipmunk / Project breakup
    • libExtensions / Project breakup
  • sound effects
    • adding / Adding sound effects
  • Spine
    • URL / Project breakup
    • about / Creating the skeletal animation
    • URL, for downloading / Creating the skeletal animation
    • installing / Creating the skeletal animation
    • downloading / Creating the skeletal animation
  • Spine, versions
    • trial / Creating the skeletal animation
    • professional / Creating the skeletal animation
    • essential / Creating the skeletal animation
  • spritesheet
    • creating, for player / Creating a spritesheet for the player
  • spritesheet animation
    • about / Spritesheet animation
  • stackoverflow.com
    • about / gamedev.stackexchange.com/stackoverflow
  • store account
    • creating / Creating the store account

T

  • .ttf file extension / Texts and fonts
  • Template, Particle2dx
    • about / Template
  • texts
    • fonts / Texts and fonts
  • Textture Settings, Particle Designer
    • about / Texture Settings
  • TexturePacker
    • about / TexturePacker
    • URL, for downloading / TexturePacker
    • display section / The display section
    • Geometry section / The Geometry section
    • Layout section / The Layout section
    • advanced features / Advanced features
  • TexturePacker, miscellaneous options
    • Texture path / Advanced features
    • Clean transparent pixels / Advanced features
    • Trim sprite names / Advanced features
  • touches
    • character movement, enabling with / Movement with touches
  • TouchesBegan() function / Enabling the touch function
  • TouchesCancelled() function / Enabling the touch function
  • TouchesEnded() function / Enabling the touch function
  • TouchesMoved() function / Enabling the touch function
  • touch function
    • enabling / Enabling the touch function
  • TrueType font
    • about / Texts and fonts

U

  • update() function
    • used, for adding enemy movement / Adding the enemy movement

V

  • virtual bool init() function / Project breakup
  • Visual Studio
    • downloading / Downloading and installing Visual Studio
    • installing / Downloading and installing Visual Studio
  • VMWare Fusion
    • URL, for downloading / Running on the BlackBerry simulator using the Momentics IDE

W

  • Windows (desktop mode)
    • Cocos2d-x project, running on / Running the project on Windows (desktop mode)
  • Windows desktop
    • game, executing on / Running the game on the Windows desktop
  • Windows Phone SDK
    • installing / Downloading and installing the Windows Phone SDK
    • downloading / Downloading and installing the Windows Phone SDK
    • URL / Downloading and installing the Windows Phone SDK
  • Windows Phone Store
    • about / A look at the Windows Phone Store
    • URL / A look at the Windows Phone Store
    • account, creating / Creating the store account
  • Windows RT (tile mode)
    • Cocos2d-x project, running on / Running the project on Windows RT (tile mode)

X

  • XAP file
    • uploading, for review / Uploading the XAP file, icons, and screenshots for review
  • Xcode
    • used, for running Cocos2d-x project on iPhone simulator / Running the project on the iPhone simulator using Xcode
    • used, for executing game on iOS simulator / Running on an iOS simulator using Xcode
lock icon The rest of the chapter is locked
arrow left Previous Section
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at £13.99/month. Cancel anytime
Visually different images