Game Development Reference
In-Depth Information
Metric: Testability
Testing is a required step in any software project, and there are certain considera-
tions for building software that is easy to test. Unit testing is easiest to perform in
loosely coupled architectures where individual objects can be tested with minimal
dependency on other objects. If testing can be performed on components in iso-
lation from each other, there is a much greater chance that performance issues and
hard-to-find bugs will be discovered.
Avoid design patterns like the singleton, where architectures become tightly cou-
pled; design software for testability so that the work of testers is not as difficult and
can be done in a much shorter period of time.
Metric: Portability
The portability metric involves moving software from one operating system to
another. Some game development studios target multiple operating systems and
platforms with their products, so portability is important to them. Therefore, it is
important to build common components that are easily portable to other plat-
forms. Even if the game development studio typically relies on outsourcing other
cross-platform work to another development company, there are some practices
that should be followed. The longer it takes to port the original code to another
platform, the greater the overall cost of the conversion process. The more a soft-
ware component relies on platform-specific technology, the more code must be
written in the porting process.
The biggest practice to follow is that all calls to the operating system should be in
specific components. Abstraction is very useful in this situation, because interfaces
can be written that define how a particular component will communicate with the
system, and operating system-specific components can be written that implement
that interface, creating a flexible plugin-based architecture.
Plugin-based architectures are commonly used with 3D API agnostic graphic
engines that can use either OpenGL or Direct3D. Aside from the benefits of an
abstracted rendering system on Windows alone, OpenGL is pretty much the only
cross-platform hardware-accelerated 3D API that can be employed in games. By
using an abstracted rendering system that supports OpenGL, you do not have to
worry about porting the graphic engine to other platforms, as you have already
accounted for the differences.
Operating system agnostic design can also be used for other hardware-based ser-
vices like audio, video, input, and networking.
Search Nedrilad ::




Custom Search