Game Resource Update Design

Source: Internet
Author: User
Tags relative

Recently in the development of the Hand tour, the project to the late, need to consider the automatic Update game resources implementation (if the logic is written in script, the script is actually a resource).


The design is divided into the following parts:

1. Client Resource Packaging

An index file is added to describe all resource file names (with relative path names), size, MD5 checksum, corresponding to the server-side relative path

2. Server-Side Download

Set up Apache server, put the resource bundle in the server corresponding version number directory according to the version number

3. Client Download

The client uses the HTTP protocol to download the resource index file, compares the local file, finds the file that needs to be updated, and then downloads the corresponding file from the server based on the HTTP protocol, then updates the local index file (last update of the index file so that the update failed index file is not updated and the next start is updated again)


You need to be aware of storage path issues when storing resources on mobile devices after downloading them:

iOS version is written under the documents directory, so read resources first to read resources under the documents directory

Android version can be written in the unpacking path

Two paths a little different

Related Article

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.