Http://www.unitymanual.com/thread-173-1-1.html
Original title: Optimize your mobile game (no delay, is healthy)-an article for the game art designer to read
[The translator's words (Sina Weibo @ Rolling Stone, welcome to discuss together)]
As the company currently does not have professional technical art (Technical Artist), in the recent project development has touched a lot of walls. So I did some research on the optimization of fine arts, listened to some lectures, read some articles, you are about to read this is one of them, I feel good, and in the reading to get the resonance, so also decided to translate this article into Chinese. I hope that in the company, for our art designers as a reference, and also share the hope that if we can have a little help to meet the same troubled team or art or any colleagues, I would be very honored.
Because I am a procedural ape, so there is inevitably some words in translation or the comparison of the translation of the art professional terminology of the two places, please understand.
Original address: Optimising Your Mobile Game (less lags, more Awesome)
------------------------------------------------------------------
Have you ever developed a mobile game, when you handed it to reviewer, it was filled with hope that it would run as fast as the hundred-metre sprint, but the result was faltering, even as slow as crawling. It sucks, doesn't it? We realized that this could have been avoided, but many small errors and omissions piled up and eventually paralyzed the program: It was too slow! We have been so careless to make mistakes, we must have forgotten to give their own "role attribute table" and the ability to predict the future if so, we develop the game--alienation, will become impossible to play. Fortunately, we stopped making mistakes and began to gather ideas to optimize the game (optimized to be the new Trump weapon in our development!). )
<ignore_js_op>
Why we're moving from 2D to 3d
Considering the recognition from both the Test player and the local media, we decided to create a 3D destroyed game (destruction games) to fill the gaps in the market. It's amazing that most of the destroyed games are 2D, but 3D is the type of game that is destroyed because the 3D version feels so great. Of course, you need to do more work to optimize your art line (art pipeline).
Efficiency and optimisation let me feel warm in some areas I don't even know, so there's something to share with you, I remember them in my head, and keep reminding my team to follow them to ensure that our 3D tour will continue to run smoothly.
When to choose 3D (when to keep 2D)
As a 3d game art, the first key lesson I get is to keep everything as low as possible-don't use extra unnecessary vertices, if you really want your model to have precision, put it in the map. For example, our buildings are created from simple blocks and then pasted with textured detail textures.
When we are modeling Vogel (which appears only in the GUI and HUD of our game), we first try the 3D model, but in the end we break it down into a multilayer 2D plane like that in Flash. It runs very smoothly and looks better, and the end result is much better than the 3D model! With the animated 2D plane, it's easy to create details that make Professor Vogel look cool and match the artistic style of the game.
Now every time I see it (the lower left corner is Professor Vogel), but also can not help but tears of happiness;-(
<ignore_js_op>
Don't be lazy on texture optimization!
The size of the map is most easily overlooked by most art designers, and it takes a lot of space to know the texture!
By chatting with a few designers, I find that many of them are accustomed to creating the dimensions they feel comfortable with, such as 512x512, which is common sense, nothing wrong, but the only problem is that designers don't reduce them to a more reasonable size before exporting them.
A smaller and more efficient decal file that, when placed in the game, looks as good as a large decal file! But if all the designer's work is done in the wrong map size, unfortunately, all the designers spend a lot of time drawing fine art details, in the game is reduced size, will be mercilessly erased
To avoid this problem completely, I suggest that the designer should do some extra processing on the map after lowering the size, or use the same resolution as in the game when it is created. Because of this, the designer can precisely control every pixel in the map.
File format, texture reuse and shaders
PNG is less "evil" than many other formats. Compared to JPEG lossy compression, its compression is lossless, although the processing of alpha transparency is not as good as TGA, but it also compresses the file while still ensuring good enough alpha mapping, is indeed better than the other format wins.
<ignore_js_op>
The lessons of many teams are similar:
Unreasonable map size + unreasonable file format = takes up too much texture space = slower game = find texture and reduce size = lost detail = Wasted Time = very frustrated art designer = very angry art Director
Another very useful suggestion about textures is to reuse them as much as possible . Obviously, this is not just for stickers, but for any other game resource. During our creation of the alienation, we did not create new maps for weapons and metal objects that were almost impossible to see, and reuse the maps of buildings for these very small and trivial objects. With only a little UV tip, you'll never find that their textures are actually reused.
It is very important that you choose the appropriate shader program. Of course, the normal high-gloss Shader (bumped specular Shader) when used on objects, looks too damn good, but should use a specific phone custom Shader, make the game more efficient. In unity, this is easier because unity has a built-in set of shader specifically for mobile phones.
When to use a mesh (mesh model) when using alpha mapping
The great advantage of alpha mapping is that it makes parts of an object transparent, very easy, and relatively economical (cheaply) [Author note: It says here that the economy is relative, from the point of view of handling consumption (processing cost). Every pixel, polygon, shader,light, particle, and bone will consume the processing performance of your game. ]
However, in some cases, mesh is more efficient than alpha mapping. For example, when we create a wheel for a car, in order to show the gap in the middle of the wheel, it is much more efficient to build a grid model of the wheel than to use a map + transparent method.
I realized that I was a little self-contradictory here, because I said earlier that I had to put more details on the map than on the grid model. Remember that there is no absolute optimization technology, if you have the ability to choose the most reasonable optimization technology at a particular time, it makes you not only a game art designer, but also a great designer
Particle systems, draw calls, and physical
For any game, visual feedback (visual feedback) is extremely important for attracting players. If there is a lack of feedback on the player's operation, the game becomes very dull and lethargic.
When it comes to feedback: particle effects are a great way to convey information to the player. It could be a spark particle effect from a bullet hitting the wall, or a bullet shooting a Nazi's blood-splashing particle effect.
But for particles, some things are easy to make mistakes. The 1th is the size of the map, for the size of the map, the first half of this article has already mentioned, if you skip that part, it is strongly recommended that you go back to the front to see, I guarantee that part of the content can make you immediately on the map optimization to become a more sexy person (rather than a random map of the person):D
For the 2nd of the particle system, many people do not realize that increasing the number of particles does not increase the particle effect at all-it will only make the game slower. One can create particle effects in two ways: the first is to achieve the best results with as few launches as possible, and the other is to engage 2000 particles, and then ... Run slowly ...
You rarely see a launcher in real-world games with 2000 particle effects, the only reason is draw calls.
Draw call is created for each different object in the scene (more than one draw call adds a little more game processing time). For particle systems, it is easy to overload on draw call.
I like to make some particle effects, but whenever I see some beginner designers, I see a nice and efficient particle effect asking: "Only 10 particles?" Too little, this one would be better with 2000 particles, "I'm so fucking depressed, even physically uncomfortable.
<ignore_js_op>
For, uh ... ... why are you doing this, very bad primary art?
Physical
Nothing is more cool than accurately shooting into a building and seeing it gracefully and imposing the fall.
Why is that? All of this is because of the sweet and sexy physical system.
When it comes to physical systems, program apes are experts in this field. So the next paragraph might be a very hard-to-parse language for a program ape, so if you're an art, you can stand it here.
At each frame, the physical system is updated many times, and physics updates the position, speed, and all other properties associated with the object affected by it. The number of physical updates per frame directly affects the speed at which the game runs. So one way to speed up the game is to reduce the number of times each frame's physical system is updated.
This is certainly a way to try, but the downside is that it can affect the accuracy of your physical system, so it's important to balance the number of updates per frame to get the best and most efficient physical effects.
One example, when we reduced the number of physical updates per frame, a sphere in our game might have crossed a wall, which ... I think the ball is not real through the wall, do you?
So it's not easy to adjust the frame rate to an optimal physical update, which can take a while for our company to program apes for a while.
Light and Sky Box
Two things I'll get through quickly--light and Sky boxes.
The amazing thing about sky boxes is that you don't even have to use them as the sky! (Am I right?!?! )
A great way to include the background art in the sky (background art), which makes it easy to add a lot of background art and atmosphere to the game.
The light is a bit mysterious, so I directly, for mobile phones, it is best to use parallel light (directional), or if you are lucky, add a few lights (point light) can also. In the alienation game, after the light did the day after the study (I lied, in fact, I was Google a bit Unity light;-)), I found that the spotlight (Spotlight) in mobile games is the most consumption of the performance of the source, use caution.
To end it all
All of the recommendations mentioned in this article will not allow you to change your game immediately by adopting one of them independently.
But if you combine all of these optimizations, your game quality will immediately get a qualitative improvement, then, ah hum, waiting for the happy cry ~
------------------------------------------------------------------
[Translator's words]
Personally, these suggestions are very good and remind yourself to follow them during game development. But because all the games we develop are all kinds, the engine used is completely different. Don't use some kind of optimization advice as dogma, you should choose the one that best suits your team. Use the profiling of the game engine as much as possible in order to observe and analyze the factors that affect the game system in time, not the dogmatic numbness follow various optimization suggestions.
Original link: Optimize your mobile game (no delay, is healthy)-an article for the game art designer to read
Game Bull: http://www.unitymanual.com