General Programming Architecture Guidelines
MCU will create a folder structure as follows every time you do a get latest to help keep our structure together.
Asset > Sandbox > FirstName_LastName > AgendaId
All scripts that attach to a game object need to be label as Script + Component Name E.G. ScriptLandUnit.cs or ScriptCameraMovement.cs
Each agenda should have a sandbox scene in the "agendaid" folder to demonstrate the new or updated functionality of the agenda task requested.
Also any public property should have a summary tag above it E.G.
- The root code base in the asset folder structure will be used as a component in the game engine. These root times will maintain a naming standard of the mechanic it interacts with. For example, the code EnvironmentCamera.cs would be in the "Asset > Environment" folder because it is a component of the environment and will be directly attached to the terrain. However, the code for spawning units on the map will not be a direct attachment to terrain so its location is "Asset > Environment > Instance > UnitSpawn.cs" because its a mechanic that support the main component.
- We will be using composition to create these classes and not inheritance OOP approach.
- We will be using strategy pattern as a way to make unit testing easier and scaling the game in the future using interface classes.
- In each Asset > Mechanic folder you will find two other folders.
- Dependency which is to be used only for interface classes
- Functionality which is to be used for the class definition of the interface class in the dependency folder.
- The "Data" folder is for getting and handling all data from network TCP/UDP to file system. If its data the handling of it will start here. The items in this folder should not be a component for Unity.
- The naming convention for this folder should by functionality first such as NetworkTCPData etc.
- The "Logic" folder is for all code that is shared between more than one mechanic. Such as the mouse input or a debugging tool that profile the application. The items in this folder should not be a component for Unity.
- The naming convention for this folder should be by functionality first such as InputMouseLogic or NetworkTCPLogic etc.
- The "Utility" folder is for all things that we did not create. 3rd party code etc.
- The "Sandbox" is for testing what you need you can throw in there for testing until you get it figure out and can section it out to where it needs to go in the other folders.
- The "Model" folder is for transporting data from class/method to another or over the wire using TCP/UPD etc. These are just a holder or struct to move data in a clean way.