Game development with Cocos2d-x Engine
About Me 
 Ngoc Le Van 
 Work at Android Team at Seesaa VietNam Company 
 Email: ngoclv@seesaa.vn
Why need Game Engine
Create a Game 
Everyone has creativity 
We might want to clone a existing game 
We have a good idea for game 
Writing Game is COOL, and We are COOL!!!
Game Engine help us 
Faster Development 
Easier Development (You might don't know OpenGL...) 
Abstract Layer (You might need to port your game to another platform....). 
Focus on FUN 
If you spend more time on fighting with code, you has less time to think about your game, especially most of us are independent programmer
Game Engine might has 
Sprite, Scene, Animation 
Modifier 
Particle System 
Event Handling 
Game Thread 
Renderer 
Physics Engine 
Collision Detection 
Script Language
Mobile Game Frameworks Landscapes 
 Corona 
 Unity 
 Cocos2d-x 
 Many other…
Corona 
2D Game Framework 
Support iOS, Android 
Lua 
Closed Source 
Free to use Starter Version 
Http://corolalabs.com
Unity 3D 
2D,3D Environment for creating game 
Support Desktop, Android, iOS, BlackBerry 
C#, JavaScript 
Closed Source 
Free to develop and publish 
Http://unity3d.com
Cocos2d-x 
2D Game Framework 
iOS, Android, Windows Phone, Desktop 
Open Source 
C++ 11 (from version 3.0) 
www.cocos2d-x.org
Why use Cocos2d-x 
Cross Platform 
Open source engine game 
High Performance 
A game engine proven by the community
Why use Cocos2d-x
Why use Cocos2d-x 
TOP GAMES
Developer
Partners of Cocos2d-X
Platform&Contributors
Architecture
Modules 
Graphics and Animation 
Audio 
GUI 
Data Structure 
Physic 
Network 
Events System 
Schedule and Timer Callbacks 
Input 
Memory management 
Debugging, File Stream
Graphics& Animation 
 Scene 
 Layer 
 Sprite 
 Node 
 Action
Node 
Anything that gets drawn or contains things that get drawn is a Node 
The most popular Nodes are: Scene, Layer, Sprite, Menu.
Node 
The main features of a Node are: 
o They can contain other Node nodes (addChild,removeChild,etc) 
o They can schedule perodic callback (schedule, unschedule, etc) 
o They can execute actions (runAction, stopAction,etc)
Scene 
Scene an Node are almost identical with the difference that Scene has it’s anchor point at center of the screen
Layer 
 Layer is a subclass of Node that implement TouchEventsDelegate protocol 
 All features from Node are valid, plus the following new features: 
•It can receive touch event 
•It can receive Accelerometer input
Sprite
Sprite 
Sprite is a 2D image 
Sprite can be created with a image, or with sub- rectangle of image 
Objects in the game was created by a Sprite or its subclasses
Action
Action 
 Actions are orders given to a Node object 
 These actions usually modify some of the object’s attributes like position, rotation, scale, etc. 
 Basic Action 
•Position : MoveBy, MoveTo, JumpBy, JumpTo, etc. 
•Scale : ScaleBy, ScaleTo. 
•Rotate : RotateBy, RotateTo. 
•Visibility : Show, Hide, Blink. 
•Opacity : FadeIn, FadeOut, FadeTo. 
•Color : TintBy, TintTo.
Game development with Cocos2d-x Engine
Game development with Cocos2d-x Engine

Game development with Cocos2d-x Engine

  • 1.
    Game development withCocos2d-x Engine
  • 2.
    About Me Ngoc Le Van  Work at Android Team at Seesaa VietNam Company  Email: ngoclv@seesaa.vn
  • 3.
  • 4.
    Create a Game Everyone has creativity We might want to clone a existing game We have a good idea for game Writing Game is COOL, and We are COOL!!!
  • 5.
    Game Engine helpus Faster Development Easier Development (You might don't know OpenGL...) Abstract Layer (You might need to port your game to another platform....). Focus on FUN If you spend more time on fighting with code, you has less time to think about your game, especially most of us are independent programmer
  • 6.
    Game Engine mighthas Sprite, Scene, Animation Modifier Particle System Event Handling Game Thread Renderer Physics Engine Collision Detection Script Language
  • 7.
    Mobile Game FrameworksLandscapes  Corona  Unity  Cocos2d-x  Many other…
  • 8.
    Corona 2D GameFramework Support iOS, Android Lua Closed Source Free to use Starter Version Http://corolalabs.com
  • 9.
    Unity 3D 2D,3DEnvironment for creating game Support Desktop, Android, iOS, BlackBerry C#, JavaScript Closed Source Free to develop and publish Http://unity3d.com
  • 10.
    Cocos2d-x 2D GameFramework iOS, Android, Windows Phone, Desktop Open Source C++ 11 (from version 3.0) www.cocos2d-x.org
  • 11.
    Why use Cocos2d-x Cross Platform Open source engine game High Performance A game engine proven by the community
  • 12.
  • 13.
  • 14.
  • 15.
  • 16.
  • 17.
  • 18.
    Modules Graphics andAnimation Audio GUI Data Structure Physic Network Events System Schedule and Timer Callbacks Input Memory management Debugging, File Stream
  • 19.
    Graphics& Animation Scene  Layer  Sprite  Node  Action
  • 20.
    Node Anything thatgets drawn or contains things that get drawn is a Node The most popular Nodes are: Scene, Layer, Sprite, Menu.
  • 21.
    Node The mainfeatures of a Node are: o They can contain other Node nodes (addChild,removeChild,etc) o They can schedule perodic callback (schedule, unschedule, etc) o They can execute actions (runAction, stopAction,etc)
  • 22.
    Scene Scene anNode are almost identical with the difference that Scene has it’s anchor point at center of the screen
  • 23.
    Layer  Layeris a subclass of Node that implement TouchEventsDelegate protocol  All features from Node are valid, plus the following new features: •It can receive touch event •It can receive Accelerometer input
  • 24.
  • 25.
    Sprite Sprite isa 2D image Sprite can be created with a image, or with sub- rectangle of image Objects in the game was created by a Sprite or its subclasses
  • 26.
  • 27.
    Action  Actionsare orders given to a Node object  These actions usually modify some of the object’s attributes like position, rotation, scale, etc.  Basic Action •Position : MoveBy, MoveTo, JumpBy, JumpTo, etc. •Scale : ScaleBy, ScaleTo. •Rotate : RotateBy, RotateTo. •Visibility : Show, Hide, Blink. •Opacity : FadeIn, FadeOut, FadeTo. •Color : TintBy, TintTo.