Game Development Reference
In-Depth Information
14
Object-Oriented Data
Alan Kimball
14.1 Introduction
As engines become more data driven, responsibilities are shifting. Entire games can
be created without writing any scripts or code. This shift in capabilities has given
much more flexibility to content creators. With this flexibility, we have been able
to create more interesting, vibrant worlds. While this expanding of capabilities has
been a great boon to game development,in the transition, the self-descriptive abili-
ties of programming has been lost. In many ways, content-creation packages are at
the same level of maturity as pure procedural programming languages. When rep-
resenting game information in data files instead of inside a structured language, it
is more dicult to make reusable, generic data structures. But, by borrowing con-
cepts from object-oriented programming, data systems can regain some of the safety
that was lost. Much like the transition from C to C++ enabled many programmers
to create larger, more componentized systems, the transition from traditional data
models to object-oriented data can lead to the same advances. Many concepts from
object-oriented data have already been embraced on the web with Cascading Style
Sheets (CSS), but it is not necessary to completely implement their functionality
to take advantage of some of the core concepts.
14.2 Data Inheritance
When designing a system in an object-oriented programming language, inheritance
is integral to the design. A programmer is able to abstract shared functionality
into base classes, minimizing duplicated information. This allows for individual
subclasses with the responsibility to change which functionality is required for the
specific implementation.
This concept transfers very well to data design. When creating an object-
oriented class, care is taken to reuse methods and functionality whenever possible.
When creating object-oriented data, one reuses individual field values. Instead of
203
Search WWH ::




Custom Search