Extending Cocos2D-x Mobile 2D Framework

Click here to load reader

  • date post

  • Category


  • view

  • download


Embed Size (px)


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 ?. - PowerPoint PPT Presentation

Transcript of Extending Cocos2D-x Mobile 2D Framework

  • Extending Cocos2D-xMobile 2D FrameworkRony XuHappy Elements

    AgendaWhyOverall Framework DesignQ&A guide

    Why we use Cocos2Dx

    Techniques We UsedCocos2d-iphoneHTML5Adobe Air PortingCocos2DxConoraUnityCross-platformControllability Performance

    Why scripting

    Multi-versionIOS/some Android mkts cant incremental updateBig pack with all resolution, wasting bandwidth and storage.Update issuesGoogle Play2 hoursIOS5 daysUpdate Cycle

    Different Develop & Debugging toolsContext brokenDifficulties on device debuggingDebug Issues

    1. Need script for compile, deploy & debug2. NDK in Eclipse is very difficult to debugNeed to use MAC for compile, deploy & debugIOSAndroid

    50% of the debugging time is dealing with crash

    Easy Crash : using Auto-Release PoolEasy to Lose Context/Stack, especially in optimized modeCrash5% crash rate over 5000 minutes testing sessions

    Why we choose Lua

    Easy, ControllableLightweightMost games in China market is written with cocos2dx+lua Solutions

    What have we done

    AndroidJava LuaIOS: OC LuaLuaJit replace Lua 5.13rd party Lib API

    IDE & DebuggerUI EditorAnimation EditorTTF Font export toolsTools

  • Mem DisambiguationLocalizationUtilitiesNetworkResource ManagementCrashRenderScript EngineAccountSNS IntegrationPaymentNotificationData AnalyticsAd/x-promLog TrackerCI ServiceIDEAutomated Build ScriptsDebuggerPackagingToolsLoggerEngine

    Lua scripting runtimetoLua++Cocos2dx/Common LibiOS native apiLuaJavaiOS 3rd party APIAndroid 3rd party APIAndroid native APIInterface w/ languagesWax

    - Base on Zerobrane Enhance 120x debugging performance - Locating files & symbols - Push to device- Improve context helperLua debugger


    DebuggeriOS stubAndroid stubWindows stubFile List & MD5Connect DebuggerConnection SuccessLog & BreakpointChanged FileFile PushClose connectionSend InstructionFile Deploy ProcessDebug ProcessPush to device

    Complete the Update transaction Increment updateDownload on DemondsModulesResolutionsResources EncryptionAPK Update (China Android Markets)Resource Manager Design Purpose

    APK/App DirectoryResource Manager - DesignCurrent Resource LocatorResource Locator versionContent with md5 nameOld Resource LocatorDocument DirectoryContent with md5 nameContent with md5 name

    ClientCDNDynamic ServerGet the latest configurationDownload configurationDownload ResourcesCheck if the currentconfiguration up-to-dateCheck the missing resourceIncremental update

    ClientCDNGameRes MgrEnsure ModulesLocal cacheDownload ResourceCallback ResultDownload on Demand Load Resource

    Crash analyze systemPLCrash reporterGooglebreakpadCrash AnalysisCenterLog trackerGameCrash folderCrash Sent TaskDeveloperSymbolCenterBuild

    - 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/CIBuild.shsymbolsHudsonapk/ipa/pngresourcesAdhoc.mobileprovisionSvnbuild_versionProject.plistSafariMobile BrowserUdid CheckResource ManagerCDNCrashAnalysisLatest VersionClient Manager

    Dragon Bones Flash CS5.5+Plugin UI Editor Animation EditorFont editor BMP Font TTFTools

    Particle designerGlyph designerThird Party Tools

    Thanks! OpenSource CommunityCocos2dxhttps://github.com/cocos2d/cocos2d-x LuaJavahttp://www.keplerproject.org/luajava/ Waxhttps://github.com/probablycorey/wax

    ZeroBranehttps://github.com/pkulchenko/ZeroBraneStudio Mobdebug https://github.com/pkulchenko/MobDebug DragonBoneshttp://dragonbones.github.com Thanks! OpenSource Community

    Questions go to Name: Cong LingEmail: [email protected]: cong_ling1

    **First of all, why we choose Cocos2D-X? **Why we use Scripting language in our framework? This actually comes with blood and tears. ****There are so many script languages, why we choose Lua? **Then, I would like to tell you what we have improved based on Cocos2dx+ lua.****************Thanks to the Open-Source projects, especially Cocos2d-X, we can develop our games more quickly.