Project Summary: optimizes the game package size and project summary.

Source: Internet
Author: User

Project Summary: optimizes the game package size and project summary.

Project Summary to optimize game Package Size

DionysosLai2015/3/2

Most of the time, when channels and releases ask developers to compress the game package to XXMB, the opponent's sublines do not allow developers to lower the game quality to accomplish this goal, it is not necessary to compress the package to the limit without ensuring the quality. If you cannot meet the requirements of the other party, I believe that the game can only be released. For this question, you can pay attention to the question "Why do we need to compress the size of the game package for mobile games "?

There are many specific methods for compressing game packages for each game, most of which are achieved through compressing resources. Here, we provide a general method to remove unnecessary libraries and reduce the so library size by modifying the library support.

In cocos2dx, library files generally include the following:

1. cocos2dx ---- engine Library File

2. libcurl --- third-party Network Connection Library

3. CocosDenshion ----- SimpleAudioEngine, used to play the sound

4. Extensions --- some tool support libraries such as spine and cocostudio

5. Box2D --- box2d Library

6. Chipmunk --- chipmunk Library

The following two are physical engine libraries, and most games generally use box2d. Shows the code of the mk file:

\

Here we use cocos2dx with only scripts to create a blank game. Compile and run the tool to analyze the size of the cropped database before and after the tool. Crop method. Delete the code in the box.

 

Before cropping a database:

Xx.apk size ------ 3.36M wherein libcocos2dcpp. so size ---- 2.7 M

Size after installation ------ 6.83M in which libcocos2dcpp. so size ---- 5.3 M

After cropping the database:

Xx.apk size ------ 2.26M wherein libcocos2dcpp. so size ---- 1.5 M

Size after installation ------ 4.48M in which libcocos2dcpp. so size ---- 2.9 M


Here we can see that apk is reduced by 1.1 MB, and after installation, the size is reduced by 2.35 MB. Although the apk size is not much reduced, but for some small size apk, This compression volume is very considerable.



Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.