SlideShare a Scribd company logo
Farmery development using
cocos2d-x
Vu Ngoc Kien - Game Studio North / VNG
Farmery Game
Farmery Game
 Over 1M downloads on Google Play
 Top 10 frees on Apple Store
 Run well on low specs as Galaxy Y phone
 Coming soon on WP
Cocos2d-x -
Cross platform game engine
 2D Cross-Platform engine game
 Open source
 High performance
 Using cocos2d-ios documents as APIs are
similar
 Many support tools
Advantages
 Not easy
 Many choices: C++, Lua, Java Script
 Use C++ language
 Require understandings of different
platforms setup
Approach Cocos2d-x
1. Animation in Farmery game
2. Multiscreen in Cocos2d-x
3. Debug Cocos2d-x on Android
Farmery development using
Cocos2d-x
 Over 125 animations in game
 Optimize to save memory
1. Animation in Farmery
Frame-By-Frame Animation
64 pictures, 2MB
Tween Animation
5 pictures, 240 KB
Make Animations using Dragon Bone
http://dragonbones.github.io
Artists produce objects parts
Assemble animations on Flash
Extract animation file using
Dragon Bone
Result
 Using flash in animation
 Import PSD Layer
 Support pictures skewing
Advantages
1. Animation in Farmery game
2. Multi screen in Cocos2d-x
3. Debug Cocos2d-x on Android
Farmery development using
Cocos2d-x
2. Multi screen in Cocos2d-x
480 x 320
2048 x 1536
1136 x 640
1080 x 1920
 DesignResolutionSize: standard screen size
 CCEGLView::sharedOpenGLView()->setDesignResolutionSize
(width, height, policy)
 Policy:
• Exact fit
• Show all
• No border
• Fixed Height
• Fixed Width
Multiscreen in cocos2d-x
Picture looks stretched
Exact fit
2 black edges on the screen
Show all
No border
 contentScaleFactor = RH/DH, resource for screen suitably
 contentScaleFactor = (RH/DH)/ (MIN(fScaleX, fScaleY) /
MAX(fScaleX, fScaleY)).
fScaleX = FW/ DW; float fScaleY = FH/DH.
contentScaleFactor
Farmery displays well on different
screen sizes
1. Animation in Farmery game
2. Multiscreen by Cocos2d-x
3. Debug Cocos2d-x on Android
Farmery development using
Cocos2d-x
Require Cygwin, NDK
Setup NDK path
Can’t debug native
Build cocos2d-x on Android by Cygwin on
Windows
Build cocos2d-x on Android by eclipse
 Not require Cygwin
 Can debug native
 Undefined Cygwin
(properties -> C/C++ Build -> Environment)
Edit Project Properties
 Use Android GCC tool chain
(properties -> C/C++ Build -> Tool Chain Editor)
Edit Project Properties
• Setting build command: ndk-build NDK_DEBUG=1 –j8
(properties -> C/C++ Build -> Builder Setting)
Edit Project Properties
Link Classes folder
(properties -> C/C++ General -> Paths and
Symbols -> Source Location)
Edit Project Properties
 Add module path
$(call import-add-path,(LOCAL_PATH)/../../../../../)
$(call import-add-
path,(LOCAL_PATH)/../../../../../cocos2dx/platform/third_party/
android/prebuilt)
$(call import-module,cocos2dx)
Edit file Android.mk
Crash will show on LogCat
Use Breakpoint to debug
1. Make Animation with Flash and Dragon Bone
2. Multiscreen by Cocos2d-x
3. Debug cocos2d-x on Android by Eclipse
Develop Farmery by Cocos2d-x
OGDC 2014_Hands on experience with Cocos2dx in cross-platform with Farmery_Mr. Vu Ngoc Kien
Farmery development using cocos2d-x
Vu Ngoc Kien
KienVN@vng.com.vn
(Game Studio North /VNG)

More Related Content

PPTX
Developing native cross platform games on Cocos2dx2
BeMyApp
 
PDF
Android game development
milandinic
 
ODP
Tapsteroids: development tips - Code, graphics and marketing
Daniele Benegiamo
 
PDF
Cross Platform Game Programming with Cocos2d-js
Troy Miles
 
PDF
Introduction to Mobile Game Programming with Cocos2d-JS
Troy Miles
 
PDF
Game engine introduction and approach
Duy Tan Geek
 
PDF
Cocos2d 소개 - Korea Linux Forum 2014
Changwon National University
 
PPTX
Game engines and Their Influence in Game Design
Prashant Warrier
 
Developing native cross platform games on Cocos2dx2
BeMyApp
 
