310 likes | 633 Views
Extending Cocos2D-x Mobile 2D Framework. Rony Xu Happy Elements. Agenda. Why Overall Framework Design Q&A guide. Why we use Cocos2Dx ?. Techniques We Used. Cocos2d-iphone HTML5 Adobe Air Porting Cocos2Dx Conora Unity. Cross-platform. Performance. Controllability. Why scripting ?.
E N D
Extending Cocos2D-xMobile 2D Framework RonyXu Happy Elements
Agenda Why Overall Framework Design Q&A guide
Techniques We Used Cocos2d-iphone HTML5 Adobe Air Porting Cocos2Dx Conora Unity Cross-platform Performance Controllability
Multi-version IOS/some Android mkts can’t incremental update Big pack with all resolution, wasting bandwidth and storage. Update issues Google Play:2hours IOS:5days Update Cycle
Different Develop & Debugging tools Context broken Difficulties on device debugging Debug Issues • Need to use MACfor compile, deploy& debug IOS • 1. Need script for compile, deploy& debug • 2. NDK in Eclipse is very difficult to debug Android
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 • 5% crash rate over 5000 minutes testing sessions Quality standard
Easy, Controllable Lightweight Most games in China market iswritten with cocos2dx+lua Solutions
Android:Java Lua IOS: OC Lua LuaJit replace Lua 5.1 3rd party Lib API
IDE & Debugger UI Editor Animation Editor TTF Font export tools Tools
Third party Integration Engine Account SNS Integration Payment Notification Render Localization Resource Management Data Analytics Ad/x-prom CI Service Log Tracker Utilities Network Develop Tools Script Engine IDE Debugger Automated Build Scripts Crash Logger Mem Disambiguation PackagingTools COCOS2D-X
Interface w/ languages Lua scripting runtime toLua++ Wax LuaJava Cocos2dx/Common Lib iOS native api iOS 3rd party API Android native API Android 3rd party API
- Base on Zerobrane Enhance 120x debugging performance - Locating files & symbols - Push to device - Improve context helper Lua debugger
Push to device Debugger Stub File List & MD5 Changed File iOS stub File Push Close connection Android stub Connect Debugger Connection Success Windows stub Send Instruction Log & Breakpoint File Deploy Process Debug Process
Complete the Update transaction Increment update Download on Demonds Modules Resolutions Resources Encryption APK Update (China Android Markets) Resource Manager – Design Purpose
Resource Manager - Design APK/App Directory Old Resource Locator Content with md5 name Resource Locator version Content with md5 name Current Resource Locator Document Directory Content with md5 name
Incremental update Check the missing resource Download configuration Client CDN Download Resources Check if the current configuration up-to-date Get the latest configuration Dynamic Server
Download on Demand Client Load Resource Game CDN Ensure Modules Callback Result Download Resource Res Mgr Local cache?
Crash analyze system Developer Game PLCrash reporter Google breakpad Crash Analysis Center Log tracker Crash folder Symbol Center Crash Sent Task Build
- 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
Build/CI Svn Safari Client Manager Mobile Browser Hudson apk/ipa/png Build.sh Project.plist Latest Version Adhoc.mobileprovision resources symbols build_version Udid Check Resource Manager CDN Crash Analysis
Dragon Bones ■ Flash CS5.5+Plugin ■ UI Editor ■ Animation Editor Font editor ■ BMP Font ■ TTF Tools
Particle designer Glyph designer Third Party Tools
Thanks! OpenSource Community Cocos2dx https://github.com/cocos2d/cocos2d-x LuaJava http://www.keplerproject.org/luajava/ Wax https://github.com/probablycorey/wax
ZeroBrane https://github.com/pkulchenko/ZeroBraneStudio Mobdebug https://github.com/pkulchenko/MobDebug DragonBones http://dragonbones.github.com Thanks! OpenSource Community
Questions go to • Name: Cong Ling • Email: cong.ling@happyelements.com • WeChat: cong_ling1