Game Development Reference
In-Depth Information
to these files being more numerous and having reduced variability in their input
dependencies.
As pointed out before, with the server being a central resource, in the case of
failure the build needs to rely on alternative servers or be able to work in a degraded
mode.
1.6.2 Results That Are Close Enough
In some cases, it is desirable to use compiled files, cached or not, even if they have
not been generated from exactly the same set of dependencies. For certain types of
nodes, and assuming the game code supports it, a result that has been generated
from the closest set of inputs may be used without significant differences in the
game experience. This option is especially interesting with files that are generated
after long compilation processes. Examples of this are precomputed lighting, baked
ambient occlusion, collision meshes, and navigation data. The advantages are clear
compared to the standard approach, where a change in a single mesh triggers a
complete reevaluation.
Without loss of generality, file hashes can be calculated using smart methods
that ignore the parts of the file that cannot modify the compiled result. Good
candidates are comments, annotations, and object and material names that are not
externally referenced.
1.6.3 Proxies
This second technique tries to avoid unnecessary work, namely, compilations and
cache transfers, by performing lightweight evaluations of regions of the DAG. While
similar in nature to the optimizations considered in Section 1.5, proxies are designed
so the build can operate using file hashes instead of the original files.
The relationship between a file and its hash can be exploited in many different
ways:
During dependency generation and early scheduling, a file can be fully repre-
sented by its hash. The file needs to be transfered to the client's hard disk in
just a few situations. For example, cache retrievals can be delayed until we
have clearly determined that the file is going to be read by a compiler or a
scanner.
The hashes of the outputs of a compilation can be stored and retrieved from
a cache server. This allows the dependency graph to be updated without
requiring the execution of any compilers.
Implicit dependencies can also be cached, so the evaluation of certain scanners
may not be needed.
Search WWH ::




Custom Search