Unity3D is an amazing game engine that has enabled developers and designers to create some truly incredible games (like Assassins Creed Unity) with far less effort that would otherwise be involved. Indie game developers in particular really like Unity3D because it allows them to build multi-platform games with minimal effort and limited budgets.
Sometimes though, developers do run into complications when working with Unity3D. That’s not because there is an issue with the platform. On the contrary it is due to their own software design practices, when creating their game’s overall architecture and while maintaining their code.
First time programmers usually start learning the trade with the classic Hello World program. From there bigger and bigger assignments follow and pretty soon, they find themselves working in teams where everyone is working on the same code, which they are not really used to. Whereas previously, when working alone, they could pretty much do what they wanted when creating code, when working in a team, there are certain practices that must be followed while designing and maintaining the code. The bigger the project, the bigger the spaghetti – as the saying goes.
This is where software design best practices come in. These practices when followed by everyone, allow you to maintain and navigate legacy code much more easily, and add new code more quickly. By following these practices, you can easily separate core pieces of large projects and organize them in a standardized way, thereby eliminating the confusion that occurs when team members come across unfamiliar parts of code in large projects.
Below are some of the software design best practiceswe follow at Folio3, when working with Unity3D.
If you’re using C# as your development language for Unity3D and not ReSharper, then you’re missing out on all the fun. ReSharper basically extends Visual Studio code inspections. It provides quick fixes that help you improve your code in one way or another. It’s refactoring power also helps you safely organize code and move it around the solution, distribute responsibility, decouple, decrease complexity, or simply use alternative language syntax. The following code snippets highlight the key features that ReSharper provides.
Refactoring a complex IF-ELSE statement to SWITCH cases.
Converting a FOREACH statement into a LINQ statement
Marking a function as static, where possible.
To download ReSharper, head on over to the link below.
Hope you guys found this post useful. Stay tuned for the next part!