|
By
Linden
deCarmo
Gamasutra
July 7, 1997
This
Article Originally Appeared in the June 1997
issue of:
|
|
|
Features

DVD:
A Game Developer's Survival Guide
The
Digital Versatile Disc (DVD) is like an iceberg - a lot of marketing hype
on top, and exciting, but challenging technology under the surface. The
captain of the Titanic overlooked a seemingly innocent chunk of ice and
regretted it. Likewise, if you ignore DVD's game potential because of
its failure to live up to the initial publicity, you run the risk of sinking
your future. In order to avoid such a catastrophe, here is some information
necessary to start DVD development, including a review of the technology,
an exploration of how DVD is being used by some game developers today
and an examination of authoring and playback tools.
Although certain aspects of DVD technology (such as disc capacity and
format) have been well publicized, many features are virtually unknown.
This dearth of information is not accidental. The current cost to obtain
the DVD 1.0 Specification is $5,000. While $5,000 may be an insignificant
sum for a large conglomerate, some of us are hesitant to spend such a
small fortune.
Like floppy disks, DVD has a variety of capacities. The majority of the
early discs will use single-layer technology and can be either single-
or double-sided (with capacities of 4.7GB and 9.4GB, respectively). In
the future, more complex content will utilize single- or double-sided,
dual-layer discs, which hold approximately 8.5GB per side.
DVD Compression Algorithms
DVD encompasses numerous formats, the most important being DVD-ROM and
DVD Video. From a programmer's perspective, DVD-ROM can be considered
simply a high-capacity CD-ROM. By contrast, DVD Video (or DVD Movie) enhances
DVD-ROM by dictating how multimedia information is stored and played back
from the disc.
Most DVD Video titles will use MPEG-2 for video compression/ decompression,
whereas MPEG-2 is optional for DVD-ROM. Although MPEG-2 has noticeably
better picture quality than other compression schemes, it is extremely
processor intensive (software decoding of a four megabit MPEG stream consumes
100% of a MMX Pentium, leaving no bandwidth for decompression of other
DVD streams). As a result, DVD titles will require MPEG-2 hardware acceleration
to enable playback for the foreseeable future.
In terms of audio, DVD Video uses Dolby's AC-3 audio compression technology.
AC-3 was originally designed for theaters and the professional audio market,
and provides multichannel surround sound without tricks (such as manipulating
stereo digital audio data so that it appears to contain more than two
channels). Each AC-3 stream contains six audio channels: left, center,
and right channels for the front of the room, left and right surround
channels, plus a sixth channel for extra bass sounds to reinforce crashes,
eruptions, explosions, and so on. Unlike the other channels, the sixth
channel may only contain sounds between 3Hz and 120Hz - as a result, it
is nicknamed the ".1 channel" (.1 indicates a channel with limited frequency
range). AC-3 is sometimes said to contain 5.1 channels of audio.
All North American DVD players must also be able to play uncompressed,
linear Pulse Code Modulation (or PCM) streams. These streams have sample
rates between 48-96kHz, and can be sampled at 16 or 24 bits. Players may
optionally support MPEG-1 or MPEG-2 audio streams.
The Fledgling DVD Game Market
Although DVD is exciting technology, the immaturity of tools and questions
about the initial market size have caused many game vendors to hesitate
jumping into this arena. After all, cool technology doesn't pay the rent.
However, a few cutting-edge developers have evaluated the DVD gaming market
and believe it to be profitable. These vendors can be divided into the
following categories: those who view DVD as a huge CD-ROM, those who are
enhancing their existing CD products for DVD-ROM, and those who fully
exploit DVD Video technology.
The first type of DVD game vendor uses DVD as a monstrous CD-ROM. Companies
in this category transfer content from one or more CDs to a single DVD-ROM
and then ship it. While this approach is clearly the most conservative,
it allows access to DVD-ROM customers with minimal risk. It is also an
especially effective technique for games that span several CD-ROMs, since
players aren't annoyingly reminded to change the CD in the heat of a game
play. One such product is OBSIDIAN by Rocket Science Games. The original
CD-ROM version of OBSIDIAN is huge - it comprises five discs of QuickTime
content. Kim Hilquist, OEM manager for Rocket Science, noted that not
only has DVD eliminated the need to swap discs, but the increased speed
of DVD-ROM drives enables smoother video playback.
The second type of DVD vendor enhances its existing games for DVD by utilizing
MPEG-2 video and AC-3 audio. Xiphias, an edutainment developer, is one
such vendor. Steve Kaplan, a project manager at Xiphias, is impressed
by the technological potential of DVD. "For the first time, video quality
[of a DVD product] does not distract the user. The picture quality is
quite clear, and at some points, stunning," Kaplan says.
Although Kaplan is upbeat about DVD, he does point out some problems.
First, the tools used to create DVD titles are very immature and can make
title development laborious. For instance, in order to obtain movie content,
Xiphias had to send video tapes to a third-party vendor to be converted
into DVD's special .VOB file format. Since Xiphias uses their own custom
navigation engine, they had to manually create navigation paths in the
.VOB file.
Another difficulty is the variation in performance and quality for MPEG-2
and AC-3 decoders. Since performance of hardware and software decompressors
varies dramatically, game vendors must author content with data rates
that are playable on a variety of decoders.
Like Xiphias, Westwood Studios also plans to soup up an existing CD title,
COMMAND AND CONQUER, for DVD-ROM. Because the existing game uses two CDs,
gamers get the immediate benefit of only needing one disc. Mike Sack,
marketing director at Westwood, indicates that the company will also enhance
this title with MPEG-2 video and AC-3 audio.
The final type of game vendor creates a true DVD title, utilizing all
of the features in DVD Video. Tsunami Media is one such vendor, and they
truly have been smitten with the potential of the DVD market. While most
companies have serious reservations about DVD's revenue possibilities,
Don Soper, a producer for Tsunami Media, believes this to be a lucrative
market. As a result, Tsunami became one of the first vendors to release
a game (SILENT STEEL) on DVD-ROM . The DVD-ROM version of SILENT STEEL
is enhanced with AC-3 audio and MPEG-2 video and only requires one disc
- as opposed to the four discs making up the CD-ROM version.
Now, Tsunami plans to leverage the multimedia enhancements in the DVD-ROM
version of SILENT STEEL to create a DVD Video version of the game. Tsunami
Media deliberately chose authoring tools that could generate either DVD-ROM
or DVD Video titles. As a result, the DVD Video version of the game should
have the look, feel and performance of the PC version, while retaining
platform independence.
Soper indicates that the DVD Video version of SILENT STEEL will conform
to the DVD 1.0 Specification and should work on any DVD-compliant player.
When asked about programming restrictions imposed by DVD Video, Soper
seems unfazed. "If you're creative, there's enough support to do a lot
more things than one might think at first glance." He is also confident
that the remote controls utilized by DVD players will be more than adequate
for game play. This is significant since DVD remotes are slanted toward
DVD menu input and button manipulation (remotes have a numeric keypad
and menu shortcuts), with virtually no game-specific features such as
a joystick control.
While Tsunami is upbeat about DVD, they realize that it has limitations
for gaming. First, they have been affected by immature state of the title-creation
tools. For example, debugging a title is an arduous process. A disc must
be authored, sent to manufacturing, and then tested. Every time a bug
is found, this cycle must be repeated.
A second restriction is the type of games that can be written in DVD Video.
Although this technology excels at movie-oriented titles such as SILENT
STEEL, Soper doubts that the current DVD specification can handle fast-action
3D-graphics games.
The DVD Video Navigation Engine
Although DVD-ROM and DVD Video may share compression algorithms, DVD Video
contains features not found on DVD-ROM. The most notable difference is
that the content on DVD-ROM is platform specific, while DVD Video provides
a platform-independent navigation engine for playing interactive movies
(these movies potentially can be played on Windows 95, MacOS, and television-based
consumer DVD players). This navigation engine requires a rigorous directory
structure, which I'll explain briefly.
Figure 1
|
Figure 2
AudioTS
VideoTS
- VIDEO_TS.IFO
- VIDEO_TS.VOB
- VTS_XX_YY.IFO
- VTS_XX_YY.VOB
Items in bold must be present
on every disc. Items in italics are optional.
|
Every
DVD Video disc must contain a VIDEO_TS directory, which contains only
two types of files: .IFO and .VOB (Figure 1). These files are sorted by
a DVD Video player to form Video Title Sets (VTS). A VTS is a grouping
of all the files necessary to play a particular DVD Video title and is
composed of one .IFO file and one or more .VOB files (Figure 2).
The .VOB extension is short for Video Object Set - it indicates that the
file contains multimedia data. Many people are under the mistaken impression
that .VOB files are equivalent to DVD Video. In reality, while it is possible
to write a simple .VOB-only player, all of the interactive functionality
in a .VOB file is abandoned when you don't play it with the associated
.IFO file.
Both the Video Manager .IFO file and the VTS .IFO contain additional navigational
data structures and a processor-independent interpreted language (sort
of a miniature Java). These data structures are composed of the following
objects: Program Chains, Part of Title, Programs, and Cells.
Program Chains (or PGCs) link related programs (or particular scenes)
within a title. Their data structures govern how a given program plays.
Simple titles may contain only one PGC. By contrast, multi-PGC titles
containing two or more PGCs are used by complex discs requiring random
access to a variety programs. A multi-PGC title can play programs linearly,
randomly, or in shuffle mode.
Every program in a program chain is composed of elements called cells.
Cells are the smallest navigational unit and tell the DVD player which
portion of a .VOB file to decode.
Unlike program chains, which exist entirely in an .IFO file, cells are
hybrid creatures; the data structures are defined in the .IFO file, and
the multimedia content is found in the .VOB file. Each cell must start
playback at a specific location in a .VOB file, referred to as a Video
Object Unit (or VOBU). A VOBU is a container that houses both navigation
packets, as well as multimedia packets (similar to the chunks found in
an .AVI file).
While a VOBU is playing, the DVD player is able to obtain user input via
on-screen buttons. You can tell the player how long a button (or buttons)
should appear on the screen, and what to do when buttons are selected.
Typically, the selection of a button causes the player to jump to a different
location on the disc (Figure 3).
Figure
3
Parental Controls May Open New Gaming Markets
One of the highly touted features of DVD Video is its ability to enforce
parental controls over video content playback. While parental control
is essential for the movie industry, it has interesting implication for
games. Extremely violent games are a serious concern for many parents,
and parental controls will prevent their children from playing such games.
It's possible for DVD video game vendors to create low-violence and no-violence
versions of their games for those who desire them. As a result, titles
that previously could only be sold to mature audiences can now be sold
to everyone. Unfortunately, parental control functionality is only available
for DVD Video titles.
Because parental controls are activated at the program chain level, and
not the higher VTS level, a DVD Video title that enables this feature
should have two (or three) different versions of the same program chain,
and each program should contain features specific to a particular parental
level (Figure 4). This means that you only need to create different versions
of the violent program chain(s) in the title - you don't have to create
multiple versions of the entire title. Unique Interactive Language
DVD Video offers content creators access to a device-independent language
and a set of player parameters (or registers). There are 16 user parameters
and 24 system parameters that hold the current state of the DVD player
(Figure 5). Most DVD programs are interested in the contents of System
Parameter 8, which contains the currently selected highlight button, and
System Parameter 9, which is a system counter.
Figure
6
|
|
Parameter
|
Use
|
|
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
Menu Language
Audio Stream number
Sub-picture Stream number
Angle N umber
Title number
VTS Title Number
PGC Number
PTT number
Highlighted button number
Navigation Timer
Title PGC Number for Navigation Timer
Audio Mixing Mode for Karaoke
Country Code for Parental Management
Parental Level
Player Configuration for Video
Player Configuration for Audio
Initial Language code for Audio
Initial Language code for Sub-Picture
Initial Language code extension for Audio
Initial Language code extension for Sub-picture
|
The commands in the navigational language can be broken into the following
categories: Set, SetSystem, Goto, Link, Jump, and Compare
(Figure 6). The Set command offers primitive operations (such as compare
or assignment) to manipulate the values of the 16 user parameters. You
completely control the state of the 16 user parameters, but the player
restricts access to system parameters. In fact, to touch the system parameters
of the player, you must use the SetSystem instruction.
The Goto command is used to skip to a specific instruction number
in the instruction stream (this is similar to the x86 JMP mnemonic). The
Link and Jump command categories let you jump to various
locations within a title or menu on the disc.
The Compare instructions let your DVD application test the values
of either a system parameter or a user parameter. Assembly hackers will
love this language, since you can squeeze up to two additional instruction
categories (such as Link or SetSystem) into the space normally
reserved for a single instruction category. For example, it's possible
to set a system parameter, check the status of another parameter, and
Jump to a different location with one instruction. Copy Protection
Can Protect Your Bottom Line
Since the dawn of computer science, software copy protection has caused
conflicts between users and software vendors. Software companies like
copy protection because it minimizes the chances that someone will steal
their product. Users detest it since they can't backup their products
for legitimate reasons. The promoters of DVD have tried to accommodate
both sides by making copy protection of DVD Video titles optional. It's
there if you need it, but you can create a DVD Video game without it.
The copy protection process initially is processor intensive - once the
user's PC has been validated, however, the actual decryption of data isn't
excessively processor intensive and shouldn't affect performance. To explain,
before a title can be played, the DVD hardware in the PC verifies that
the DVD-ROM drive is authorized to read the title (it ensures that the
drive isn't a bootleg drive), and the drive verifies that the decompression
software/hardware in the PC is legitimate (that is, it isn't a pirate
machine setup to make copies). Once both devices have been authenticated,
encrypted multimedia data can be sent from the drive and decrypted by
the PC (Figure 7).
Figure
7
DVD-ROM
Drives Make the Difference
DVD Video playback on a PC is made possible by a DVD-ROM drive (it is
impossible to play a DVD Video or DVD-ROM title on a CD-ROM drive). DVD-ROM
drives typically have between 10x and 12x data transfer performance and
can read CD-ROM, CD Audio, and a variety of DVD formats (most DVD-ROM
drives can't read CD Recordable discs). Although the drives are fast,
their random access times aren't appreciably faster than a CD-ROM drive.
Thus, it's important for efficient DVD Video software to mask this limitation
when playing titles that require considerable searching (such as, titles
that use parental control or display multiple angles).
Besides enhanced performance, DVD-ROM drives support several new commands
(the most important of which are copy protection and enhanced capability
detection) that are accessible via SCSI or IDE command packets (depending
on the interface of the drive). In fact, without the new copy protection
commands, it would be impossible to play back an encrypted title.
Problems for Gaming
Although DVD Video is a dramatic breakthrough for movie titles, it wasn't
specifically designed for the game market. As a result, it has weaknesses
that you must work around. While most of these problems are minor irritations,
others are more severe and will require careful planning to avoid.
Figure 8
|
The primary problem with the DVD Video format is the restrictions that
it places on the number of instructions attached to a program. Commands
may be attached to a cell or a button or placed at the start or end of
a PGC. Buttons and cells are limited to one command, while PGCs may have
up to 128 commands attached both their heads and their tails. Fortunately,
you can bypass these limitations in certain ways. For instance, it's possible
to execute 128 commands, then branch to a bogus program (a program with
no video or audio) that contains only additional commands. If further
commands are required, you can continue to branch to additional hollow
programs (Figure 8).
A second issue with DVD Video is the fact that all input must be captured
by buttons. Since many full-motion video games use buttons for user interaction,
this isn't a problem. In contrast, developers of fast-action games (those
that require continuous streams of user input) are likely breaking out
into a cold sweat as they read this. Fortunately, buttons don't have to
be visible and can capture input for very small time intervals. By using
buttons for directional input, an action game can appear to instantaneously
respond to user requests.
The final issue is the lack of a graphics libraries in DVD Video. Unfortunately,
DVD doesn't give you direct access to graphics memory or hardware-specific
features. On the upside however, DVD Video doesn't have a windowing system
- there are no device-independent layers.
New Tools Required
Because DVD Video, and to a lesser extent DVD-ROM, require new audio and
visual compression technologies, the technology needs new content creation
tools. These tools should offer the flexibility to choose between AC-3
and PCM audio, the ability to encode multiple audio and subpicture streams,
access to all the subpicture special effects (such as wipe and scroll),
and control over the bit rates of multimedia streams. Tools should have
DVD player emulation as well, since emulation can greatly ease your debugging
chores. Most importantly, tools should provide the ability to create the
.IFO files to control navigation. This includes the construction of PTT,
PGCs, cells, buttons, and navigational commands.
Testing Can Be Tricky
To test a DVD Video game, you'll need to obtain a DVD player. Consumer
DVD Video players have been available in Japan since late 1996, and were
released in the United States in early 1997. In addition to testing your
title on a dedicated consumer player, you'll need to test it on a PC-based
player, requiring that you install a DVD-ROM drive into your PC, and possibly
an MPEG-2 decoder card and an AC-3 decoder as well.
A multitude of companies are claiming to support DVD Video in Windows
95. Whatever product you select should meet the following criteria:
- It
should contain a hardware-independent architecture that can support
a variety of hardware and software vendors.
- It
should be able to read and process the variable bit rates contained
in DVD streams (audio, video, and subpicture data). The product must
be able to handle the maximum data rate of 10.08 million bits per second.
- It
should support the full spectrum of DVD 1.0 features, including parental
control, angles, multiple audio, and subpicture tracks.
- It
should have certified AC-3 decoding support and the ability to decode
all 5.1 channels of AC-3 audio. Software decoding of AC-3 is important
if your product is cost sensitive.
- The
product should support copy protection.
- It
should be a true 32-bit, object-oriented product that uses ActiveMovie
and isn't a warmed-over 16-bit MCI driver.
- It
should have robust synchronization support for navigation content. Synchronizing
navigation content is considerably more complex than .VOB-only synchronization.
- It
should contain game-friendly features, such as a published API and progress
notification messages.
- It
should support dual-layer, and/or dual-sided discs.
Despite the rough state of the tools, DVD Video has the potential to forever
alter full-motion video games. It offers tremendous video quality, surround
sound with multiple audio tracks, and closed captioning. Furthermore,
it provides a platform-independent navigation engine that enables interactive
movies, parental control over content, and dynamic changing of angles
of view. If your project is not dependent on 3D graphics or a platform-specific
library, you should give serious consideration to a DVD Video version
of your game.
Linden deCarmo is a staff software engineer at Oak Technology Inc. working
on multimedia software. He currently is member of Oak's Windows 95-based
Interactive DVD Browser project and can be reached at lindend@ibm.net
|