Chinese game tutorial 1-Chinese Process

Source: Internet
Author: User

Chinese game process

The transformation of the game into the Chinese language is very challenging and accomplished. The challenge is to be brave in fighting with game developers and trying every means to open documents and obtain the final resources that require the Chinese language. The process is no less than a piece of reasoning. A sense of accomplishment doesn't need to be said. Like a development program, who wouldn't want to see their work be used by many people?

In fact, the Chinese game process is very simple, as shown in:

 

The yellow representation needs to be processed according to the actual situation. Most games need to process the font and encoding (the processing of font and encoding is a difficult technical link in Chinese, the subsequent tutorials will be detailed), but if you are lucky enough to meet some of the more generous Manufacturers (such as our totori studio in the Chinese language, using Unicode encoding, TrueType font library, then you can directly use the ttf font instead of generating the font again.) This step is much simpler.

OK, we still follow the process. The entire left side is the work that the program needs to do in the Chinese group. It looks like several simple steps, in fact, each step can be further split, and there will be little work to do in each step.

The first is to analyze the file resources of the entire game. Generally, the game resources are not the common file types in Windows or Linux, some game manufacturers use third-party tools to process or develop their own file formats. For example, psarc format (playstation archive) of PS3 and cpk of CRIWare. These files are a compression package for game resources. The function is to reduce the size of the game and reduce the existence of fragmented files to improve the running efficiency of the game. Some of these files can be unwrapped directly using ready-made tools, while others need to analyze the package data to write their own unwrapped program.

After the game resources are unwrapped, you need to start searching for text. Before searching for the text, you must first understand the encoding method used by the game text. Generally, japanese games on the PS3 use UTF-8, ShiftJIS, and Other encoding, as well as custom encoding used by the game (User-Defined encoding is a little troublesome to handle, but so far, no user-defined code has been encountered on the PS3, but on the PSP ). There are several encoding methods. One is to find the font first (most games use a self-made font, and the entire font is an image, an integral image, or a Tile image ), the text encoding of the game can be observed through the font. Second, perform a hex search on the file. First, find a dialog in the game, and then use the tool to select different encoding methods in the resource for search. For non-custom encoding, the second method is relatively simple. For custom encoding, you can use the relative search method (or differential search). This method needs to be carried out in combination with the font. Common tools for searching for font libraries and coding are CrystalTile2 (a powerful tool of the angel Chinese group ), another is the hexadecimal search tool I recently compiled (the source code is here). The hexadecimal search tools I found on the Internet are not very easy to use and are not suitable for Chinese.

After the text is completed, you need to process the game pictures. Generally, the game pictures also contain the content that needs to be written in Chinese (such as the cover ), the common format of game images is PNG or DDS (of course there are other formats ). However, these images do not lie directly in the resource file, but are encapsulated in a vendor-Defined Format (that is, some file header information and control data are added, however, the image content data itself is a bitmap), so you only need to remove the custom file header information and change it to the file header of BMP or DDS to open it with the commonly used image splitter.

After the text and images are completed, you need to write a program to export the text and images (preferably a batch tool that can process all the files in a folder as a whole ). The picture is good. Generally, the packaged file format is relatively simple, and the text is different and varied. Therefore, to export the text, you also need to read the data of the text packaging file. For example, a text packaging file contains header information, which tells you how many sentences the file contains and control data before each sentence, tell you the total number of bytes of data contained in this sentence (however, a special byte is generally used as the end of each sentence, for example, 0x00 ). Therefore, we need to read the data to compile the Import and Export program.

After the above work is completed, the Chinese language is basically half done. At this time, do not rush to translate text and images, A programmer with good habits always needs to test his own program. We need to replace the unwrapped resource package into the game to see if there is any problem. If there is no problem, modify the exported text and import it back to the game, check whether there is any effect in the game. After completing a series of tests, I will hand them over to the translators. Don't wait for the translation to finish before you can find out that you can't pack anything. That's a big loss.

After the translation is complete, what the program will do is actually a reverse process before the translation, just as it always goes down the hill. However, the general Chinese group program will complete the development of the import program while writing the export program, and, according to my habits, I will use my program to import the exported resources back, and perform an MD5 check with the original file. It must be completely consistent to ensure that there is no problem in the game.

The above is the general process of the entire Chinese process. It is rough. In fact, the entire Chinese process will be very complicated, and sometimes a very small detail will lead to various problems in the game. In the subsequent articles, I Will subdivide every step and then combine the examples to compile this Chinese tutorial. I will share all the source code involved in the tutorial on Github.

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.