This dramatic change was quite a shock for us, but it also meant our release and development builds were nearly on par in terms of build time now. While it can be beneficial to further test compression times with the different tools and different settings to improve those times even further, we already achieved great results by switching to the new default settings in Unity and were able to cut down the build times for texture compressions by nearly 100% and were unable to find any negative impact on visual quality or build size. Coming from an earlier Unity version, for God Kings those settings were using “legacy” mode together with the highest available compression quality for our final builds. Since then, there were quite some changes and Unity now uses different tools for ETC compression, depending on compression settings. We were wondering why final Android builds took way longer than iOS builds and we quickly came to the conclusion that ETC and ETC2 texture compression was the culprit which took about 30 minutes alone.ĭevelopment for God Kings started with Unity in version 5. Step one: Use the right tool for the task at hand Not all of them will be a 1:1 match for every project, but the underlying ideas can be beneficial in nearly every case. I will give you some examples on how we managed to get our build times in check for God Kings. With the help of proper logging it will be possible to analyze the time each step takes during your builds and take the necessary actions. The good thing is we don’t really need micro second precision, since we are more likely interested in tasks that use up several seconds or even minutes! Phase 2: The big question mark This means not every line might instantly be written to the output and some lines which originally would have slightly different times could end up with the same timestamp in the enhanced log, because the buffer got flushed with those lines at the same time. With every solution that enhances a log file with timestamps, please keep in mind that there will most likely be write buffers involved. With this tool you will be able to add a timestamp or the total runtime to every line of your build log.Įcho "This is\na test\nwith multiple\nlines." | ts -s '(%H:%M:%.S)]' | ts '[%Y-%m-%d %H:%M:%S' If you are using another environment to build your application there are similar solutions as well, like for example the ts command line tool from the moreutils collection. We are using Jenkins to enhance our build log files with timestamps. In the case of build time optimization, this means we need to know how much time was spend on every part of the build. The first thing you need to do, before you can really optimize anything is to gather the necessary data. We need a Plan! Phase 1: Monitor your Builds God Kings is using Unity 2018.4 LTS together with custom C# build scripts and a Jenkins environment on an Apple Mac Pro node with 2,7 GHz 12-Core Intel Xeon E5 and 64GB memory to build the application during development and for releases. With any stated times in this article, please keep in mind that those times will vary depending on the current system load and used hardware. Especially if the responsible developers have to switch context and work on something else before they can finally test and demonstrate their work on a device. For fast iterations this is obviously not ideal. In many cases there are even more than one tests with real mobile devices involved. While testing your game in the Unity editor is quite fast, it doesn’t always cover all the edge cases and a complete build for God Kings took up to 1:20 hours for a final Android release and around 45 minutes for a development build. You will need to have as much information on your build process as possible to manage this.Īt God Kings our normal development workflow for new features usually consists of working on a feature branch, initial testing in the Unity editor and at least one final test on a real device before the new feature gets merged into our stable master branch. To enable your team to the fullest potential, keeping your build times in check is mandatory. In this article I want to take you on the journey of how we managed to reduce our mobile client build times from over one hour to about 20 minutes for God Kings.įast iteration and turnaround times with testing on real devices are always a concern in mobile game development at InnoGames.
0 Comments
Leave a Reply. |