Download presentation
Presentation is loading. Please wait.
Published byMerilyn Parrish Modified over 9 years ago
1
Extending Cocos2D-x Mobile 2D Framework Rony Xu Happy Elements
2
Agenda Why Overall Framework Design Q&A guide
3
Why we use Cocos2Dx ?
4
Techniques We Used Cocos2d-iphone HTML5 Adobe Air Porting Cocos2Dx Conora Unity Cross-platform Controllability Performance
5
Why scripting ?
6
Multi-version IOS/some Android mkts can’t incremental update Big pack with all resolution, wasting bandwidth and storage. Update issues Google Play : 2 hours IOS : 5 days Update Cycle
7
Different Develop & Debugging tools Context broken Difficulties on device debugging Debug Issues 1. Need script for compile, deploy & debug 2. NDK in Eclipse is very difficult to debug Need to use MAC for compile, deploy & debug IOS Android
8
50% of the debugging time is dealing with crash Easy Crash : using Auto-Release Pool Easy to Lose Context/Stack, especially in optimized mode Crash Quality standard 5% crash rate over 5000 minutes testing sessions
9
Why we choose Lua ?
10
Easy, Controllable Lightweight Most games in China market is written with cocos2dx+lua Solutions
11
What have we done ?
12
Android : Java Lua IOS: OC Lua LuaJit replace Lua 5.1 3rd party Lib API
13
IDE & Debugger UI Editor Animation Editor TTF Font export tools Tools
14
COCOS2D-X Develop Tools Mem Disambiguation Localization Utilities Network Resource Management Crash Render Script Engine Third party Integration Account SNS Integration Payment Notification Data Analytics Ad/x-prom Log Tracker CI Service IDE Automated Build Scripts Debugger PackagingTools Logger Engine
15
Lua scripting runtime toLua++ Cocos2dx/Commo n Lib iOS native api LuaJava iOS 3rd party API Android 3rd party API Android native API Interface w/ languages Wax
16
- Base on Zerobrane - Enhance 120x debugging performance - Locating files & symbols - Push to device - Improve context helper Lua debugger
17
StubDebugger iOS stub Android stub Windows stub File List & MD5 Connect Debugger Connection Success Log & Breakpoint Changed File File Push Close connection Send Instruction File Deploy Process Debug Process Push to device
18
Complete the Update transaction Increment update Download on Demonds Modules Resolutions Resources Encryption APK Update (China Android Markets) Resource Manager – Design Purpose
19
APK/App Directory Resource Manager - Design Current Resource Locator Resource Locator version Content with md5 name Old Resource Locator Document Directory Content with md5 name
20
ClientCDN Dynamic Server Get the latest configuration Download configuration Download Resources Check if the current configuration up-to- date Check the missing resource Incremental update
21
Client CDN GameGame Res Mgr Ensure Modules Local cache ? Download Resource Callback Result Download on Demand Load Resource
22
Crash analyze system PLCrash reporter GooglebreakpadGooglebreakpad Crash Analysis Center Center Log tracker Game Crash folder Crash Sent Task Developer SymbolCenterSymbolCenter Build
23
- Hudson - Download & install on mobile - Update notice, auto-download update package - Crash/ Log collect & analyze - Session time analyze - CDN check - Udid management - Oneclick submit to App store & Google Play (future) Build/CI
24
Build.sh symbols Hudson apk/ipa/png resources Adhoc.mobil eprovision Svn build_version Project.plist Safari Mobile Browser Udid Check Resource Manager CDN Resource Manager CDN Crash Analysis Crash Analysis Latest Version Client Manager
25
Dragon Bones ■ Flash CS5.5+Plugin ■ UI Editor ■ Animation Editor Font editor ■ BMP Font ■ TTF Tools
26
Particle designer Glyph designer Third Party Tools
27
Thanks! OpenSource Community Cocos2dx https://github.com/cocos2d/cocos2d-x LuaJava http://www.keplerproject.org/luajava/ Wax https://github.com/probablycorey/wax
28
ZeroBrane https://github.com/pkulchenko/ZeroBraneStudio Mobdebug https://github.com/pkulchenko/MobDebug DragonBones http://dragonbones.github.com Thanks! OpenSource Community
29
Questions go to Name: Cong Ling Email: cong.ling@happyelements.com WeChat: cong_ling1
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.