Today’s topic is about how to automate your development process. At Dubit there are strict coding standards, large development teams/structures and constant development of products. My old development style would have not kept up to the pace that Dubit expects. I had to change my process and one way of doing this was via automation.
When I write automation I mean making computers do tasks you shouldn’t be doing as it wastes time. I am going to pick on three things: Building, Code Standards and Asset Editing/Unity Tools.
I like to walk but going over to the office development mac and creating an IOS build was becoming a chore. Not the walking itself (which is at the other end of the office) but why all the hassle of creating a build manually. After doing an IOS build then the android build and a PC build thats roughly 30 mins of wasted loading bar watching and walking. The solution is to have someone else build my projects and let me know when it’s done.
Unfortunately I cannot afford to pay an assistant to sit at the PC and wait for my signal, I settled for using the Unity Cloud Building Service. It was easy to set up and free. It can do the builds I need as I work on my projects without having any interact with me during. I get a email letting me know what has built and the change log to go with it.
While it does remove the much hated waiting for builds issue the biggest issue it removes is me. To clarify it removes me as a dependency for the project. The project can swap me for another developer and the build process is the same and no human error because I’m no longer there. What’s great is currently on my way home I can get a build email on the bus, install and test the latest version on my way home and so can everyone else on the project. Free Quality Assurance/Testing.
I spoke in my last post about code reviews and this process can eat up loads of time. It eats up time on both ends the reviewer checking everything and the publisher fixing issues. I wanted to remove as much reviewing time as I could on both sides as a reviewer and as a publisher. One way I came to was to have something check the code for the strict code standards for me. This is achieved via StyleCop an editor extension for Visual Studio.
It will scan code for any rules that are broken which I have defined prior. This helps reviewing code by opening the project in Visual Studio and scanning it for any code standard issues. Then on the publishing side I know my code is adhering to those standards via the scan performed on my own project. Before I publish my code for review one quick scan and I can stop the reviewers picking up on small tiny problems in the future.
This is just one developer solution though, a more comprehensive solution is to use pre-commit hooks to check code before pushing to the repository which makes every developer adhere to the standards.
This is more conceptual and not a specific tool like the last two. I currently work in Unity and many Unity developers will know the engine allows access to a wide range of editor functionality. I have found these to be of great use in the past. For example we had a large game with hundreds of audio files in the project then we were required to edit all of the audio files (compression settings etc). Manually this would have taken days if not weeks and we would have most likely missed some or done some incorrect. A quick search online and I find out how to change the settings of an audio file via a window in Unity then another quick search for how to get all files of a particular type in Unity.
After combining the two and making a nice little window of the tool we have a automated audio settings editing tool built in our engine. Was fun to make and a great learning experience as well. Any number of tools like this can be made to help your game development from behind the scenes and stops you wasting valuable time.
These three automated tasks have reduced human error, time and dependency which in turn improves the project as a whole. The more tasks a computer can do the more time I can spend perfecting the code base, structuring and code development. I highly recommend trying to automate more jobs you might do a daily basis as the fun in making a tool might also teach you something and help you in the long run.
Thanks for reading!