Decoupled code


Solidify existing code to prepare for planning implementation.


  • Decoupled previous code from visualisation/debug
  • Created PlanningParameters class to handle all of the planning input
  • Modified all existing classes (pathing, viewsheds etc) to take only a PlanningParameters object as the constructor
  • Set up PlanningParameters to create all data requirements (viewshed, terrain graph and cost map etc)
  • Created UnityPlanningScript as an interface between the unity engine and the PlanningParameters object. Also acts as a stand in planner based off publicly available methods (eg. Calculate path based on where a gameobject is located in the unity engine – transforms unity coordinates to TerrainObject coordinates and calls relevant methods etc)
  • Tested creation of viewshed etc on a seperate thread. Doesnt result in faster creation but does prevent program freeze while calculating.
  • Created UI to test initialisation, path creation etc
  • Created a simple Plan class to hold the details of a finished Plan
  • Created seperate Visualisation class that uses information from the above data classes to visualise a Plan
  • Created a TestPlan method which will take position of in editor placed markers for FUP/SBF and create a Plan object to be visualised


The implementation of PlanningParameters works very well and effectively hides the underlying code from any planner object (thus removing a lot of complexity from the ‘front end’.

The visualisation is still quite simplistic but gives a basic idea and is quite easy to extend. An example is below:

3D isometric view of visualised enemy and friendly positions with paths to FUP and SBF locations
Visualised plan showing enemy (Red) and friendly (Blue) locations with paths to the FUP (top of screen) and SBF (middle of screen) positions. These positions were manually placed in order to test both the creation of a Plan object and the visualisation script.


  • Modify graph to store the function required for calculating a viewshed impact on the cost field. This can be an anon function passed as part of the planning parameters (Use of  delegates etc. required)


3 hours (60 hours running total)

Time spent on edited addition:

2 hours (62 hours running total)


Began development of presentation for initial CDF Seminar on Friday.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s