Author: Thou Curator
Monday, July 27, 2015

Project Coding Standards

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. 
/// Text

  1. 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.
  2. We will be using composition to create these classes and not inheritance OOP approach.
  3. We will be using strategy pattern as a way to make unit testing easier and scaling the game in the future using interface classes.
  4. In each Asset > Mechanic folder you will find two other folders.
    1. Dependency which is to be used only for interface classes
    2. Functionality which is to be used for the class definition of the interface class in the dependency folder.
  5. 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.
    1. The naming convention for this folder should by functionality first such as NetworkTCPData etc.
  6. 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.
    1. The naming convention for this folder should be by functionality first such as InputMouseLogic or NetworkTCPLogic etc.
  7. The "Utility" folder is for all things that we did not create.  3rd party code etc.
  8. 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.
  9. 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.

Project Coding Standards
Project Coding Standards

Coding Standards

Creator Profile
Joined: 11/9/2016

ver: 20230928T145042