Week 3 Devlog: Architecture, Performance, and Games

Devlog Week 3

1. Software architecture is the actual organization and structure of a program. In Unity, it is very important to organize your code well, as it is necessary to frequently tweak aspects of your code as you playtest and adjust your game and its mechanics.

2. When prototyping, it is usually most efficient to write placeholder code in areas of your game that you do not intend to fully flesh out in the prototype. Although this leads to cases in which it will be difficult to adjust parts of this placeholder code, this is usually not too detrimental, as the ultimate goal is to completely scrap and rewrite any placeholder code in the final version of your game.

3. Decoupling refers to the process of making pieces of code independently comprehensible without the necessity of prior knowledge in other aspects of the code. This is incredibly important in software architecture, as writing code with good organization means making the code easy to understand even without any previous experience or knowledge of how the code works. 

4. In the following example taken from an assignment I coded in Java, I found that I had an opportunity to simplify it and optimize it. Because the processing segment of the code doesn’t need to run in cases where one of the sides is larger than the other two combined, I could have removed the section where I set prm to equal the sum of all sides, and simply done the math in the output section of the code.


                             prm = side1+side2+side3;                            


                             if (side1+side2>side3 && side2+side3>side1 && side1 +side3 >side2)


                                           System.out.println("The perimeter of your triangle is " + prm);




                                           System.out.println("The side lengths of your triangle are invalid");



Log in with itch.io to leave a comment.