Let's continue discuss our preparing to ship checklist. Let's talk a bit about optimization now. We often make games on high powered desktop and laptop computers. When we go to build, test and deploy our games, we need to make sure that the game performs well on the target hardware. Be it a mobile device or a five year old underpowered computer. Optimization includes performance, quality, and file size optimization. In terms of performance optimization, make sure the game runs at a desired frame rate and is responsive to the players inputs, across the range of hardware from low end machines to high end machines. Often you need to optimize graphics, physics and code systems such as artificial intelligence, networking, and so on. A quick Google search will reveal many tips, tricks and techniques available to optimize performance across 2D and 3D games in unity. Use the stats panel and the unity game view to find basic stats on your game performance while testing. You can also use the profiler window to help find performance issues during play. You also need to future proof your game to make sure it does not run too fast as hardware performance increases. One good way to do this is to scale frame-based operations based on time. Such as multiplying changes by Time.deltaTime, rather than having them purely tied to frame rate. In addition to performance optimization, you also want to optimize the quality. That is, make sure the game is aesthetically pleasing across the range of hardware from low end machines to high-end machines. The game first and foremost must be playable, which you can consider performance optimization, and then the quality needs to be maximized to the hardware. Things to look at are lights, textures, shaders, particles, and the camera. Once again, optimization goes in both directions. Someone running a game on a low end device will expect less, and if you can give them more, there'll be impressed. However, someone running on a high end device expects more, make sure you deliver to them. Another form of optimization is file size optimization, generally, the larger the data, the better the quality when it comes to graphics, sound and videos. But no one wants a game that takes up all their storage space, and of course, the larger the amount of data, the longer it takes to download. Therefore, you often need to balance the quality of the visuals and audio with the size of data. To do this use compression. As I discussed in course 3, there are two types of compression, lossless and lossy. You often need to compress your assets differently depending on the platform. For example, you'll compress things more on a mobile device with a small screen and less storage space than on a PC. I generally like to keep my assets high quality and unity, and then let unity compress the assets on a platform by platform basis. By setting the compression settings for each asset and each platform in the inspector. Just like everything else, optimization is an iterative process. Make sure you leave time for it, and don't leave it for the last minute. Take a few minutes to think through these questions in relationship to optimization in your game. How can you optimize performance? How can you optimize quality? And how can you optimize file size? Pause the video now to think through these questions. Okay, let's move on to integrating analytics. From a technical perspective, analytics just means that your game logs what the player does, and typically stores this to a server across the internet. Before you release the game to the world, and even earlier, such as during beta testing, I highly encourage you to build analytics into your game. Without analytics, it's nearly impossible to know who is playing your game. How many people are playing it? How long are they playing it? What levels do they get stuck on? What achievements have they earned and so on. With this information, you can make rational design and business decisions about what to do with your game. And it's always gratifying to learn people are still playing your game you launched four years ago. And also possibly frustrating when very few people are playing the game you launched last week. There are many ways to integrate analytics into your game, including unity analytics, this is part of Unity teams. You can just turn it on and it will add basic analytics to your game. There is an API to add additional things that you want to track, or Google analytics, of course, Google is the big boy of analytics on the internet. There are a number of ways to integrate Google analytics into your game, including using some assets on the Unity Asset Store. For you web server programmers out there, you can also implement your own analytics, as I've done in the past by using the unity of web request class. Take a few minutes to think through these questions. What would be helpful to track in your game? And what is the best kept lead to integrate analytics into your game? After you think through these questions, we'll continue on through the checklist. [MUSIC]