Game Development Reference
In-Depth Information
templates are used to generate a full graph of explicit dependencies. These depen-
dencies are gathered without any knowledge of the contents of the source files by
applying the recipe that matches a given set of input and output file types.
The build will rely on dynamic dependency extraction when the dependencies
cannot be known in advance, they are stored inside a file, or this file is produced
during the build process itself. In these cases, a scanner will read, parse and extract
the relevant implicit dependencies to be added to the overall set. This means that
areas of the DAG are not known until the build has started and the corresponding
scanners are triggered. Implicit dependency scanning has been successfully used in
systems such as SCons and Waf [Knight 11,Nagy 10].
In general, everything that can possibly modify the result of a compilation step
needs to be tracked as a dependency. As such, it may be desirable to track the
version, compiler command line, and execution environment.
1.5 How to Use Dependencies to Your Benefit
1.5.1 Determine Dependencies as Early as Possible
There are many advantages to establishing dependencies as early as possible in
the pipeline. Knowing the dependencies even before the asset build is invoked can
potentially reduce the complexity of the system and the size of any transient data.
The cost of extracting asset dependencies in the DCC is small and will be amortized
by the amount of times they are used. Scanner execution is minimized, and larger
areas of the graph can be fully determined in advance. This makes the system
more predictable, increases system stability, and reduces processing time. Both
early data validation and smart scheduling become more feasible. This same data
can be used by DCC plugins to track references and allow the production team to
forsee the implications of changing a given asset.
As desirable as this is, early determination can only extract the dependencies
fromtheassetsthataredirectlyprocessedinsidetheDCCs. Figure1.2 represents
the nodes without input dependencies on the left side of the graph. In most sce-
narios, static determination can define large areas of the DAG but needs to be
complemented with alternative methods.
1.5.2 Dependency Granularity: Coarse or Fine Level
In many situations, a file can be considered an atomic entity that provides a high
enough level of granularity. In some other cases, when, for example, hundreds of
compiler instances share the same file as an input, finer dependencies can be an
interesting option. By using file-specific scanners, the graph can be populated with
detailed information. In case the original file is updated, only the tasks in the path
whose refined dependencies have changed will need to be reevaluated. This may
Search WWH ::




Custom Search