Game Development Reference
In-Depth Information
opt for a more formal approach to asset bundle creation that involves manifests
and explicit asset-bundle creation.
2.3 Passive Requests: The Art of Asset Streaming
For the most part, blocking, active, and queued asset requests are fairly obvious to
implement. The biggest challenge is knowing which request type to use on a given
asset. All of these requests, however, are made by specific gameplay code, which
means that the game already has a specific need for the asset. Passive requests
are an area where you can reduce load times and waiting for assets immensely. If
you can accurately predict what the game is going to do in the near future, then
you can preload assets and avoid the download time when the asset is requested by
gameplay code. Most of the tools used for setting up asset streaming are merely to
aid developers by helping them watch what is going on inside the asset manager,
but the passive request manager is where a designer can take that information and
use it to improve load times.
Setting up the passive request order begins in the build process. When the build
process creates asset bundles, it generates an asset manifest file which contains
information about all of the bundles that the game can download. It's possible to
add ordering to the list of asset bundles in the manifest so that the passive request
manager loads by priority. The first step in setting up the passive requests queue
is an automated process that tracks when an asset is first requested. In a linear
game, the assets can be organized by the level where they first appear; in an open-
world game, they can be sorted by location; but in other games such as multiplayer
shooters, there's no easy way to predict this, because the player can jump to any
level right from the beginning.
While having an automated process that generates the passive request queue
automatically is a good start, much better download times can be gained by giving
designers the ability to re-sort the queue. This way you can predict what the player
might do during a typical play session and adjust accordingly. To gain this type
of control, the passive request queue is converted to a priority queue. Designers
are provided with the ability to supply priority deltas to certain events, which
causes assets to change their priority and therefore their position in the queue. For
example, if a player enters the game and loads a saved game at level three, then the
assets for levels one and two should drop to the bottom of the queue. Subsequently,
the assets for levels three and four would be promoted to the top of the queue.
The passive request manager allows a developer to string together events in a
diagram in which they can look at the position of assets in the queue after certain
events. By stringing together events and looking at the order of the queue after
those events occur, it becomes much easier to know what values to put in the
priority deltas. Multiple scenarios can be tested quickly without having to actually
play the game. This way is much faster and ecient in setting up the order of
Search WWH ::




Custom Search