We're working on modules configurable and reducing the binary size

I just want to share some process and get your feedbacks. This is our analysed result of different modules in cocos2d-x. We can see the cocos2d-x core only used 37% of total binary size of libcocos2djsb.a before strip. This is also happening in lua bindings. The next step, we’re developing modules configurable in the cocos command line tool, and integrate this in Code IDE. So eventually, we can select & unselect modules in Code IDE from a UI operation, just like adding/removing frameworks in Xcode.

I got a critical feedback that, v3.0-final’s apk is 2.37M, while 3.2rc0’s apk is 4.13M. The latest version increased 2M bytes. Cocos2d-x team is currently working on this problem.

1 Like

Great news, I’ll be very interested in how you actually implement a module system.

The size of the apk is indeed critical, as you can multiply at least by 2, up to 4 to support multiple architectures. If you compile for armv6, armv7, x86 and mips, that’s 7M difference, a lot considering the 50M limit of Google Play (14% to be precise).

Do you have an idea yet how an app developer is going to choose which modules he wants ? Will it integrate nicely with Xcode/Eclipse/Visual Studio ? (I am mainly concerned about Xcode, since Eclipse lets you provide a script, and I don’t use Visual Studio yet).

Thanks.

Update. Striped modules size:

@Fradow, armv7 is enough of +95% markets, especially developed countries like US, Japan and Korea. About mips and x86, well, Intel is a sponsor of cocos2d-x so I can say nothing.

What’s this got to do with C++?

smoothness and fluidity i guess…