Optimize mobile game performance, art related

Source: Internet
Author: User

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.

------------------------------

After chatting with a few designers, I found that many of them were accustomed to creating the dimensions they felt comfortable with, such as 512x512, which was common sense, nothing wrong, but the only problem was that the designers would not reduce them to a more reasonable size before exporting the stickers.

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.

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.

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.

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.