Android game development
milandinic
 
Tapsteroids: development tips - Code, graphics and marketing
Daniele Benegiamo
 
Cross Platform Game Programming with Cocos2d-js
Troy Miles
 
Introduction to Mobile Game Programming with Cocos2d-JS
Troy Miles
 
Game engine introduction and approach
Duy Tan Geek
 
Cocos2d 소개 - Korea Linux Forum 2014
Changwon National University
 
Game engines and Their Influence in Game Design
Prashant Warrier
 

What's hot (8)

PPTX
Game development via_sprite_kit
Buşra Deniz, CSM
 
PDF
iOS Game Development: When Cocoa Met Cocos...
Joseph Ku
 
PPTX
Cocos2D
Anton Krokhmalyuk
 
PDF
Operation P.E.A.C.E. 2.0 - Game Development
MEGA Generation
 
PPTX
Unity - Game Engine
Geeks Anonymes
 
PDF
Mobile Game Development in Unity
Hakan Saglam
 
PPT
What Is A Game Engine
Seth Sivak
 
PPTX
PRESENTATION ON Game Engine
Diksha Bhargava
 
Game development via_sprite_kit
Buşra Deniz, CSM
 
iOS Game Development: When Cocoa Met Cocos...
Joseph Ku
 
Operation P.E.A.C.E. 2.0 - Game Development
MEGA Generation
 
Unity - Game Engine
Geeks Anonymes
 
Mobile Game Development in Unity
Hakan Saglam
 
What Is A Game Engine
Seth Sivak
 
PRESENTATION ON Game Engine
Diksha Bhargava
 
Ad

Similar to OGDC 2014_Hands on experience with Cocos2dx in cross-platform with Farmery_Mr. Vu Ngoc Kien (20)

PDF
Build a Game in 60 minutes
Troy Miles
 
PDF
Cocos2d-x C++ Windows 8 &Windows Phone 8
Troy Miles
 
PDF
06 html5 and cocos2d-x
乐费 胡
 
PPTX
Farm Moles Android Game
Farouq Mousa
 
PPT
Processing for Android: Getting Started
PETER KIRN
 
PDF
Targeting Android with Qt
Espen Riskedal
 
PDF
Cocos2d game programming 2
Changwon National University
 
KEY
Cross Game Dev with Corona
Shawn Grimes
 
PPTX
Cocos2d for beginners
Azukisoft Pte Ltd
 
PDF
For cocos2d jpn devcon
Ricardo Quesada
 
PPTX
Indie Game Development
Shahed Chowdhuri
 
ODP
Spooky House Studios: Game development for smartwatches. Challenges and solut...
DevGAMM Conference
 
PPTX
Game development with_lib_gdx
Gabriel Grill
 
PPTX
Game development with Cocos2d
Vinsol
 
PDF
Cocos2d programming
Changwon National University
 
PDF
Working with the AOSP - Linaro Connect Asia 2013
Opersys inc.
 
PPTX
ngGoBuilder and collaborative development between San Francisco and Tokyo
notolab
 
PPTX
Develop Games With Cocos Creator - A Game Engine By Cocos
Luke Stapley
 
PPT
Cocos2d for i phone(second) copy
Arafat X
 
PDF
Android game engine
Julian Chu
 
Build a Game in 60 minutes
Troy Miles
 
Cocos2d-x C++ Windows 8 &Windows Phone 8
Troy Miles
 
06 html5 and cocos2d-x
乐费 胡
 
Farm Moles Android Game
Farouq Mousa
 
Processing for Android: Getting Started
PETER KIRN
 
Targeting Android with Qt
Espen Riskedal
 
Cocos2d game programming 2
Changwon National University
 
Cross Game Dev with Corona
Shawn Grimes
 
Cocos2d for beginners
Azukisoft Pte Ltd
 
For cocos2d jpn devcon
Ricardo Quesada
 
Indie Game Development
Shahed Chowdhuri
 
Spooky House Studios: Game development for smartwatches. Challenges and solut...
DevGAMM Conference
 
Game development with_lib_gdx
Gabriel Grill
 
Game development with Cocos2d
Vinsol
 
Cocos2d programming
Changwon National University
 
Working with the AOSP - Linaro Connect Asia 2013
Opersys inc.
 
ngGoBuilder and collaborative development between San Francisco and Tokyo
notolab
 
Develop Games With Cocos Creator - A Game Engine By Cocos
Luke Stapley
 
Cocos2d for i phone(second) copy
Arafat X
 
Android game engine
Julian Chu
 
Ad

More from ogdc (20)

