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 />

156<br />

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

Pitching<br />

Fielding<br />

We want to use scripting and value tweaks to create fine control for different kinds of<br />

baseball pitches like breaking balls, curve balls, rising fastballs, sinking fastballs, and<br />

knuckle balls, among others. We can create entirely new pitches (some impossible for<br />

a human to throw!). What we really want to do is replicate for the player the feeling<br />

and presence of facing these various pitches as a batter. In the pitching category, we<br />

begin with some of the basics, including:<br />

� Velocity The ball speed coming at the player.<br />

� Ball spin Amount and direction of spin on the ball.<br />

� Rise over time How much the ball rises on its path coming into the catcher.<br />

� Drop over time How much the ball drops away on its path coming into<br />

the catcher.<br />

� Seek left plate edge How much “attraction” for the ball toward the left<br />

side of home plate.<br />

� Seek right plate edge How much “attraction” for the ball toward the right<br />

side of home plate.<br />

� Random Set all of these to a random number and see what happens!<br />

� Bad throw seed value Control the occurrence of bad pitches.<br />

Most of these values can be tuned via a simple GUI tool that allows for value edits.<br />

No actual scripting is necessarily required. However, depending on your development<br />

configuration, you might not have a GUI tool available and may then find yourself<br />

editing these values either directly in the <strong>game</strong> code or in a script.<br />

<strong>Building</strong> behaviors for our fielders will be a complex undertaking, and never perfect,<br />

since baseball by its very nature demands a lighting-fast real-time analysis of any<br />

given situation in context. (Should I risk letting the ball roll foul? Should I try for a<br />

double play, or go for the easy out?) For fielding, we might start with the following:<br />

� Catch radius The radius within which a ball can be considered caught.<br />

� Throw speed The velocity a ball is thrown to a bag or another player.<br />

� Throw distance The distance in units that the ball is in the air.<br />

� Run speed How fast a fielder will run to make a catch, dive, or jump play.<br />

� Ball shadow scale How large the ball shadow is; useful for setting up a catch.

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

Saved successfully!

Ooh no, something went wrong!