Game Development Reference
In-Depth Information
Split the pipeline into several independent steps. Frequently, dependency
extraction can start and end without executing any compilation steps. A task
scheduler can be fed based on an execution plan built from the dependencies.
Packaging of development versions, daily builds, and release candidates may
be postprocesses.
1.3 Dependencies
Automatic asset building can be thought of as the execution of a series of steps
determined by a complex recipe. A given step can be safely executed only after all
its requirements, or dependencies, are satisfied. On the other hand, a node needs
to be reevaluated only when its direct dependencies or the dependencies of their
direct dependencies differ in a significant way. Knowing that, the order in which
the tasks are executed will be fully determined by the overall set of dependencies.
1.4 How to Determine Dependencies
Establishing the correct build dependencies is a conceptually simple process: it
requires the construction of a directed acyclic graph (DAG) resulting from the ag-
gregation of each node's dependencies. Frequently, these dependencies are modeled
at the file level, but finer grained approaches can also be used. In the later case,
dependencies are extracted from the files themselves.
We will assume each processing step is deterministic; that is, it always pro-
duces the same output for a given set of inputs. Even if this is not a requirement,
advanced techniques such as caching and proxing can be greatly simplified. There-
fore, any processing that relies on random number generation, timestamps, IDs,
and references to other objects will need to be carefully designed.
There are two basic methods that can be used to determine the full set of
dependencies.
Hardcoded dependencies. This is the most primitive approach, as dependencies
and order of execution are hardcoded into the scripts. As such, each new entity
requires an update of the system. The asset build simply executes every known
step in the order determined by static dependency data. Because files are compiled
assuming every dependency is ready, this approach restricts flexibility. Missing
inputs due to user error may be dicult to avoid and debug. Smart scheduling
is also out of the capabilities of the framework. This method is the equivalent to
batch and shell scripts or really simple makefiles. It can only be used in simple
scenarios where dependencies are described at file level only.
Automatic extraction. Each compilation step is represented as a templated de-
scription of the inputs that are required, the outputs that are produced, and the
parameters used in the execution of the compiler. The full set of inputs and the
Search WWH ::




Custom Search