Seeing it all at once

When developing an application, it often helps if you can hold all the moving pieces in your memory. As your experience grows, you will learn various systems and understand how they work together, and while you may not know every variable by heart, that feat will eventually not be as daunting as it sounds.

Diagramming your application can go a long way to help you understand the flow of your project from the word go. If used from the planning stage, you will tend to write code that is cleaner and easier to manage.

Let's take a top-to-bottom view of our Application Manager in a diagrammatic format known as a mind map. This type of diagram lets you map out all the important elements and even connect the associations, if you so choose. In this case, we are aiming to keep it simple, that is, without any associations:

It can be argued that UML or Unified Modeling Language is a better choice for planning application development, and I would agree, but with these caveats. First, a mind map is a great place to gather your raw ideas and plan your steps before moving them to a UML diagram. Second, mind maps are far easier to digest for beginners, so they are the right choice for this project.

In the preceding example, we can see a breakdown of all the variables and GameObjects, all the enum states, and the methods used to create the experience. This is a simple snapshot of our application. While we cannot see that IEnumerator StartGame() calls the DeleteSkeeBalls() method, enables the ChangeLayerOfChildren component on the spatial map, or sets the AppState to gameInProgress when it is finished, having this overall view can be a simple way to compartmentalize the workflow.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.226.251.68