PDF
OGDC 2014_Entity system in mobile game development_Mr. Cody nguyen
ogdc
 
PDF
OGDC 2014_Sky Garden Mobile conceptualization: From PC to Mobile_Mr. Luc Hoan...
ogdc
 
PPSX
OGDC 2014_Creativity in Game Design - Case Study: Famous Vietnamese mobile ga...
ogdc
 
PDF
OGDC 2014_Vietnam Mobile Internet 2014: A focus in smartphone game and compar...
ogdc
 
PDF
OGDC 2014_Vietnam Smartphone game market 2013 overview. From vision to action...
ogdc
 
PDF
OGDC 2014_User segmentation and Monetization_Mr. Phat hoang
ogdc
 
PDF
OGDC 2014_Animation workflow with Spine in Tiny Busters_Mr. Huynh Dong Hai
ogdc
 
PDF
OGDC 2014_Speed Up and make quality 3D game models_Mr. Pham Duc Duy
ogdc
 
PDF
OGDC 2014_Architecting Games in Unity_Mr. Rustum Scammell
ogdc
 
PDF
OGDC 2014_One-Man Studio: How to make a game prototype_Mr. Le Vo Tien Giang
ogdc
 
PDF
OGDC 2014_Optimize or Die: Key disciplines to optimize your mobile game_Mr. P...
ogdc
 
PDF
OGDC 2014_Why choosing 2D animation for Mobile Game?_Mr. Joe Tran
ogdc
 
PDF
OGDC 2014_ An artist's story_Mr. Vu Cam Cong Danh
ogdc
 
PDF
OGDC 2014_Tips and Tricks for seasonal events and community building in Drago...
ogdc
 
PDF
OGDC 2014_Cross platform mobile game application development_Mr. Makku J.Kero
ogdc
 
PDF
OGDC 2014_Tips and Tricks for seasonal events and community building in Drago...
ogdc
 
PDF
OGDC 2014_Business design is game design: 10 bits of business/design wisdom_M...
ogdc
 
PDF
OGDC 2014_Build your own Particle System_Mr. Nguyen Dang Quang
ogdc
 
PDF
OGDC 2014_ Game Design: 5 years of painful lessons_Mr. Do Van Thanh
ogdc
 
PDF
OGDC 2014_3D Graphic on mobile_Mr. Hoang Minh Truong
ogdc
 
OGDC 2014_Entity system in mobile game development_Mr. Cody nguyen
ogdc
 
OGDC 2014_Sky Garden Mobile conceptualization: From PC to Mobile_Mr. Luc Hoan...
ogdc
 
OGDC 2014_Creativity in Game Design - Case Study: Famous Vietnamese mobile ga...
ogdc
 
OGDC 2014_Vietnam Mobile Internet 2014: A focus in smartphone game and compar...
ogdc
 
OGDC 2014_Vietnam Smartphone game market 2013 overview. From vision to action...
ogdc
 
OGDC 2014_User segmentation and Monetization_Mr. Phat hoang
ogdc
 
OGDC 2014_Animation workflow with Spine in Tiny Busters_Mr. Huynh Dong Hai
ogdc
 
OGDC 2014_Speed Up and make quality 3D game models_Mr. Pham Duc Duy
ogdc
 
OGDC 2014_Architecting Games in Unity_Mr. Rustum Scammell
ogdc
 
OGDC 2014_One-Man Studio: How to make a game prototype_Mr. Le Vo Tien Giang
ogdc
 
OGDC 2014_Optimize or Die: Key disciplines to optimize your mobile game_Mr. P...
ogdc
 
OGDC 2014_Why choosing 2D animation for Mobile Game?_Mr. Joe Tran
ogdc
 
OGDC 2014_ An artist's story_Mr. Vu Cam Cong Danh
ogdc
 
OGDC 2014_Tips and Tricks for seasonal events and community building in Drago...
ogdc
 
OGDC 2014_Cross platform mobile game application development_Mr. Makku J.Kero
ogdc
 
OGDC 2014_Tips and Tricks for seasonal events and community building in Drago...
ogdc
 
OGDC 2014_Business design is game design: 10 bits of business/design wisdom_M...
ogdc
 
OGDC 2014_Build your own Particle System_Mr. Nguyen Dang Quang
ogdc
 
OGDC 2014_ Game Design: 5 years of painful lessons_Mr. Do Van Thanh
ogdc
 
OGDC 2014_3D Graphic on mobile_Mr. Hoang Minh Truong
ogdc
 

OGDC 2014_Hands on experience with Cocos2dx in cross-platform with Farmery_Mr. Vu Ngoc Kien