25.12.2012 Views

Ultimate Game Design : Building game worlds

Ultimate Game Design : Building game worlds

Ultimate Game Design : Building game worlds

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>Building</strong> <strong>Game</strong> Worlds<br />

98<br />

U L T I M A T E G A M E D E S I G N<br />

Common Camera Problems<br />

A host of problems can crop up with respect to your camera system—in fact, too<br />

many to list them all here. Instead, I’ve chosen to focus on two major problem areas<br />

for many camera systems.<br />

The first problem is when the camera gets “stuck.” As you might imagine, when<br />

you’re moving a camera or multiple cameras all around a scene, they can collide with<br />

objects (and not know how to handle the collision). This creates a situation where a<br />

camera gets stuck in a physical location in the scene or jumps away and freezes.<br />

There can be several causes and several fixes for a stuck camera, but it is a common<br />

problem worth mentioning. The best approach I can offer to avoid this problem is to<br />

start by keeping your camera edits clean (well purposed and intentioned, don’t try<br />

and do too much at once, allow your camera behavior to grow based on simple<br />

script steps rather than try and get to the desired end-effect immediately). Also,<br />

make sure that old and/or irrelevant camera position information is cleared out in<br />

the camera control code.<br />

The second common problem occurs when the camera’s view of <strong>game</strong> action is obscured<br />

by something. In a third-person <strong>game</strong>, when the character is deep in the corner<br />

of a walled or catacombed section of a level, they are often hidden from view. Some<br />

<strong>game</strong>s try to account for this by having the walls go transparent when a character is<br />

obscured, enabling the player to see the character with X-ray ability.<br />

Some players use this to their advantage by positioning their character in a corner<br />

pocket deliberately, which causes the adjoining wall to turn transparent and gives<br />

them a view of enemies waiting in the next room. This is a functionality trade-off you<br />

may be forced to give the player, since the transparency region needs to cover a certain<br />

scope or breadth to be effective in all possible cases where the camera is obstructed<br />

by corners or pockets.<br />

Other <strong>game</strong>s, rather than build in an automatic transparency to the walls, make an<br />

automatic camera move to get the character back into view in some fashion. Both of<br />

these solutions can be difficult to build in, but can indeed provide a solution. Along<br />

the way to creating a solution, these fixes can also create serious testing issues, since<br />

every deep corner in your map has to be tested for either transparency compliance or<br />

an auto camera repositioning, or for some measure of both.<br />

It’s best to plan for these issues at <strong>game</strong> creation. It sounds simple, yet in the heat of<br />

development, along with any number of other sizeable details, it can be duly identified<br />

and ignored.<br />

If you’re building a third-person <strong>game</strong> with enclosed or tight spaces, try to figure<br />

out up front what camera problems you will likely encounter. Use this identification<br />

process to influence the early building process. Assume that you may not have the<br />

time or resources to be able to provide radical solutions if you make a bad move here.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!