Wwise Tour 2018 – Tencent Games (5 of 5) CPU & Memory Optimization for Mobile Games

Wwise Tour 2018 – Tencent Games (5 of 5) CPU & Memory Optimization for Mobile Games


OK. That… On this page, let’s see… how we used Custom Device plug-in in Wwise. We developed a plug-in by ourselves. It can route Wwise output to our cell phone. Then, we can build a sound monitor. That is how it works. Now, we will go into program related stuff, and performance optimization for mobile games. Before… Let’s have a look at the… performance overview of popular console platforms. These are… These performance statistics… We got these data from some online review sites. Let’s have a look. PS Pro, not PS. Its CPU is… actually similar to PS, which is 2.1 GHz. For Xbox One, it’s 2.3 GHz. And for Switch, a platform that is… that is most similar to our cell phones, it’s 1.9 GHz, using CPU from NVIDIA. And, their memories are 8GB, 12GB and 4GB. Let’s have a look. And the performance for mobile platform… Here we have Qualcomm 845 and… Apple A12. Qualcomm’s basic frequency is 2.8 GHz. And for Apple, it’s 2.5 GHz. Developers must know that it is actually meaningless to simply compare the basic frequency for different architectures. Cause they use different kinds of optimization methods and instruction sets. Still, I want to…my point is that… Today, our cell phones… some of the high-end cell phones’ performance have been improved a lot than before. Now we can do something on cell phones, something that we usually do for client games. I want to…to make this clear to you. And… However, the truth is… The facts are always contradictory. On the other hand, we… The truth is that our users…they… These are the top 10 Android devices’ statistics from Tencent’s big data platform, an open platform. We took these parameters down. This doesn’t cover all their smartphone models. The first eight are mobile devices. We can see that, except for two of them… one of them has a price over 2,000 RMB. And, the others are mostly under 1,000 RMB. Some of their prices are even lower, 600 ~ 700 RMB. So…although… Although, for the high-end cell phones, they have pretty good performance. However, the cell phones our players using might not be as good as we thought. So… If we outperform others with respect to performance, then we may attract more users. There would be more users playing our mobile games. And… With a CPU around 1.4 GHz, about half of Qualcomm 845, 2.8 GHz… With a CPU around 1.4 GHz, can we run a smartphone like this with full load? Or, can we unleash… unleash the platform’s full potential? Of course we cannot. Cause cell phone is not a Switch or a game console. Players still need to use it to make phone calls, to keep touch with their friends. What if your girlfriend calls while you’re gaming? Just tell her your phone is out of power? Definitely not a good answer. So… Although we have such a… such a powerful calculation platform, we still need to be aware of that… In contrast to PC, we cannot run games with too much CPU usage, for mobile devices. Full load is not an option. We need to be aware of that. We need to control the overall CPU usage. Meanwhile, on the other hand… High CPU usage will cause another problem, i.e. heat. When users play mobile games, they are holding… While playing Switch games, you’re holding a controller. However, when you play mobile games, you’re holding the cell phone itself. So, you… Our… The cell phone gets hotter when CPU usage goes up. And you feel less comfortable when it gets hotter. That is the point. On the other hand, for memory usage… No matter for Android or iOS platform, we have a limit on max memory usage. When you’re over the limit, system will kill the game. It will be forced to terminate. So we… Generally, we need to lower the CPU usage, and control our memory usage. And, be careful not to exceed the system threshold. First, I will give you a brief introduction… Here I will show you some… some points that are related to sounds… during game optimization. It’s not too complicated, just a brief introduction. First, for CPU usage, we need to… Our goal is to minimize the average CPU usage. Also, it will seriously affect cell phone’s battery usage. On the other hand, we need to avoid peak CPU usage. Cause for FPS games, the stability of frame rate is a serious consideration too. Therefore, we need to avoid peak CPU usage. We need to equalize our CPU usage. There are several ways to do that. The first way is culling when max-distance is exceeded. In short, actually this… Platinum team talked about things like this just now. That is, when sounds exceed a certain distance, we cull them immediately. For this… We need to pay attention to several things. First, looping sounds. Second, other things related to features in Wwise. For instance, we set a Switch for an Event, or we set a State for it. Then, this Event should not be culled. Therefore, we need to make an exception. The second way is updating frame-by-frame. For this… Take the obstruction features for example. Let’s say, in a 5v5 combat, there are one 1P player and nine 3P players. In simple terms, for the first frame, it will identify whether 1P and A is blocked by obstacles. For the next frame, 1P and B. Then, 1P and C. In this way, it will identify the situation back and forth. This way, we can… equalize the whole CPU usage to every… equalize it in the whole gameplay. And this… For those sounds undemanding in update frequency, like when obstruction is required. Cause in that case, usually players move in slow speed. Also, for players… Thus, we don’t have to update values too frequently. And, actually we can use some… We can use interpolation to simulate… frames that we missed. And, secondly… Another example is ambient sounds, as we said before. When we identify the directions (front, back, left, right), actually we can update frame-by-frame, and then… And then…well, let’s not go too deep on this. This is pretty much we should know for now. Meanwhile, in Wwise… it’s critical to our sound designers that… We must control the number of concurrent voices. That means we cannot… We cannot make short shrift on bus settings. Or we don’t set them at all. It simply will not work. Cause on low-end models, even we… even we run ten Ogg decoders to decode, it will cause some performance issues. So… In Wwise, we need to limit concurrent voices. And for memory usage, cause the game will have an overall memory budget, so we… So we have to set a memory budget for sounds. Therefore, the audio team need to… We need to ensure that the budget cannot be exceeded. Within this budget, the lower the better. However, we need to consider the configuration… We need to consider the easiness and efficiency when we split Banks. Cause this is also an important thing. And, if we split Bank too much, sometimes sounds won’t play as expected. Then, we will have to check which Bank is not loaded. And this will cause problems. Therefore, we need to balance our… balance our overall development efficiency, and… We need to balance our memory usage. And the other thing is that memory… For platforms with rigorous limitation on memory, for streaming sounds, the game need to… it has to use more IO to exchange for memory. That is how it works. And… For other optimization, they are mainly on the workflow. First, whenever we design sounds, we discuss with programmers. We validate different design proposals. Cause a proposal… There might be several proposals for just one effect. And these proposals have different performance, they are quite different. So, we may choose a compromised one to do it. And we simulate that effect as possible as we can. We…at an early stage, we communicate and discuss with our developers. And we need to…ensure that… Our design proposal will not have serious influence on the overall performance. And secondly, whenever we carry out iteration… Cause we…if the development cycle is one year, we may have to maintain for three or five years. So we… And for each game version… There will be many resources, or even a new mode… there could be a completely different mode. So when each… For each version released, when there is an update version, we have a dedicated test team to… to do a performance test to the whole game. Thereby, we ensure this updated version won’t go wrong. If the audio team made a big modification… If we…for instance, a rebuild. Or, if we have a new feature to be added, we would notify our test team, to pay close attention. And cooperate with them, to optimize the performance. Now, let’s talk about that… In almost all our games, we will… we will do one thing, which is to control the sound performance in game… according to the visual resolution, setting different quality settings, i.e. high, medium, low. So…the easiest way do to this is to control max number of voices. And for effectors… or for some… some expensive features at code level… We will try to bypass them. Normally, we… That’s what we do for program related elements. Now, that will be all about our sharing. Let’s see…

Leave a Reply

Your email address will not be published. Required fields are marked *