6. Mobile Version Optimization Guide
Overview:
Unlike the current high-end devices (WII, Xbox 360 and PS3), mobile devices are very limited on the market and all mobile devices are different. Like Adroid mobile phones, because the brand and the factory years of different, a part of the mobile phone relative to the entire market is old, slower. However, as game developers do not have to abandon this part of the market because of these old devices, because especially in China, these handsets occupy a large part of the market share. So how to ensure a good game screen at the same time, to ensure that the game can be quickly and effectively run, is the developer in the early game development should consider the problem. The purpose of this article is to be overwhelmed by the development of new mobile games for the application genesis-3d engine, or as a reference for developers planning and prototyping new mobile games, or porting existing projects to mobile devices to run them smoothly. The best development of the game for developers to optimize, so that the development of the game interesting and rapid.
Analysis
Analysis is important because it can help you identify which optimizations are good for performance improvements and which waste valuable time. A lot of data shows that most of the time the game runs is spent on rendering. Optimizing rendering as a way to improve the speed of the game is worth more developer attention, and artists need to know the limitations of the platform and the methods they usually bypass, so that they can make useful, creative decisions without having to redo the work.
Precautions:
1. In the production of art resources. You should try to avoid using normal maps. True normal maps are used only on characters. Avoiding normal mapping can reduce the time of real-time rendering and also reduce the time to make art resources. For example, in Runcool, the map size does not exceed 256*256 pixels, the model does not go around normal and tangent, use Hong Pei care, etc.
2. Although the engine supports the object plate. However, in collision detection, players are not recommended to introduce a rigidbody. Handle the collision detection of the object itself. For example, the Runcool is introduced into the actor, and the collision detection is realized on the program.
3. GPU optimization, especially on a mobile device, can have a significant performance overhead when performing alpha testing (or cutting and discarding operations in pixel shaders). If possible, you should use alpha blending instead of alpha testing. If the alpha test cannot be avoided, you should ensure that the number of pixels visible for alpha testing is minimal.
4. Texture compression.
(1) iOS texture compression, there are some images, especially the use of ios/android PVR format compressed texture, with transparent channels of the image compression after a large loss of quality, according to their own needs to use. In the Genesis-3d engine editor, the integration of this feature, compressed image will retain the original suffix name to overwrite the original image, it is recommended to compress the picture before the release.
(2) Android texture compression, all Android devices can support OpenGL ES 2.0, and therefore support ETC1 compression format, so use ETC1 as the preferred texture format as much as possible.
See more highlights of this column: http://www.bianceng.cnhttp://www.bianceng.cn/Programming/extra/