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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

C H A P T E R 6<br />

In a nonprogrammatic scripting environment, sometimes the script system simply<br />

generates a file with values (velocity = 44.6) that you can edit for effect, and this file is<br />

then read into the <strong>game</strong> engine to control some behavioral aspects.<br />

In many cases, the scripting system you use is built to interface with your <strong>game</strong> engine.<br />

It may have a full graphic user interface (GUI) like a standard familiar Windows<br />

program, or it may be some flavor of a simple text editor that allows you to edit values,<br />

rebuild, and then test the results of your changes and edits.<br />

In this chapter, we’re going to take a close look at how to use script systems to<br />

build a wide array of behavior types into a <strong>game</strong>. We’ll also consider another powerful<br />

and primary scripting resource, the use of triggers!<br />

S CRIPTING TECHNOLOGY CHOICES<br />

As in many other areas of <strong>game</strong> development, today developers have several choices<br />

to make when choosing how they will handle scripting in their <strong>game</strong>s. In the recent<br />

past, the practice of “scripting” <strong>game</strong> behaviors wasn’t very common at all. Any direct<br />

change to <strong>game</strong>play, of any kind, had to be coded into the <strong>game</strong> directly by programmers.<br />

Scripting helps developers “dial in” and experiment with <strong>game</strong> behaviors (for<br />

example, a certain weapon’s firing speed and range of effect, or vehicle and character<br />

traversal properties like friction, gravity, and pitch) more efficiently. Yet, we still<br />

have a very long way to go in being able to build complex behaviors quickly.<br />

Nowadays, programmers face a considerable and constant challenge in keeping<br />

<strong>game</strong> engines fresh and powerful with technology and tools for a variety of ever-changing<br />

hardware platforms and devices. Programmers ultimately determine how much<br />

control and influence a scripting system will have on a <strong>game</strong>. Typically, <strong>game</strong> programmers<br />

collaborate with designers to build as much “power editing” as they can<br />

into a given script system. The goal is to have a scripting system that is so powerful and<br />

flexible that it can produce a wide array of possible <strong>game</strong>play results. This means that<br />

during development, <strong>game</strong> behaviors for your title can react to player feedback and focus<br />

dynamically. You can quickly answer “play-feel” questions like “What if we speed<br />

up the rocket boots, decrease gravity, and cut back the rate of fire?”<br />

At the level of competition in the current <strong>game</strong> market, developers know that only<br />

the best-playing or best-performing content will probably succeed. It has become apparent<br />

to many developers that having team members focused exclusively on building<br />

and monitoring <strong>game</strong>play content via scripting tools can help shape a much<br />

stronger <strong>game</strong> title.<br />

As the language of choice for scripting, some developers choose to use Visual Basic<br />

(http://msdn.microsoft.com/vbasic/), Python (www.python.org), or JavaScript/JScript<br />

137<br />

Scripting Action Events

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

Saved successfully!

Ooh no, something went wrong!