Real Time Cameras
A Guide for Game Designers and Developers
The control of cameras is as important in games as it is in cinema. How the camera tracks and moves determines our point of view and influences our attitude towards the content. A poorly designed camera system in a game can disrupt a users experience, while a well-designed one can make a good game into a great one. The challenge in games is that the camera must respond to unscripted events, and this is where much of the difficulty of designing real-time camera systems arises. The increasing use of motion in virtual environments, marked by the inclusion of physics modeling and complex collision detection systems, means that camera systems must be even more effective to keep up. Real-Time Cameras is written by an experienced game developer who has written camera control systems for award-winning games such as Metroid Prime. Mark Haigh-Hutchinson discusses the key algorithms for camera control and then shows how to implement them in code. This book is written for game developers and designers, although it is also pertinent to other professionals in the interactive media field. Real-Time Cameras presents a practical approach to camera systems, introducing their theory, design, and implementation.
Mark Haigh-Hutchinson is a senior software engineer at Retro Studios Inc., based in Austin, Texas. He has designed and programmed video games professionally since 1984 and as a hobby since 1979. He has contributed to over 40 published games in roles as varied as programmer, designer, and project leader. Some of the more notable titles he has worked on include several Star Wars games: Rogue Squadron, Episode 1: Racer, Shadows of the Empire, and Rebel Assault, as well as other games such as Zombies Ate My Neighbors and The Secret of Monkey Island 2. Most recently Mark was responsible for the camera systems and player control in the award winning Metroid Prime and its sequel Metroid Prime 2: Echoes.
Part One: Core Concepts
Chapter 1: Game Overview
This chapter explains the basics of a typical video game update loop, and how the camera system functions within the context of the entire game.
Chapter 2: Camera Fundamentals
This chapter describes the basic definition of real-time cameras and how they compare to their real world counterparts. There is a brief explanation of how the camera properties are used to generate the desired view of the game world in addition to an overview of game camera design guidelines.
Chapter 3: Cinematography
Though this book is primarily concerned with real-time cameras, knowledge of cinematic theory and conventions may prove very useful. This is especially true since camera systems in games often have to deal with cinematic concerns whether in regular game play or within cut-scenes (i.e. non-interactive movie-like sequences). This chapter briefly discusses some of the main cinematographic conventions and how they may be applied within real-time applications.
Part Two: Design Principles
Chapter 4: Camera Design
The design of a camera system must take into account the desired feature set and preferred presentation style balanced with the requirements of viewer interaction. This chapter describes the factors that must be considered in determining the feature set for a camera system. The production process for designing a camera system is often quite involved, and typically requires collaboration between the disciplines of design, engineering and art. A suggested approach for the camera design process is given, including a set of questions that may used to guide its development. Emphasis is given to the inclusion of camera design as pat of the initial game play design, regardless of game genre.
Chapter 5: Camera Solutions
Certain types of presentation style have become associated with a particular game genre. This chapter enumerates some of the more common solutions for a selection of game genres and their particular benefits. There is also discussion of the differences in presenting single or multi-player games on a single display device.
Chapter 6: Camera Scripting
Camera scripting refers to a collection of techniques used to control the activation and timing of game events within either interactive or non-interactive sequences. These events are frequently used to define game play elements as well as appropriate changes to the camera properties or behavior. A variety of potential solutions and functionality requirements for camera and player control scripting will be explored.
Part Three: Camera Engineering
Chapter 7: Position and Orientation
Determination of the desired position and orientation of the camera is a major component of any camera system as it dictates the generated view of the virtual world. This chapter discusses a variety of ways in which these properties may be defined according to game play or aesthetic considerations.
Chapter 8: Navigation and Occlusion
Virtual cameras are often required to move within complex environments. Determining how the camera to should negotiate through these environments while balancing the game play requirements of presenting a target object in an appropriate manner is a demanding task. This chapter discusses dynamic and pre-determined methods of achieving these goals, referred to here as navigation. A related topic concerns ensuring that an element of the virtual world (such as the viewers avatar or player character, for example) remains in a viewable position regardless of how the camera is required to move. Several possible methods of both determining and avoiding the problem of occlusion are also discussed here.
Chapter 9: Motion and Collision
This chapter describes ways in which the movement of the camera through the virtual world may be achieved while maintaining both continuous and smooth motion. However, such motion of the camera may still result in its collision with environmental elements. This chapter therefore covers common collision avoidance techniques as well as collision detection and its resolution.
Chapter 10: Camera Mathematics
The implementation of real time cameras requires an understanding of a variety of mathematical techniques. While this chapter is not a tutorial, it covers the practical use of mathematics to solve a selection of problems encountered within typical camera systems.
Chapter 11: Implementation
The architectural issues involved in an actual camera system implementation, including methods that might be used to dynamically alter camera behavior according to interactive requirements will be discussed in this chapter. A simple camera system is provided as the basis for expansion by the reader.