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
PDF
Android game development
ODP
Tapsteroids: development tips - Code, graphics and marketing
PDF
Cross Platform Game Programming with Cocos2d-js
PDF
Introduction to Mobile Game Programming with Cocos2d-JS
PDF
Game engine introduction and approach
PDF
Cocos2d 소개 - Korea Linux Forum 2014
PPTX
Game engines and Their Influence in Game Design
Developing native cross platform games on Cocos2dx2
Android game development
Tapsteroids: development tips - Code, graphics and marketing
Cross Platform Game Programming with Cocos2d-js
Introduction to Mobile Game Programming with Cocos2d-JS
Game engine introduction and approach
Cocos2d 소개 - Korea Linux Forum 2014
Game engines and Their Influence in Game Design

What's hot (8)

PPTX
Game development via_sprite_kit
PDF
iOS Game Development: When Cocoa Met Cocos...
PPTX
PDF
Operation P.E.A.C.E. 2.0 - Game Development
PPTX
Unity - Game Engine
PDF
Mobile Game Development in Unity
PPT
What Is A Game Engine
PPTX
PRESENTATION ON Game Engine
Game development via_sprite_kit
iOS Game Development: When Cocoa Met Cocos...
Operation P.E.A.C.E. 2.0 - Game Development
Unity - Game Engine
Mobile Game Development in Unity
What Is A Game Engine
PRESENTATION ON Game Engine
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
PDF
Cocos2d-x C++ Windows 8 &Windows Phone 8
PDF
06 html5 and cocos2d-x
PPTX
Farm Moles Android Game
PPT
Processing for Android: Getting Started
PDF
Targeting Android with Qt
PDF
Cocos2d game programming 2
KEY
Cross Game Dev with Corona
PPTX
Cocos2d for beginners
PDF
For cocos2d jpn devcon
PPTX
Indie Game Development
ODP
Spooky House Studios: Game development for smartwatches. Challenges and solut...
PPTX
Game development with_lib_gdx
PPTX
Game development with Cocos2d
PDF
Cocos2d programming
PDF
Working with the AOSP - Linaro Connect Asia 2013
PPTX
ngGoBuilder and collaborative development between San Francisco and Tokyo
PPTX
Develop Games With Cocos Creator - A Game Engine By Cocos
PPT
Cocos2d for i phone(second) copy
PDF
Android game engine
Build a Game in 60 minutes
Cocos2d-x C++ Windows 8 &Windows Phone 8
06 html5 and cocos2d-x
Farm Moles Android Game
Processing for Android: Getting Started
Targeting Android with Qt
Cocos2d game programming 2
Cross Game Dev with Corona
Cocos2d for beginners
For cocos2d jpn devcon
Indie Game Development
Spooky House Studios: Game development for smartwatches. Challenges and solut...
Game development with_lib_gdx
Game development with Cocos2d
Cocos2d programming
Working with the AOSP - Linaro Connect Asia 2013
ngGoBuilder and collaborative development between San Francisco and Tokyo
Develop Games With Cocos Creator - A Game Engine By Cocos
Cocos2d for i phone(second) copy
Android game engine
Ad

More from ogdc (20)

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

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