112
Trick Shot Golf Trick Shot Golf Technical Design Document

Trick Shot Golf - DigiPen Web viewTrick Shot Golf contains elements that require a structured approach to ... and the word “ROUGH” is ... An overlay with a graphic depicting the

Embed Size (px)

Citation preview

Trick Shot GolfTrick Shot GolfTechnical Design Document

A Practical Chaos production

THIS PAGE INTENTIONALLY LEFT BLANK

2

Platform/OS.........................................................................................................................6External Code......................................................................................................................6Control Loop........................................................................................................................7

Main Loop Code..............................................................................................................7Game States.....................................................................................................................8

Game Object Data..............................................................................................................10Player Data - On disk/menus.........................................................................................10Player Data - Playing.....................................................................................................10Hole Data.......................................................................................................................11Course Data...................................................................................................................11Basic Golf......................................................................................................................11Basic Net Golf...............................................................................................................11Traditional/Fantasy/TraditionalNet/FantasyNet Golf....................................................11Moderator......................................................................................................................11

Data Flow...........................................................................................................................12Art & Video.......................................................................................................................13

Art Needs.......................................................................................................................13Video Needs...................................................................................................................14Artist Instructions..........................................................................................................14

Graphics Engine.................................................................................................................15Working with Windows.................................................................................................15Textures.........................................................................................................................15Display Objects..............................................................................................................16Scene..............................................................................................................................17Objects...........................................................................................................................17Tiles...............................................................................................................................18Camera...........................................................................................................................18Lights.............................................................................................................................19Splash Screen.................................................................................................................19Fonts..............................................................................................................................20

Features/Game-play...........................................................................................................21Trick Shots.....................................................................................................................21Power-Ups.....................................................................................................................22Trick Shot and Power-Up Implementation....................................................................23Multiplier.......................................................................................................................24

AI Module..........................................................................................................................26Selecting a Club.............................................................................................................27Evaluating a Series of Possible Shots............................................................................28Applying Favoritism......................................................................................................29Selecting a Shot.............................................................................................................30Taking the Shot..............................................................................................................30Applying Weights..........................................................................................................34Power-ups......................................................................................................................36Trick Shots.....................................................................................................................36

Physics...............................................................................................................................38

3

Ball Movement:.............................................................................................................38Calculations...................................................................................................................41

Networking........................................................................................................................44Model.............................................................................................................................44Packets...........................................................................................................................45Events............................................................................................................................48Notes:.............................................................................................................................50

User Interface.....................................................................................................................51Main Game Screen........................................................................................................51End of Hole Screen:.......................................................................................................53Power-Up Lottery Screen..............................................................................................54End of Hole Tally Screen..............................................................................................55Menus............................................................................................................................56Main Menu.....................................................................................................................57New Game Selection.....................................................................................................57Local Game Setup..........................................................................................................58Host/Join Selection........................................................................................................58Host Options..................................................................................................................59Player Selection/Player Stats.........................................................................................59Player Creation..............................................................................................................60Course Selection............................................................................................................61Game Options................................................................................................................61

Sound & Music..................................................................................................................63Music.............................................................................................................................63Sound.............................................................................................................................63Engine............................................................................................................................64

Input/Controls....................................................................................................................65Input abstraction............................................................................................................65Menu Specific................................................................................................................66

Development Risks............................................................................................................67A.I..................................................................................................................................67Networking & Internet Play...........................................................................................67

Code Formatting................................................................................................................68Header Files...................................................................................................................68Commenting..................................................................................................................68Function parameters.......................................................................................................68Naming Conventions / Spacing / Parentheses...............................................................69Source Safe....................................................................................................................69

Glossary of Terms..............................................................................................................70Signature Sheet..................................................................................................................75Project Planning Timeline.................................................................................................76

4

THIS PAGE INTENTIONALLY LEFT BLANK

5

Platform/OS

An IBM Compatible PC running a Windows operating system with at least 16MB of RAM, 40 MB of free hard drive space, and a 400 MHz processor. Also, a video card that supports hardware acceleration with OpenGL compatible video drivers is needed.

External Code

The sound and music module for Trick Shot Golf uses the FMOD 3.6 music and sound effects system, owned by Firelight Technologies Pty, Ltd. The owner specifies in the license that if the software "product is not intended to make any money, and is not charged for in any way, then [the developer] may use FMOD in [the product] for FREE!" [Emphasis theirs.]

See website, www.fmod.org, for more details on license information, technical support forums.

The input module uses DirectInput, requiring DirectX 8 to be installed on the users machine.

OpenGL is used for the rendering of all of the graphical elements of the game from sprites to on-screen text messages. OpenGL is a software interface that allows programmers to model 2D and 3D graphics in an efficient and organized manner. The OpenGL library was originally developed by SGI.

6

Control Loop

Main Loop Code

//if the logic has been terminated, go to the menusif( app.curr_logic == NULL ){

app.curr_logic = &menu;}

//updates the time differencefloat new_time = SecondsElapsed();app.time_diff = new_time - last_time;last_time = new_time;

app.curr_logic->Process_Frame();

app.curr_logic->Draw_Frame();

if( app.curr_logic == &menu && menu.Exit() ){

QuitProgram();}

if( app.curr_logic->Exit() ){

Destroy_Logic(app.curr_logic);}

Due to the way that the Logic class hierarchy is setup, the main logic loop is not required to know anything special about the current state of the game (except for the slight difference in handling the exiting of the main menu). This allows new game types to be added with extreme ease while at the same time, allowing for infinite possibilities.

7

Game States

8

GAME INTROTITLE SCREEN

OPTIONS SCREEN

START GAME

OPTION MENUS & CONFIGURATIONOPTIONS

QUIT EXIT PROGRAM

GAME MAIN BODY

Next page

LOCAL GAME

NETWORK GAME

SHOW OVERVIEW OF

HOLE

GO TO SHOT SETUP

ARE FANTASY RULES

ACTIVE?

YES

CHECK FOR TRICK

SHOT

INCREASE MULTIPLIER

IF BALL IS ON FAIR TERRAIN

CHECK FOR

POWERUP USE

NO

SHOT LANDED ON GREEN?

YESNO

GO TO PUTTING INTERFACE

BALL LANDED IN

CUP?

NO

GO TO NEXT HOLE

Game Object Data

Player Data - On disk/menus (Only in memory when in player selection menus)

Name - the name of this playerAge - the age (no actual use, for customization)Gender - the gender of the player for display purposesHandedness - the hand that this player uses, right or left

9

YES

ARE FANTASY RULES

ACTIVE?YES

NO

ADD UP BONUSES AND SCORE FOR

STROKES

TALLY STROKES FOR HOLE

WAS THIS

THE 18TH HOLE?

SHOW SCORE

SCREEN

YES

NO

NETWORK GAME

START NEW HOLE

UPDATE PLAYER

POSITIONS ON OVERHEAD

MAP

PLAYER TAKES SHOT AS

ILLUSTRATED IN ONE-PLAYER

MODE

SHOT LANDED IN

CUP?

NO

YES

WAIT ON SCOREBOARD

LOBBY FOR OTHER

PLAYERS TO FINISH

WAS THIS THE 18TH HOLE?

NO

YES

Power, Control, Club Quality - stat values for this player HoleResults[16]- the combined results from all holes, i.e. holes in one, birdies,etc.Holes Played[3] - counts of the number of holes played( 0-trad,1-fant,2-total)Rounds Played[3] – counts of the number of rounds played(0-trad,1-fant,2-total)Perfect Shots - percentage of perfect shots for this playerAverage putts - the average number of putts to cup once on the greenHigh Score[2] - this players high score for traditional(0) and fantasy(1) golfLongest Drive - longest drive this player has achievedLongest Chip - longest chip this player has achieved Longest Putt - longest putt this player has achievedClosest to pin - the closest the player has gotten to the pin from off the green

Player Data - Playing (The information in memory when a game is in session)

Name - the name of the player for display during game playTraditional - flag to determine if this is traditional or fantasy golfHoleResults[9]- counts of hole results, i.e. holes in one (0-7), Total Played (8)Perfect Shots - percentage of perfect shots to update player data at end of holeScore - the player’s score for this hole, either strokes under par, or fantasy scoreAverage Putts – stat value kept for this hole to update player informationIndex of Player-index back into main player list to update valuesP/C/CQ - values for power, control and club quality to access while playingBall Position - position of this player’s ball while playingPlayer/AI - flag for if this is a human player, or AI controlledPower-Ups[3] - flags for what power-ups this player hasMultiplier - the current multiplier this player hasLongest Drive - longest drive this player has achieved this gameLongest Chip - longest chip this player has achieved this gameLongest Putt - longest putt this player has achieved this gameClosest to pin - the closest to the pin from off the green this game

Hole DataGeographic DataTee/Hole LocationParAvailability of Trick ShotsInformation for the Available trick shots

Course DataHoleData[18]

10

Basic GolfHUD Display parameters (visible/invisible)List of PlayersPointer/Index to current playerCurrent hole information

Basic Net GolfServer/Client StatusServer LocationInformation of other players

Traditional/Fantasy/TraditionalNet/FantasyNet GolfThese modes do not require any new information. They just use the information

from their base class differently.

ModeratorTo work towards finding a commonality among all of the modes, and to force a

policing of the game, a “moderator” object exists when a game is created. The moderator’s job is to process player turns by reporting the state of each player to every other player, to call upon the ball flight processing code to model each shot made in the game and to update each player’s score and statistics, and to prevent a player in a multi-computer mode of game play to affect permanent changes to their game stats.

The game loop and logic will interface with the moderator to process switching between players and handling score changes. The networking game modes will also need to have moderators for both the clients and the server. The clients’ moderators will interface with the server moderator to finalize player scores, stats, and the state of the game.

11

Data Flow

Player Data Player data is loaded from files on disk when needed (whenever user enters the

player stats menu or is selecting a player to play as). Relevant player data is put into a smaller structure for use while the user is actually playing. At the completion, human players will have their data loaded from disk, updated and then written back to the disk.

Course Data When play begins, all course data is loaded from disk and persists until the course

is completed or quits from the game. Course data is never rewritten back to the disk.

Hole Data Between each hole, the previous hole’s data is discarded and the data for the next

hole is loaded in from the disk (unless previous hole was the last hole). Since holes do not experience permanent changes, they are not rewritten back to the disk by the game.

Game Creation Data Game creation data structures are allocated as soon as the menu system knows

enough to determine what type of game is to be played. This memory remains allocated until used to generate a new logic class. After construction of the new logic class, the game creation data is released to the system.

Game Logic Game logic classes are allocated as soon as the user selects to begin playing. The

game logic persists until the user returns to the menu system by either completing the course, or quitting the course prematurely.

Sound & Graphics Files Graphics files are loaded from disk upon the start of the program and will persist

until the termination of the program. Sound files are loaded as needed for particular sections (menus, holes…). It is then played as necessary, and released on transition to a new section.

Hardware Sections There are four hardware pointers (sound, graphics, input, networking) that are

globally accessible to anyone who include those libraries. Sound, graphics and input are constructed upon creation of the application and persist until its termination. Networking is created as needed for joining or hosting networked games, and is destroyed as those connections or hosting duties are terminated.

Input Data There is a single instance of an input data structure that can be requested from the

input class as to the current nature of all relevant buttons and mouse movement.

12

Art & Video

Art NeedsTrick Shot Golf is a two-dimensional game, requiring many drawings and tile art.

(Note: that due to some of the limitations of OpenGL, the texture sizes are adjusted as necessary, but that is not meant to invalidate the statistics listed below.) The breakdown is as in the Game Design Document, specifically:

Character portrait drawings (meaning face and shoulders) are needed for each character and shall include a neutral expression, a happy expression, and a sad expression. Each portrait should measure 128x128 pixels.

Background tiles are required for rendering holes: preferably nine of each type (so as to add suitable variety). Height differences between tiles are shown as a difference in shade. The shade modification of tiles is done at the point the hole is loaded, so the default shading should be "height-neutral." In other words, the tiles should be designed with coloring that is suitable for being uniformly darkened or lightened.There are eight terrain types: tee, fairway, green, rough, deep rough, sand, water, and out-of-bounds. Each tile shall measure 16x16 pixels.

Fonts may be needed for special purposes, such as messages that have letters that individually flip, for instance. Most messages will be displayed using standard TrueType fonts (any fonts used will be public domain, and shipped with the game.)Each font character shall measure 32x32 pixels.

Icons for the heads up display will consist of many small rectangles of varying sizes. For the ones consisting of a text-only display, a simple bordered rectangle will suffice. The descriptions follow, in order of size:

64x32 pixels:"Wind Speed" is a text-only display of the current wind speed in miles per hour.

"Distance to Pin" is a text-only display of the distance from the ball's lie to the hole, in yards.

"Terrain Distance Penalty" is a text-only display of the loss of the current club's distance rating, displayed as a percentage.

64x64 pixels:"Wind Compass" is a graphical display of a compass that indicates the direction

of the prevailing wind. This consists of two parts, a bottom part that shows the cardinal directions, and a top part that represents an arrow. The arrow shall be rotated in game so that it is not necessary to produce pre-rotated images.

13

"Club Selection" is a graphical display of the currently selected club and under that, on the same image, the maximum yardage obtainable using this club, neglecting wind and the player's power and club set ratings. There are seventeen total images needed, one for each of the fifteen clubs, with the putter having three variations.

"Lie Icon" is a graphical display of a golf ball in its current lie. There are eight terrain types, but only six of them need representation: tee, fairway, green, rough, deep rough, and sand.

256x32 pixels:"Player Name" is a text-only display of the current players name.

"Hole Number" is a text-only display of the current hole number.

128x128 pixels:"Overhead Map" is a graphical display of the current hole. During the game, the

Overhead Map is overlaid with dots representing the positions of all golf balls in play.

Video NeedsThere are no video requirements for this product. There are no plans to

incorporate movie sequences, cut-scenes, or other related types of sequential display of static imagery.

Artist InstructionsThe preferred file format is bitmap (.bmp files). All image files must have as their horizontal and vertical dimensions some number that is an integral power of two, with the caveat that they should not exceed 256 pixels in either direction. The bits-per-pixel for all image files must be 24 bpp.

14

Graphics Engine

The rendering of the visual displays and effects for this game is handled by a series of classes wrapped around OpenGL. There are several aspects to OpenGL that make rendering three-dimensional scenes very easy. We are building on top of the foundation laid by OpenGL to render output to the screen in an effort to narrow the scope of OpenGL’s functionality to fit our needs. This will also make it easier for other modules in the game to manipulate the display easily.

The game is rendered to look 2D, but is actually using OpenGL to render the scene onto a 2D plane in 3-space. The overall effect is two-dimensional, but since objects actually exist in 3-dimensions, it will make using effects such as rotation and scaling much simpler than the calculations that would be needed if the graphics were to be rendered using a 2-dimensional display library like DirectDraw7. The result of this, aside from making rendering the scene easier, is higher performance. This will be particularly evident on computers with graphics cards that are optimized for three-dimensional calculations.

The break down of the components for the graphics module is as follows:

Working with WindowsThe graphics module begins its series of tasks once the main graphics class is

instantiated. During this process, the graphics module will set OpenGL up to work with Windows. Attempts can be made to establish a display that either matches the current user-set mode, or to try to establish a new display format (i.e. setting the color depth and resolution of the screen.)

By default, the graphics module will set the display to be full-screen. However, it can very easily display the game in a window of any size (although it is not guaranteed that the resulting image will be desirable if the window is too small.) Whenever the application’s window size changes, the graphics module can be called from the WndProc to resize the display.

With OpenGL, the current window settings are destroyed, and OpenGL is reinitialized to work with Windows again as if the program were starting up for the first time. The window size is checked, and the display is scaled accordingly. If the window is minimized, the WndProc can simply call upon the graphics module to deactivate the display, and for every successive game loop (until the window is restored in some fashion) the graphics module will not try to render to the window.

TexturesAll of the textures for the game will exist in a list of filenames kept in an

initialization file meant exclusively for the graphics module. At startup, the graphics

15

module reads whatever initialization file is passed into it at startup. There is no restriction as to how many initialization files are required. At least one file is required to have textures, but all the textures of the application can be broken to multiple files so that subsets of textures can be loaded at different times during run-time.

The initialization file is parsed for the image paths and each is loaded and stored as textures within OpenGL’s framework. OpenGL provides the graphics module with a unique ID handle for each texture stored. To support multiple rendering formats, three versions of each texture are stored. There is a standard version of the texture with no filtering applied (no smoothing, etc.) A texture is also stored that supports linear filtering. (Linear filtering makes corrections to the image when it grows larger or smaller than its original size so that pixelation or distortion of the texture image will not occur when the object it is mapped to get close to the camera.) The last texture stored is a mip-mapped build of the texture. This process involves storing several good quality copies of a texture at different sizes, so that when an object is scaled the quality of the texture will not degrade as badly as when using the previous two texture types. This is because one of the original versions of the texture (with all of the image detail possible) is remapped to the object whenever the size changes dramatically. This helps cut down on grainy or blocky looking textures, which can make an object look bad.

The reason three versions of the textures are made is so that we can provide the player with the ability to customize their display options at any time during the game. If the application does not perform well with mip-mapped texturing (which will be set as default), then the player can simply turn off that feature.

Due to limitations of texture mapping in OpenGL, without the use of mip-mapped builds, the texture sizes must be in dimensions of powers of two, no smaller than 64 pixels, and no larger than 256 pixels. When textures with dimensions outside these dimensions are used, unpredictable and undesirable effects may occur. This only occurs with the first two texturing methods used.

This will not cause any problems with the rendering of the objects in the game since the size of the tile that the texture is mapped onto will make the texture appear at whatever size desired. However, this may, unfortunately, lead to the game utilizing more storage memory for the graphics than initially considered, but supporting the first two texturing methods allows people to run the game on slower computers, which will help make the game available to a larger audience.

Also, all of the textures in the game are 2D textures. Three-dimensional textures, though supported by OpenGL, will not be necessary for this project and will not be used.

Display ObjectsDuring the initialization of the graphics module, it will also initialize its internal

classes and objects (which will remain invisible to all other areas of the program.) These

16

internal parts consist of three object types: Scenes, Objects, and Tiles. Everything that is displayed on the screen will belong to this hierarchy.

SceneA scene is the collection of everything that is to be displayed. It is the backdrop

for the action and it can consist of various combinations of objects. The scene itself can have a default background color (set as black unless otherwise specified) that is seen when no objects appear in front of it. (Note: when the graphics module is created, no scenes exist, and when this is the case, the module defaults to painting a screen black as well.)

To display anything with the graphics module, a scene must first be created. To create a scene, a call to CreateScene is required to allocate the space needed for the scene. It is given one camera with an initial position and direction. Lighting is not activated. No objects yet exist. It does, however, have the default background color.

When a scene is created, it is set as the “active” scene. This is important since more than once scene can exist at any one time. A handle to each scene is provided when they are created, and this handle must be passed in anytime scenes are switched. All calls to manipulate any part of a scene (objects, change color, change camera position, etc.) are automatically set to affect the active scene. If no active scene exists, or if the call is not valid for the current scene (such as a call to move an object on a scene with no objects) then the call is ignored.

Scenes consist of objects (described in the next section), and each scene can be destroyed once no longer in use. No data from a scene is deleted if the active scene is simply switched to another one. The inactive scene retains all of its data (including object positions, object states, and camera positions) that it had before the switch. When the scene becomes active again, all aspects of the scene will continue with whatever looks and behavior they had before the switch.

ObjectsObjects consist everything that can appear in a scene (from text to splash screens,

sprites to background.) An object is made up of a series of tiles (described in the next section.) Objects are manipulated as a whole. If you create an object that represents the entire Earth, then when you rotate, move, or in any other way manipulate the object, the effect occurs on the entire object as a whole.

When an object is created, a handle to the object is returned. This handle is needed to perform any actions on the object. To create an object, a pointer to a structure must be passed to the graphics module that specifies the type of object, dimensions, texture indices, colors, transparency masks, etc. The different types of objects are as follows:

Sprites (Animating & non-animating)

17

Floor of a hole. String (A series of text.) Overlays (Full-screen pictures.) HUD shells (A window into which text will be placed.)

Each object type has a series of properties that can be manipulated, which all have similar set of functions to allow the manipulation. All the manipulation functions require that the handle be passed in as well as any information for the manipulation, i.e. angle measurements for a rotation. Objects can be moved, rotated, faded away, faded in, pushed away from view, pulled towards view, rotated, and destroyed. Some object types have unique properties that can also be modified. For instance, sprites can be animated (forward or reverse) which is accomplished by changing texture indices. Strings are a series of combinations of letters, number, and/or symbols which can have a thickness value applied to them to make them appear three-dimensional. HUD shells have a level of transparency which can be altered anywhere between opaque to totally transparent.

TilesEach object is composed of one or more tiles. Tiles are rectangular areas onto

which the textures are mapped. They are two-dimensional in nature. Tiles will always be facing the screen so that the illusion of the world created with these tiles is not purposely given away.

Tiles are created (and the space for them allocated) when an object is created. Depending on the dimensions for the object requested, a number of tiles is created and linked (if necessary) to create the object. Tiles are all associated to the object that created them, and any call to manipulate the object affects all of the tiles associated with the object. When a call to move to the next frame of animation is called, all of the tiles making up the object are switched to the next texture required for the animation.

Tiles have a few properties that are unique to themselves (aside from the list of textures making up their animation.) Other parts of the program cannot cause any changes or affects to the tiles directly. Tiles are an invisible part of an object, and manipulation of the tiles is handled entirely by the object that “owns” them.

CameraEach scene has one camera, which can be moved about, rotated, and zoomed as

needed. Commands for manipulating the camera are available as part of the graphics module’s base class. Any call to manipulating the camera affects the camera for the active scene only.

Cameras do not have to be created. They exist automatically when the scene is created. If a scene is marked as inactive, then the camera will only display the default background color for the scene and all other objects are ignored.

18

New cameras cannot be created, nor can the existing one be destroyed. A camera only ceases to exist when the scene does. Each camera assumes a viewing angle of 45 degrees with respect to the size of the window. This angle represents the angle of the view frustum from the camera lens. Whenever the application window is resized, the scale for the view is automatically calculated and altered. The other parts of the program are not aware of this. They may make rendering calls oblivious to the window size or screen resolution.

Also, a camera can be locked to a certain object. Passing the object handle to the CameraLocking function will cause the camera’s X & Y position to be set so that the requested object will always be in the center of the screen. Any calls to move the object will then also move the camera automatically.

The reverse is also true. Locking an object to a camera will result in the object staying in the same position on the screen at all times. When the camera moves, the object will be moved so that it remains in the same screen location.

LightsLight sources are a consideration for the graphics module, but are not currently an

absolute feature. The reason being is that the textures for the tiles themselves, since they are flat 2D tiles, will create topography (and thus, shadows) by way of the art methods used in drawing the textures. In other words, hills will already have lightened and darkened sides as part of the texture itself so that it creates the illusion of a three-dimensional world.

Thus, having light sources over the drawing plane will not be needed. They are mainly a consideration to add extra modes of play such as night games (where light sources can be created to simulate spotlights along the fairway), or additional special effects such as splashes of light that flash across the screen when the ball is hit.

Splash ScreenFull screen displays (a.k.a. Splash Screens) are made by creating an object of type

"SPLASH_SCREEN" and supplying a dimension in tiles along with matching textures. Splash screens may animate if necessary and can be manipulated much like a sprite.

Splash screens will be used for the following areas exclusively:

Title Screen Between Level screens such as Leader Board display and power-up award

screen. Background for chat room / lobby during LAN and Internet multiplayer

games.

19

FontsPrinting to the screen with OpenGL can actually be accomplished multiple ways.

It is uncertain which method will be utilized (perhaps both) Keep in mind that each message to be displayed on the screen would be considered an object. So each message could have its own properties, life span, etc.

One method for displaying messages to the screen involves creating a series of textures (one per letter, number, and symbol to be represented), which would be combined to express a message represented in a string passed to the graphics module. Nice features about using tiles for the messages is that each character can be manipulated independently, so nice effects such as rolling messages, flipping letters, and scattering the characters of the message about the screen could be easily implemented.

Another method involves using a series of features within the OpenGL library to render a string of characters to the screen. These features allow you to use multiple fonts (though they must exist in a local directory) to display messages and to endow the messages with thickness that allow the characters to have a three-dimensional look. This would not be possible using texture unless the textures themselves were drawn to look three-dimensional, but then again, even if the textures were drawn that way, the thickness of the characters could not be altered.

Just like any other type of object, character strings can be manipulated and must be deactivated or destroyed before they leave the screen.

20

Features/Game-play

Game MechanicsTrick Shot Golf contains elements that require a structured approach to the flow

of the game so that game-play progresses smoothly, and so that as each element is added, it does not require rewriting entire sections of code. The flow of the standard golf game is fairly straight forward, since golf does not have a complicated set of rules. The elements of the game that require special mention here are the power-ups and the trick shot system.

Trick ShotsTrick shots must first have their activation areas indicated. Until a trick shot is

activated, its functionalities and goals will remain hidden from the player.

TRICK SHOT NEXT SHOT HANDLED SPECIAL?

IMPLEMENTATION

Man the Cannons! Y When a player lands within a radius of the cannon, then the next shot is fired from a cannon. No menu is displayed at the start of the shot since the player cannot change clubs or use a power-up. Aiming is automatically towards the hole. Power meter and control meter function as normal and must be gauged by the player to counteract the wind. The control meter (in this case) will represent turning the cannon slightly to the left or right.

Pinball Madness N When a player lands within the activation area, the bumper tiles are revealed and contact with them by the player on all consecutive shots will result in the ball being sprung in the bumper’s direction at a direction vector parallel to the ground. Contact with bumpers is determined by proximity and a height lower than a certain preset amount (say <10 meters). When a bumper is hit, a counter must track how many bumpers are hit during the remainder of the shot so that the point value of each consecutive bumper hit can be incremented.

21

Golfer’s Nightmare N When a player lands within the activation area for this trick shot, the pseudo holes are activated on the green. Contact with pseudo holes can only test true when the ball is rolling, and when the ball is actually occupying the same space as the pseudo hole. Pseudo holes do not take up an entire tile.

The Storm Cloud N Once a player activates this trick shot, a storm cloud sprite must follow the ball around for the duration of the hole, and each tile (except trees and water) must sprout flowers when the cloud and ball fly over it.

We’re Not in Kansas Anymore!

N If the player hits their shot at 100% power off the tee, then tornadoes need to be generated as play proceeds. A new tornado should spawn every few seconds until seven are present. Contact between the ball and the tornado should only register in mid-flight when they occupy the same area. Altitude does not matter. The ball cannot be shot over the tornados.

Slalom Down the Fairway N A series of poles should be set up down the fairway. They should be set in pairs with one always across from the other. The player will score points by knocking the ball between the poles. Altitude will not matter. When the ball passes between a pair of poles, they should sink back into the ground again.

Race the Clock N When this trick shot is activated, a timer needs to begin counting down continuously through the shot.

Power-UpsOnly one power-up may be used per turn. Secondly, the power-ups only affect the

player who uses them. Once a power-up is used, its effects cannot be cancelled or turned-off until the power-up’s lifetime has expired. With that established, they should be implemented with the following considerations:

POWER-UP IMPLEMENTATION DURATIONThree-Way At the top of the shot, two additional balls should be

created, placed on top of the original ball, and then cast 1 Shot

22

in slightly altered direction vectors with the same speed and acceleration of the original ball. At the end of the shot, the player can choose which ball will count for the shot.

Aero Ball The physics module should simply be tossed a value of zero for the wind’s magnitude when calculating the next shot.

1 Shot

Skipping Stone

When the ball hits water, the physics module is told that the terrain contacted was actually fairway, and the reflection calculation is determined just as if the ball had bounced off fairway. (Slope is always flat.) This should happen between 2-4 times before running out of “skips” in which case, if the ball hits water again, it simply sinks as usual.

1 Shot

Sticky Fingers

No reflection is calculated when the ball hits the ground. No matter what the slope or terrain (unless it’s water obviously), the ball should come to a dead stop.

1 Shot

Fireball Skip over checks to see if the ball hit trees. If bouncing off a tree tile, treat the impact as if it were bouncing off fairway.

1 Shot

Slick Shot When the ball is rolling, cut the coefficient of friction for all terrain in half. (Tweak as necessary for balance.)

1 Shot

Power Monger

Increase the player’s power stat to 21 temporarily. Duration of the hole

Control Freak Increase the player’s control stat to 21 temporarily. Duration of the hole

Quality Controller

Increase the player’s club quality stat to 21 temporarily. Duration of the hole

Magnetic North Pole

Gradually add influence to the ball’s direction vector during flight so that it is always trying to situate itself to go towards the pin. Do not allow this manipulation whenever the ball is rolling.

1 Shot

Open Wide Enlarge the graphic of the hole, and enlarge the bounding area that checks for collision to see if the ball was sunk.

1 Shot

Cool Ball Switch the textures for the ball sprite so that the ball sprite wearing shades is displayed.

1 Shot

Randomize Randomly choose a power-up and then carry out that power-up’s behavior.

Depends on power-up

picked

Trick Shot and Power-Up ImplementationThe fantasy golf mode functions as traditional golf mode does with the same basic

rules and the same game play structure, except for the included functionality of handling power-ups and trick shots. Also, the fantasy mode of the game features a unique splash

23

screen between holes for awarding a power-up, and the leader board at the end of each hole shows the score tally as well.

Power-UpsPower-ups are implemented in game by using a bit field to indicate when a player

has activated one. Bits in these fields are used by the ball movement code to determine whether the ball is exhibiting any special behavior during the shot. These fields are also used by the main game loop so that the game can offer the player feedback about the power-up’s effect throughout the duration of the shot.

Up to three power-ups are stored per player, and the player may access his/her power-ups through the in-game menu. Power-ups are awarded to each player at the power-up award screen that gives each player a random power-up before the start of each hole.

Trick ShotsTrick shots are special events that may occur on a hole to offer the player an

opportunity to score bonus points. (Recall that it’s the highest overall score that wins a fantasy golf game.) Each hole has some number of trick shots associated with it and when a player starts a hole and one of those trick shots is chosen to be the active trick shot for the hole. The trick shot chosen is the same for each player in multiplayer games. Trick shots are identified as available by setting bit flags which both the main game loop and the ball movement code have access to in order to properly handle the ball’s interaction with trick shot objects and to give the player constant feed back.

The state of each trick shot must be stored individually for each player so that if one player activates a trick shot, it is only available to that player. If the other players wish to try the trick shot, they must activate it themselves.

Landing on a specific area of the map activates a trick shot. When the trick shot becomes activated, it remains active for some duration specific to the trick shot.

The points scored, timers, and other miscellaneous pieces of information specific to each trick shot appear at the top of the screen. At the end of the hole, each player receives a tally of their performance on the hole, a tally of their performance with respect to the trick shot, and a cumulative score.

MultiplierHandling the multiplier is very difficult. The multiplier starts with a value of 1.0.

Any time the player ends their shot on terrain that is not fairway or green, then the multiplier is reset back to 1.0. If the player lands on fairway or green, than the multiplier is increased in value by a constant fraction (not to exceed 5.0.) If the player’s score ever goes over par, than the multiplier is reset back to 1.0.

A player’s multiplier may be used at the end of any hole. It is used to multiply only the points earned on that particular hole. If the player decides to apply the

24

multiplier, it is then multiplied to the cumulative score for the hole. After being used, the multiplier is reset back to 1.0. If the player opts not to use the multiplier points, then the multiplier carries over to the next hole, where it is possible for the player to either miss par or land on terrain to lose the bonus making the decision to carry it over a possible risk.

25

AI ModuleThe artificial intelligence for the computer controlled golf players is handled

using a combination of methods to allow the computer to play the game in what will appear to be an intelligent manner, and yet without the computer having any obvious advantages that would make the player feel cheated.

This should be able to be accomplished by setting up and adjusting the components of the AI’s shot process. The process itself is broken up into the following sub-sections:

Selecting a club Evaluating a series of possible shots Applying favoritism Selecting the shot Taking the shot

Each sub-section makes decisions in a different way than other sub-sections. Some sub-sections are fairly linear, while others use influential manipulations of the decisions based upon the preferences of the character that the computer is playing as, and others are based on a result of probability.

While this is not a complex AI model, it will provide for a series of unique computer players that each have an “organic feel”. The idea being that the linear decision branches provide a logic base that guides the computer into taking shots that make sense, while the application of character preferences and probability provide enough variety, surprises, and balance to the quality of each shot so as that the computer’s performance passes as “human-like.”

26

Selecting a ClubThe decision about which club to use will initially be as simple as it gets. The

computer will analyze the distance from its current position to the hole and will choose a club whose base distance value is as close to that distance as possible. Applied to the decision will be a character’s preference based upon how aggressive they are. More aggressive players will choose a club with a slightly longer base distance in than what is needed. Reserved players will choose a club that provides a slightly shorter distance base.

With regard to special cases, if the ball is further away than the distance provided by the club with the largest base distance value, than this club is automatically chosen as the initial club of choice. (Since, obviously, the computer player is still a long distance from the hole, so the longest possible shot is desired before altering the shot with respect to special circumstances is applied.)

If the computer player’s current shot is being made from rough or deep rough, then woods are not a possible club choice. The largest club selectable will be a low iron. If the computer player is shooting out of sand, then club selection will be limited to wedges. (The computer should always lay-up out of sand.)

27

Evaluating a Series of Possible ShotsStarting with the initial club chosen, the computer calculates the landing spot for

the shot based upon the club’s base distance plus the computer character’s power level. The landing spot is calculated initially to be heading from the player’s current position directly towards the hole. This will result in the identification of a tile that represents the probable landing spot for the shot.

Beginning from this point, the computer collects a series of possible shots. All tiles that the computer can reach with the strongest club it can choose from its collection are considered. The tiles examined, however, must be within the aiming cone of the computer.

The computer creates an aiming cone by rotating a shot vector heading straight towards the hole both clockwise and counter-clockwise for about 15-20 degrees in each direction, taking note whenever the resulting shot arc lands on a “new” tile (a tile that has not yet been evaluated.) The same considerations are placed when a new landing spot is discovered. Once a tile has been deemed valid, any other shot calculated to land on it is not evaluated.

Direction Vector towards hole

Next Shot Considerations

Tiles Under Consideration

The above diagram should roughly illustrate the concept of how the search would work. The diamonds indicate the exact landing area, while the red colored tiles represent areas that the computer could land a shot.

28

When the computer has checked all possible tiles at the end of a thirty-degree range cone, the computer then decrements a club size. The new base distance is calculated, and the computer repeats the process of checking tiles at the end of the thirty-degree arc. This process continues (pulling back on the club type and rotating the shot direction) until a set number of valid shots have been stored. The computer will also stop evaluating shots after pulling back to a sand wedge if it gets that far.

When a series of possible shots have been stored, the computer then arranges these shots based upon certain criteria. Thus begins the next process:

Applying FavoritismOnce a collection of possible shots is gathered, they are separated and categorized

in desirability based upon the following attributes:

Landing on green Landing in an area that triggers or completes a trick shot Landing on fairway that is surrounded by more fairway or green. Landing on fairway that borders undesirable terrain.

Once broken up into one of these four categories, they are then arranged by resulting distance from the hole. The shot in the category that results in the ball landing closest to the hole is most desirable.

After all this arranging is done, the computer looks at four general categories for the shot and applies favoritism to certain categories based upon the preference of the character that the computer is playing. Various combinations can be used to model different playing styles and behavior. These models are detailed later.

If multiple shots land in the same category, they are sorted by shortest remaining distance to the hole. If it is deemed that no shots exist within the computer’s shot cone that result in the ball landing on green or fairway, then the computer rescans the shots again and take any shot that lands on rough, deep rough, or sand. The shot chosen is then based on which one results in the ball landing as close as possible to the hole.

If by some fluke no shot exists that does not land in trees or on water, then the computer simply “gives up” the hole and takes a score of 10. This should never occur, but it is handled just in case this condition actually occurs, and that way the computer does not lock itself within an infinite loop because it could not resolve the shot.

29

Selecting a ShotWhen favoritism has been applied to each of the chosen shot possibilities, the best

candidate (based on character preference) is chosen. Now that a preferred shot is selected, the computer makes any last minute adjustments.

Last minute adjustments involve considerations to wind and considerations to the terrain type directly in front of or behind the target tile. This is not always necessarily going to occur. This is another area of the shot affected by the personality of the character that the computer is playing as.

If the character takes the wind into consideration, it intentionally tries to hook or slice the ball by certain amounts to counter the effects of the wind. If the wind is really strong, it may also rotate the shot into the wind slightly to help compensate.

If the character takes the surrounding terrain into effect, it looks at the terrain of the tiles directly in front of and behind the target tile. If they both contain adverse tiles, then no changes to the shot power are made. If, however, the landing area is preceded by bad terrain only, then the computer aims for full power. If the landing area is succeeded by bad terrain only, then the computer tries to cut the power back to 90%-95%.

Taking the ShotThe computer characters have power, control, and club quality ratings just like the

characters created by human players. Low power scores cause the computer to hit more unpredictable distances. Low control scores cause the computer to hook and slice the ball more often than hitting the shot straight. Low club quality scores affect both power & control and can either help make up for poor power and control or make them even worse.

The scores directly the affect the computer’s probability of achieving the target power level and target control point for the shot. This results in the computer appearing to make human-like mistakes rather than behave in a manner that is completely random.

Utilizing these various types of decision methods in different ways allows us to model several unique types of behavior as detailed on the next page.

30

Behavior BEHAVIOR MODEL APPLIED FAVORITISMS

Professional-Aggressive

Computer stores an average of its performance in terms of hitting straight shots at the right power level. If the percentage is high, the computer can assume that it can accomplish tricky shots and adjust the weights accordingly.

Landing in trick shot areas are highest preferred criteria. Landing on green actually comes in second to scoring trick shot points. Landing on fairway with surrounding fairway or not is based entirely on which shot provides the best distance. Safer shots are not considered.Club choices are always rounded up.Compensates for wind and adjusts shot power.

Amateur-Aggressive

Computer plays the game like a person who strives to do well at a game they are not particularly good at. However, this drive to do well overrides common sense and good judgment. This personality results in risky shots that seldom pay off.

Landing in trick shot areas are highest preferred criteria, followed by green. Landing on fairway with surrounding fairway or not is based entirely on which shot provides the best distance. Safer shots are not considered. The difference with this behavior model over talented-aggressive is evident: the chances of actually taking the shot successfully is lower.Club choices are always rounded up.Compensates for wind but does not adjust shot power.

Professional-Conservative

Computer plays well but does not take unnecessary risks. Also, landing on green or fairway are given equal consideration since the goal is simply to be in the best position possible on the next shot.

Landing on green or on fairway- surrounded fairway are equally weighted and judged simply on resulting distance from hole. Trick shot areas come in third place, and finally, risky shots next to bad terrain are last.Club choices are rounded up or down based upon least significant change from desired distance.Makes adjustments for wind and shot power.

31

Amateur-Conservative Computer plays with average

skill and is aware of this, so it does not try for trick shots unless necessary. The green is the ultimate goal, trying for a trick shot bonus comes second to a good score for the hole.

Landing on green takes highest precedence. Landing on a fairway surrounded by more fairway is second highest in consideration. Trick shot areas come in third place, and risky shots last.Club choices are always rounded down.Ignores wind but makes shot power adjustments.

Reckless Computer plays with wild abandon. The end lie of the ball means nothing to the computer with respect to any other consideration than distance.

Shot is chosen exclusively upon best resulting distance.Club choices are always rounded up.Ignores wind and does not adjust shot power.

Bonus Point Addict

Computer is always looking for trick shot opportunities, which result in less impressive, scores for the hole.

Landing in any trick shot zones takes highest priority. Landing on green or fairway-bordered fairway are judged equally based on which one results in closest end position to hole. Fairway bordered by bad terrain is ranked last in consideration.Club choices are always rounded up.Adjusts for wind, but does not adjust shot power.

TimidComputer plays as if afraid to take any chances, regardless of its ability to successfully pull off shots.

Landing on green or fairway-bordered fairway take highest priority. Final choice comes down to shortest distance from hole. Trick shots and landing on fairway bordered by bad terrain are also given equal weight, and are judged by shortest resulting distance from hole.Club choices are always rounded down.Adjusts for wind and shot power.

32

Clueless Computer is capable of impressively good shots and also surprisingly bad shots. The character is basically not following any set of rules when taking a shot. Each shot is hit with different considerations.

Landing on green, fairway-bordered fairway, hazard-bordered fairway and trick shot areas are all given equal prevalence. One is randomly chosen, and then evaluated based on shortest remaining distance to hole. Clubs are rounded down or up randomly.Wind and shot power are considered on some shots and then not on others.

Over-cautious Computer plays a fairly balanced game, but unfortunately makes poor judgments to correct for distance, wind, and trick shot locations. Computer will also not make attempts for trick shots unless the conditions are just right.

Landing on green is highest priority. Landing on fairway-bordered fairway and trick shot areas are given equal preference, which is resolved by shortest resulting distance from hole.Clubs are always rounded down.Wind and shot power are often overly compensated for.

33

Applying WeightsThe selected tiles are weighted and each given a “score” using a system applied

using the criteria mentioned in the above sections as follows:

Start with a base score based upon target tile’s terrain type:Fairway/Green 1Rough 0Sand -2Trees -20Water -20O.B. -50

Now, modify the base score for the tile as follows:

Check the eight surrounding tiles: Conservative Player Aggressive Player

Bordered by all fairway +2 +1Bordered by 1-3 rough or sand tiles +1 +1Bordered by > 3 rough or sand tiles +0 +0 (Or bordered anywhere by water or O.B.)

If the tile is the green:If the computer favors going for the cup +2

If the tile is a water tile & the computer has the “Skipping Stone” power-up:If fairway or green is detected within 5 tiles of extending the ball path +20

If the this tile is at furthest extent of shot cone, check the following:If there is a tail wind and the tile above is a hazardous tile -2If there is a head wind and tile before is a hazardous tile -5

If the tile is related to a trick shot opportunity (either to start or to try for a trick shot.):If character favors trick shots overall +2Otherwise +0

Arrange tiles in order of shortest proximity from the hole. (Assume ‘n’ number of tiles.):Closest tile to hole + (n – 1)Next closest + (n – 2). .. .Farthest +0Now the tiles have a series of values applied to them:

34

Scanning 14 tiles

Illustrated above is a rough estimation of tile weight distribution for shot consideration. Wind and character personality were not factored in. This is simply a basic demonstration of how shots would be judged.

Once these values are obtained for the shot, the computer would store the first, second, third, fourth, and fifth place choices. These are stored in case a shot results in disaster. Let’s say the computer aims for the first choice tile with a weight of 16 and it rolls two tiles beyond it. Let’s say that there is a water tiles at that location (or a tile marked “Out of Bounds”.) If the computer does not have a drop point and must re-shoot from the same position, it will evaluate the same shot again and probably re-enact the mistake. So, to handle this, if the shot that the computer is taking is flagged as a “re-do”, than the computer will not pick the first place choice. It instead chooses the next highest scoring tile. If the shot must be re-shot again, then the computer picks the third place choice and so on. (No consideration need go past fifth place. If the computer goes in the water or “Out of Bounds” five times, then its score is guaranteed to be at least 10 for the hole, which will result in automatic forfeiture of the hole. ) Ties in value are settled by “first-come-first-serve.”

Also, all tiles that score zero or less are automatically not considered as reasonable for a shot. If, for some odd reason, the computer scans out and can not find one single tile that scores higher than zero, then it is assumed that the computer has somehow buried itself in a nearly unrecoverable area and the computer will automatically forfeit the hole and take a score of 10 strokes.

35

1614

1111

76-18

532

11

9 12

8

Power-upsThe computer will also decide (in most cases, after a shot has been selected) as to

whether or not it will use a power-up in its possession. Listed below are the conditions for using each power-up.

POWER-UP CONDITIONS FOR USE3-Way When chosen tile is fairway or green, but has more than one

hazardous tile adjacent to it.Aeroball When there’s a headwind or cross wind of greater than 10 MPH.Skipping Stone Evaluated before shot. If water tile is chosen based upon criteria

mentioned in previous section, then power-up is used.Sticky Fingers When landing on fairway or green which has more than 3

adjacent tiles that are hazardous.Fireball Whenever any tiles adjacent to the shot’s starting position tile or

any tiles adjacent to landing tile consist of tiles with trees.Slick Shot When landing on fairway only, and only if at least five tiles

beyond the destination tile are also fairway.Power Monger Whenever there’s a face wind or at the start of any par 5.Control Freak At the start of any hole that has water.Quality Controller Used whenever Power Monger or Control Freak would be used,

and preferred over either.Magnetic North Pole On green approach shots when Remote Control is not used.Open Wide When pitching onto the green with a club no more powerful than

an 8 Iron & Remote Control or Magnetic North Pole aren’t used.Cool Ball If no other power-up is being used, the computer’s score is better

than par, and also abiding by 1:4 odds.Randomize When no other power-up is being used, and landing on fairway

that is surrounded by fairway.

* “Adjacent tiles” means any of the eight tiles surrounding the indicated tile.** “Hazardous tiles” means any tile that is not fairway or green.

Trick ShotsThe only considerations for trick shots planned is the afore mentioned support for

favoring or not favoring trick shot tiles and opportunities based on the computer player’s personality. There are no plans for additional strategies based upon the trick shot. The assumption for now is that it should take care of itself.

To illustrate why this is assumed, consider the following examples:

Let’s say the computer lands on a trick shot activation tile and the trick shot activated is “Slalom Down the Fairway.” The tiles with the poles would not be weighted

36

with a trick shot property. The computer will just continue shooting towards the hole as usual, sticking to fairways, which should result in the computer making reasonable shots that will result in it scoring points but not necessarily getting the maximum score. This should occur since the poles must follow the fairways.

If “Pinball Madness” is activated, then the tiles containing bumpers for “Pinball Madness” are flagged as trick shot related tiles for the next shot only. After that, they are treated as normal tiles again. This will prevent the computer from ignoring the trick shot opportunity, but also will prevent it from endlessly trying for more points until it has to “give up” the hole.

All the other trick shots should work out just fine if the computer continues to play as normal. Again, this should result in the computer scoring an average number of points, where it does not often score really high, and then again, does not ignore trick shots.

37

PhysicsThe physics engine is a tool used to depict realistic ball flight. The acceleration

due to gravity, wind speed and direction are all taken into consideration when performing the ball movement calculations. Collisions with sand, grass, and other surfaces will have reflections consistent with the dampening coefficient the respective surface.

The plan is to make the engine modular so that it can be used in any application, not solely a golf simulation. The inner core of the engine will simply perform mathematical calculations. There will also be an outer "wrapper" which communicates with the rest of the game the relevance of these figures.

Ball Movement:

Assuming for simplicity that the ball leaves the tee at ground level

Flight

The forces that act upon a golf ball during flight are:

Acceleration due to gravity (g = -9.8m/s^2) the negative represents that the acceleration is always toward the earth.

Initial Velocity (Vo is the initial speed with which the object is projected into the air.)

Wind (w= a constant force in a given direction)

Other factors:

Angle of projection (angle above the horizontal at which the object took flight)

Time (t is used to update the ball's current position, the change in time is factored in to accurately represent the ball's position given the number of elapsed frames between function calls)

Mass (m is the mass of the projected object)

38

Direction VectorVECTOR [I, J, K, 1] -- HOMOGENOUS COORDINATES

* SHOULD BE NORMALIZED *

The I vector in this case will represent movement along an axis determined to be running in a straight line from the ball's lie for the current shot and the hole.

The J vector will represent movement in the vertical direction. (i.e.: towards or away from the Earth.)

The K vector will represent movement along an axis perpendicular to the I vector (the line running from the ball's lie for the current shot to the hole.)

This should work fine for a movement vector, because it is easy to calculate the ball's movement with respect to the hole. This will also assure that movement along the I vector alone (in other words, moving up the screen) will always mean movement towards the hole. This could theoretically make checks for a possible hole-in-one easier. (Look for K to be some very small value very close to zero).

VelocityTHREE SCALARS: {V_i, V_j, V_k}

* TIME DEPENDENT ** MEASURED IN METERS / SEC *

Each scalar (one for each respective axis of direction) can be used to calculate how fast the ball is moving at a given time with respect to each axis of direction. Velocity is directly affected each second by acceleration.

The magnitude of the velocity value, also, is time dependent. Thus, each scalar value per directional axis is an indication of the distance in that direction covered per second. Obviously, we'll be updating the display faster than one frame per second, so a fractional value of this velocity must be taken based upon the elapsed time since the last frame render before it can multiplied to each respective normalized movement vector value.

39

AccelerationTHREE VALUES {A_i, A_j, A_k}

* TIME DEPENDENT ** MEASURED IN METERS / SEC^2 *

Acceleration (quite time dependent) is a calculated result of a sum of forces being applied to an object every second. These forces need to be calculated to show how it is affecting the ball's path with respect to each movement axis.

Applied forces: gravity, wind, and friction. (If we calculate for spin, later, then hitting the ball anywhere other than the "sweet spot" will result in a shot that arcs from left-to-right or right-to-left. And also other results, such as shots that attain a higher altitude at the top of its arc while in a state of 'back-spin' that causes the ball to not roll forward very far upon landing. The opposite can occur as well with 'forward-spin', which has a lower maximum altitude during flight. This can be very useful for hitting the ball out from under a bunch of trees. )

The forces acting upon the ball (which must be considered with respect to each of the three movement vector axis) must be calculated to show how the velocity of the ball is changing with each passing second. Acceleration values will either be positive or negative values, which may change every second or remain constant, and should be used to make adjustments to the ball's current velocity.

Caps (or maximum and minimum values) for acceleration in each direction need to be calculated as well. Gravity does not create a constantly growing rate of acceleration of an object towards the Earth. Any object following towards Earth slowly loses acceleration the closer the object gets to its "terminal velocity." To maintain realism, an object must not be allowed to accelerate to a speed that surpasses such values.

40

Calculations

Flight

The following must be given to the physics engine:

V0 -- initial velocity vectorD0 -- Initial direction vector (3D, i,j,k)m -- mass of objectg -- gravity is default argument (9.8m/s^2)wd -- wind direction vectorwv -- scalar (intensity of the wd vector)t0 -- initial timetheta -- initial angle above horizontal of flight of object

These variables need to be calculated:tf -- final time (per frame)td -- time difference, i.e. tf-t0, used to update positionMax height

These values are arguments to a function that will determine the path that the object takes until it hits a surface (ground, object, etc).

The process would be as follows:

There are two variables that need to be passed to the engine, V0&D0. We need to get values for these variables before we continue.

Step 1: Once the user performs the necessary actions to trigger a swing, given the club type a particular intensity/velocity V0 are passed to the physics engine. This is the respective power level of the swing taken (V0).

Step2: call a function that will get the directions of the ball's prospective path (The D0 directional vector) this function will take theta as an argument

Step 3: call function that takes V0, D0, m, g, and theta. With these arguments the object's projectile motion can be calculated for all times, t.

41

The transition between Flight and Roll:

When the golf ball lands on a surface various factors must be considered.

The velocity of ball upon impact

The angle of entry

The dampening coefficient of the colliding surface (a value that describes the amount of energy that is absorbed by the surface upon impact)

The slope of the surface.

Finally the mass of the object is needed.

Given these values and the fact that I'm assuming perfect reflection, the resultant velocity, V' can be calculated using a function --float DampenEffect( float EntryAngle, int mass, float V0, float DampenCoeff). Given the impact velocity, the angle at which the object collides with the surface, the mass of the object and the dampening coefficient of the surface, the resultant velocity V' can be determined. Since the assumption being used is perfect reflection, the object will reflect at the same angle that it arrived with the determined dampened velocity (V’). But in 3D the tricky part is determining the resultant Directional vector D'. The initial directional vector D0 must be compared to the vector normal to plane (N), which is the dot product of D0 and N divided by the product of their magnitudes. We then need to compute the cross products of D0 x N: this resultant vector is perpendicular to the normal (i.e. parallel to the plane), so it must be rotated properly given the reflected angle.

Once the proper D' is found, the process of flight can begin from ground zero, with V' being the initial velocity and D' being the initial direction (to the physics engine this can be treated as a brand new arc).

What we may need to test is the way we treat the max height parameter of projectile motion. To prevent the ball from bouncing forever, the max height parameter is checked and once the max height of flight goes below a certain value (to be determined during testing) the ball will switch to roll state.

42

Roll

When the ball is rolling the force of wind is not considered. The force of kinetic friction for the given surface is taken into account, though. Acceleration while in the roll state is in the I, K directions only, (i.e. the ball will not elevate).

The forces acting upon the object are, of course the weight of the (mass times gravity--mg), the normal force from the earth exerted on the object, and the restrictive force due to friction. These forces will consistently be updated until gravity and the frictional forces of the terrain bring the ball to a stop.

There is yet another consideration. If the slope of the terrain changes dramatically (such as a sudden drop-off) the ball should no longer be clamped to follow the terrain. If it were still clamped, and the ball were to, say, roll off a cliff, then the ball would appear to roll down the face of the cliff, which would look completely unnatural. Also, if the ball is rolling at high speed, and it rolls over a ramp-shaped piece of land, it should not roll over the tip, but instead pop up into the air a bit.

So, if the ball is in the "ROLL" state and it happens over a section of terrain with a slope that is nearly vertical OR the ball rolls at a velocity sufficiently fast over an area with any change in slope, at that instance, the ball must be set back into its "FLIGHT" state. The initial direction vector should be parallel to the directional vector of the ball at the time it rolled off the previous surface, and the initial velocity in the 'I' and 'K' vector directions to be set to the same as when it rolled off the previous surface. The initial velocity in the 'J' vector direction should start at zero. However, acceleration in all vector directions should once again be set to an initial value of zero. Only gravity should be gradually causing a change in the ball's acceleration in the 'J' vector direction.

When there is another impact with the ground again, the ball should wind up bouncing maybe slightly, but then falling back into the "ROLL" state where friction and slope should once again be affecting the ball's velocity.

Putting will simply start the ball in the roll state. The power with which the ball was struck will determine the initial velocity, V0 of the ball and the Directional vector D0 will also be handed to the engine. The ball's movement is only influenced by gravity and the friction of the terrain.

43

Networking

ModelThe basic network structure for Trick Shot Golf will follow the client-server

paradigm, with clients informing the server of certain events, and the server following up with additional information. All “sensitive” events would require server authentication, which is one way to prevent cheating.

The flow of information can be summarized as follows:Each client processes certain events by sending a message to the server, who then may forward this information onto all other clients by sending a message to each one in turn. At no time will a client send a message to another client. Clients do not necessarily act upon the information they receive about other client’s actions.

44

PacketsEach packet will have a header, which identifies the message contained therein.

This is one byte. Following this header is other information that varies from message to message. Below is a complete list of all messages, with the data fields specified for each message. The size of each field varies, as the data is formatted into a sequence of bytes (ASCII characters) before it is sent. Note that the header field is unspecified. In the cases where a network packet has a field that contains another packet, the contained packet will have no header.

Format:Category name:1) packet name:

A) data fieldi) field detail

a) detail breakdown

Before game:1) join request:

A) player informationi) player stats

a) powerb) controlc) club quality

ii) player name length (in bytes)iii) player nameiv) portrait indexv) player id

2) join deny:A) reason

3) join accept:A) player id assignedB) game options

i) fantasy/traditional rulesii) course file name length in bytesiii) course file name

C) number of playersD) player information [1st player is server]*(number of players)

i) player information (as above)4) new player:

A) player information (as above)5) option update:

A) game options (as above)

45

During Game:1) power up awarded

A) player idB) power up id

2) power up decisionA) player idB) sacrificed power up index

3) shot update:A) player idB) shot information

i) selected clubii) poweriii) accuracyiv) components

a) xb) yc) z

v) power up index4) current ball position:

A) player idB) position components (as above)C) velocity components (as above)D) tornado information

i) tornado countii) components (as above)*(tornado count)

5) current scoreA) player idB) fantasy scoreC) strokes

6) resting ball position:A) player idB) position components (as above)C) fantasy scoreD) strokesE) hole completed flag

7) use multiplierA) player idB) use flag

8) drop playerA) player id

Lobby:1) text message

A) player id

46

B) message sizeC) message

47

EventsFollowing is a list of all game events that require a network action, along with the

network packet that is generated as a response to the game event.

Before Game: Client requests to join a new game

client to server: join request

Server acknowledges join requestserver to client: join deny--or--server to client: join acceptserver to others: new player

Server changes game optionsserver to clients: option update

Server starts game--for each client--server to client: power up awarded

During Game: Client chooses power up to sacrifice

client to server: power up decision

Client accepts power upclient to server: power up decision

Server starts play on the current holeserver to clients: resting ball position

Client hits the ballclient to server: shot update

Server sends periodic ball movement updateserver to clients: current ball position

Server determines that a player’s ball has stopped movingserver to client: resting ball positionserver to others: resting ball position

Client times out (forced stroke)

48

server to client: resting ball positionserver to others: resting ball position

Client times for the final timeserver to client: drop playerserver to others: drop player

Server times out (forced stroke)server to clients: resting ball position

Server times out for the final timeserver to clients: drop player

Client indicates use of multiplierclient to server: use multiplierserver to client: current scoreserver to others: current score

Server indicates that the hole is completed by all playersserver to clients: power up awarded--or--nothing

Client quits the gameclient to server: drop playerserver to others: drop player

Server quits the gameserver to clients: drop player

49

Lobby: Client sends text message

client to server: text messageserver to others: text message

Server sends text messageserver to clients: text message

Notes: Server has timers on each player; timer is reset when server receives any message

from client; when timer expires, client is dropped from the game. Clients have timer on server; timer is reset when client receives any message from

server; when timer expires, client plays out the remainder of the course in one-player mode.

50

User Interface

In-game UIThe layout of the game screen during game play should look as illustrated in the

following examples:

Main Game Screen

51

INSERTPRETTY GRAPHICS

HERE

3

1

5

2

67

84

9

1. Player Name:The name of the active player is displayed here. In LAN and Internet multiplayer

games, this is will not change. In hot-seat games, however, it is important for players to look at this box to see who is next to take a shot.

2. Hole Number:This represents the number of the hole that the player( s ) are currently on. The

read-out should say: “ HOLE #” followed by the number of the hole.

3. Wind Compass:This is a small graphic denoting the direction of the wind. The point on the tip of

the arrow compass always points in the same direction that the wind is blowing.

4. Wind Speed:Printed here is the speed of the wind in MPH.

5. Distance Remaining:Printed out at this location of the screen is the number of yards from the ball’s

current lie. The distance will always be calculated in a straight line from the ball to the cup. Obstacles and undesirable terrain, such as water, is not taken into account, so the player must make the necessary adjustments when gauging their shots.

6. Club Selection Icon:Printed atop a small icon of a clubface is the type of club that is currently

selected. Below the name of the club is the maximum number of yards of flight that the club is capable of delivering with a clean shot. (Power penalties from terrain are not taken into account.)

7. Lie Icon:Displayed at this location is a small icon of the ball sitting on its current terrain

type. Printed just below the icon is the name of the terrain type. So, if the player’s ball lands in rough, the icon will look like a ball sitting in grass, and the word “ROUGH” is printed below it, for example.

8. Terrain Distance Penalty:Lastly, the percentage range of the amount of power lost from the terrain (detailed

in the Terrain Types section) that the ball is currently sitting on is displayed here.

9. Overhead Map:An overlay with a graphic depicting the layout of the course along with the

position of the player( s ) indicated with colored circles.

52

End of Hole Screen:

1. Player Listing:As each player finishes his/her play on a hole, this Leader Board is updated and the player’s names are arranged based on least number of strokes used throughout the holes so far (or points in fantasy mode.)

2. Press Accept to Continue:As this probably already sounds, this is a button declaring that the user need only press the pre-defined Accept button to continue on the next screen.

53

LEADER BOARD

1

2

Power-Up Lottery Screen(Fantasy Mode Only)

1. Power-up Lottery Wheel:Not really a wheel, but a blurring series of power-up names that flash until finally stopping on a random power-up. By pressing the Accept Power-Up Menu Option [4], the power up is added to the player’s store of power-ups. Since the player can only hold 3, however, the oldest power-up is dropped for the new one, if the player so chooses to take the new power-up.

2. List of Player Power-ups:This is the current list of power-ups (3 Max.) that the player currently has.

3. End of Fantasy Hole Menu:A small menu that prompts the player as to whether or not they’d like to take the new power-up.

54

TAKE A POWER-UP

2 3

1

End of Hole Tally Screen(Fantasy Mode Only)

1) Earned Point List:This area contains an itemized list that includes the Base Bonus Score for the hole based upon the player’s performance and the number of points earned, if any, for completion or partial completion of any Trick Shots.

2) Current Multiplier Level:Displayed here is the current value for the player’s Accuracy Bonus Multiplier.

3) Multiplayer Point Comparison:Two scores is displayed here, side by side. On the left is the score before the Accuracy Bonus Multiplier is added. On the right is the player’s score if the Accuracy Bonus Multiplier is added.

4) Confirmation Prompt:A simple prompt is displayed for the player. Press Accept to use the multiplier, or press back to store the multiplier and not use on the point total for this hole.

55

END OF HOLE TALLY

1

2

3

4

Menus

56

Main Menu

Quit New Game Player Stats Game Options

Player CreationSound

Graphics

ControlsLocal Game

SetupHost/Join Selection

Player Setup

Player Creation

Playing

Player Selection

Game Options

Player Creation

LobbyCourse Selection

Return to Desktop

Main Menu

A: Column of buttons to transition to the level two menus, or to quit the program.B: Descriptions of what each option is.

New Game Selection

A: Buttons to select either a local (single player or hot-seat) or a networked game (internet & LAN).

B: Text fields that have descriptions of the game types.C: The Back button to return to the Main menu.

57

Local Game Setup

A: Buttons to select which game type is to be playedB: Description of each game typeC: The back button to return to the New Game menu

Host/Join Selection

A: Radio fields to select if user wants to host a new game or join an existing one.B: An IP entry field. Disabled if Host is the current option selected.C: The back button to return to the New Game Menu.D: The accept button to move to the next menu for hosting or joining a network game.

58

Host Options

A: Radio buttons to select either Traditional or Fantasy.B: List of available courses to play the game withC: Group of buttons to configure fantasy options is possibleD: The back button to return to the Host/Join menu.E: The accept button to use the options to create a new networked game.

Player Selection/Player Stats

A: List of all the players to select from.B: Display of the player stats, portrait, etc…

59

C: Back button to return to the previous menu, either the Main menu or the Host/Join menu.

D: Button to proceed to the Player Creation menuE: Button to permanently delete the current selected player from the roster

Player Creation

A: Text entry field for user to enter a name for this new player.B: Radio buttons to select stats for player (i.e. handedness, gender)C: Stat distribution controlsD: Player portrait selection and display.E: Back button to return to the player selection/player stats menu without creating a

player.F: Accept button to return to the player selection/player stats menu by creating the new

player.

60

Course Selection

A: List of the available courses to choose from.B: Thumbnails of the holes that the selected course is made up ofC: Back button to return to the Player Setup menu.D: Accept button to begin game with course choice.

Game Options

A: Column of buttons to select which game options to modifyB: Descriptions of what each options section dosC: Back button to return to the main menu

61

Sound/Graphic/Control OptionsAll three of these menus will consist of a series of checkboxes to turn on or off

the particular configuration options. The input options menu will also have a series of textboxes to allow for the reconfiguration of the in-game controls.

62

Sound & Music

MusicThe sound engine for Trick Shot Golf will allow the playback of music files. The

game will randomly select a music file from within the "music" directory and start playback (unless music is turned off.) The engine will support playback of wav, mp3, and ogg files. Additionally, the game can be configured to play audio compact discs as an alternative.

SoundThe sound effects requirements for Trick Shot Golf are numerous. The breakdown

of these requirements is below.

Menus proliferate in Trick Shot Golf, so sound effects are necessary for accepting an action, and declining an action.

The sounds of a golf ball being struck by different golf clubs are also needed. There are fifteen different clubs. This number can be reduced to four by categorization into wood, iron, wedge, or putter. For each category, there are three levels of sound, one each for a light, medium, and hard hit.

The sound of a golf ball landing in each of the terrain types (except for tee), and going into the cup is required.

Sound effects for each of the seven types of trick shot are required.

Each of the thirteen power-ups requires a unique sound effect.

A sound effect for a multiplier increase, score tallying, acquiring a power-up, and removing a power-up is needed.

Sound effects for announcing the money hole, moving to the ball landing location, and successfully completing a trick shot are desired.

A sound effect is required for both of the power determination and accuracy determination portions of the shot system.

63

EngineThe sound engine for Trick Shot Golf incorporates both the playback of sound

effects and music tracks for the game. There is a game initialization file for setting a few options, such as the usage of random music files or the playback of audio compact discs. During game initialization, all sound effect files are loaded. The sound effects are accessible by way of a numeric identifier during game progress. Music files are loaded on an as-needed basis, to keep memory usage down.

64

Input/Controls

Input abstractionInput is done using Direct Input, part of Direct X 8. This allows very fast and easy

to use input for windows machines, but would require a rewrite of the input module should the game ever be ported to a different platform.

The input module’s construction is fairly simplistic. The input module itself is a class with private members used for acquiring devices and such from direct input, but don’t need to be seen by the user once direct input is abstracted. There is an initialization method used to allocate memory for any buffers, as well as calling all the direct input function calls to set up the keyboard, mouse, and any joysticks to receive input from should they be available. If Initialization fails it will return false, and the free method should be called. The free method de-allocates all of the buffers, and frees up any direct Input resources that were created during initialization (depending on how far through initialization it got) such as handles to devices.

There is no buffered input, instead the state of every button is stored in a private array in the input class. There are accessor functions that let clients check the state of any particular keyboard key, mouse button, or joystick button. There is also a second array to hold the state of the keys at the previous polling. With this setup, a client can check for key repeating by comparing the current state with the previous state. If the two states are the same, then it is a repeat, and can be ignored. If the two differ, there was a change in the state of the key, and you should do something about it. A call to the Poll method will copy over the current state to the previous state, and then refresh the current state. Then the client can check them both. This means that if the game slows down, there may be some data loss, but for the most part it should work adequate, and save some time and complexity by not having to support state polling, and buffered input, when buffered input would only be for lobby chat, and any other text input in the menus.

There are also two additional smaller arrays for keeping track of the special key-bound keys like accept and decline. These behave in the same manner as the other 2 arrays. Their status is updated by the same call to Poll. The key bindings are kept in a private structure, but will have accessor functions to let the menus display their current values, and let the user change the key bindings from their defaults.

Joystick and mouse axes are also going to be stored in the class for use with the menus. For convenience, the axes current positions are going to be stored as public variables that can be changed, while their change in position are kept as private variables, with a get-function so they can only be modified by the class itself. The axes of the joysticks or mouse cannot be bound to a command like accept or decline, but can be bound to moving left or right through options in-game. When in the regular menus, the mouse will function as a regular mouse with cursor, and the axes on a joystick will have

65

no effect. The status of the joysticks and mouse can be polled with the same Poll method as everything else.

Menu SpecificThe menu will support both the mouse and keyboard as well as whatever input is

being used for in-game controls. The input that designates the directional controls will control movement between buttons and other controls in the menu. The Accept button will press buttons and change radio button options. The Decline button will cancel out of selections or back up one menu depending on the situation. The menus will also support keyboard input as hot keys to press the buttons and change options instead of moving the mouse to click on them.

66

Development Risks

A.I.Artificial Intelligence is always an area of development to give serious

consideration to. The ideal would be to have the game consist of computer controlled golfers that offer a reasonable challenge because they play in a believable manner. In other words, the computer is not set up so that it plays perfectly, but then is obviously forced somewhere in the code to screw up an occasional shot.

Natural behaving AI is a very tricky concept to model and code. For a golf game, there are not many considerations per shot besides a look at the wind, the layout of the fairway, locations of hazards, and then choosing a club. However, this game will complicate the process a bit by adding in decisions to use power-ups, and decisions to make attempts for Trick Shots.

Networking & Internet PlayThe multiplayer aspects of this game present themselves as a fairly challenging

part of the development cycle. This is a particularly risky portion of design, because it will undoubtedly involve making this program a multi-threaded application, which will lead us into having to carefully calculate the game’s design and data arrangement to prevent huge, difficult-to-trace problems from arising.

Although everyone on the team has been through a networking college course, we are not very experienced yet with writing programs designed to run in tandem on multiple computers while communicating with each other. This will most certainly prove to be an area of the game that we will have to address early and dedicate ourselves to considering the complications involved.

However, the multiplayer modes of the game do not require the players to interact with each other in real-time. Instead, it mainly involves an updated overlay map of the course with an indication marker for each of the players’ positions. This is a fairly simple example of message sending and updating the game state. Since the game does not require a more complicated network model to handle the features of the multiplayer modes of the game, we should be able to handle the challenge of adding this feature to our game.

67

Code Formatting

Header Files Header file name should match counterpart .cpp file “#pragma once” or “#ifndef” at the start of every header file to prevent multiple

inclusions of the same header Only include necessary files in header. Include others in .cpp files

Commenting

CodeThere should be enough commenting of code to explain the processes of

the code. Depending on the complexity of the algorithm, comments can be anywhere from a single to several lines.

File HeadersAt the top of each file should be a header that covers:

File name Description – what is this header intended to do? “Owner” / Created by – who is responsible for this file User Notes, if applicable – anything special someone should know

who is using these structures/classes/functions.

Function HeadersAt the top of each function should be a header that covers:

Function Name Description – what does this function do/accomplish? Inputs – what are the inputs and what do they mean? Outputs – what are the possible outputs and what do they mean?

Function parameters

When passing structures/classes Pointers when function intends to change data in the structure. References when function does not intend to change the structure Also recommended is that all parameters that are passed by

reference or address that are not intended to be changed be marked as const to prevent accidental modification.

Default parameters whenever feasibleThe use of default parameters is encouraged to create more client friendly

functions. If functions are going to be using multiple default parameters, be sure to take into consideration which parameter(s) are more likely to be specified by a client so that those are placed further to the left in the parameter list.

68

Naming Conventions / Spacing / ParenthesesThere are no strict guidelines for the use of naming conventions, spacing or

parentheses. They should all be used in ways that promote the readability of code for others.

Source Safe All files needed for the successful compilation or execution of the

program should be made part of the game project and under source control

Files should not be checked in if they have a compilation error or cause compilation errors in other files

File should not be checked out overnight or over weekends if other people need to edit those files to complete their tasks

69

Glossary of TermsThis is a glossary of golf related terminology used in this document.

ACEThis is another name for a hole-in-one.

ALBATROSSThis is another name for a double-eagle.

BIRDIESinking the ball in the cup one stroke under par.

BOGEYSinking the ball in the cup one stroke over par.

BUNKERThis is another name for a sand trap

CHILLY-DIPPERThis is affectionate golfer slang for a REALLY bad shot.

CLUBSpecial stick with a fattened head that has an angled face designed to provide lift

when striking the golf ball. Golfers carry several clubs, and there are a few different types: Woods (including a driver), Irons, Wedges, and a Putter.

CUPThis is the name for the location on the green that the golfer must sink the ball

into. A small pole with a flag on top is used to mark it, which is then removed during putting.

DOUBLE-BOGEYSinking the ball in the cup two strokes over par.

DOUBLE-EAGLESinking the ball in the cup three strokes under par.

70

DRIVERThis is the club that delivers the maximum distance of all. It is a wood, which

means the head of the club is made out of wood. This particular wood however, is really only useful off the tee, where the shot can be made clean. Otherwise, shot distances become unpredictable.

DROPPlacing a ball (if your shot landed in water) in a specific location next to the body

of water you landed in. After incurring a one-stroke penalty on your score, you take your next shot from this location. “Taking the drop” is used in reference to a player performing this action.

EAGLESinking the ball in the cup two strokes under par.

FAIRWAYStretches of smooth green turf laid out to provide areas for a golf ball to land

before reaching the green.

GREENThe green contains the cup that the golfer must sink the ball into to finish the

hole.

HOLEThere are 18 holes to a golf course. Each hole consists of a tee where the player

begins the hole, assorted natural obstacles (such as small bodies of water), and the green where the player ends the hole by sinking their ball into the cup.

HOLE-IN-ONESinking the ball in the cup in one stroke.

HOOKThe course of a ball that curves in a direction away from the dominant hand of the

player propelling it, as to the left of a right-handed player.

IRONSRefers to the set of clubs made for moderate distances. The angle on the club’s

head provides good lift for shots that must be made in rough or other areas where the ball is partially obstructed. a particular iron is referred to as the word iron with the number of the club. The higher the number is, the shorter the distance that the club is capable of delivering. They range from 9 Iron to 1 Iron.

71

LEADER BOARDA large scoreboard posted somewhere on the course. Used in competitions, it is

called a leader board because it lists the top players on the course for a game.

LIEThis refers to the current location of the ball. The lie is often used in reference to

the type of terrain that the ball is currently lying on. A “good lie” means that the ball is in an area that will make it easier to make the next shot a good shot.

MULLIGANA rule that is used only at the discretion of the players during a friendly game, and

seldom if ever during professional competition. “Taking a mulligan” means to retake your shot from your current location without a stroke penalty. In other words, if you make a mistake, you’re allowed to try again without gaining a point. ( In golf, this is good because it’s the lowest score that wins. )

PARRepresents the number of shots the average golfer should need to sink the ball

into the cup. To “make par” means to make the average score for the hole.

PINA term referring to the flag placed inside the cup at the start of a hole. The phrase

“closest to pin” refers to the player whose shot lands closest to the flag ( and thereby, closest to the cup. )

PITCHTo use a special type of club to kick the ball up into the air to free it from areas of

great encumbrance such as when the ball has sunken into sand or is lying beneath a thick patch of weeds and grass.

PITCHING WEDGEA special club for knocking the ball high in the air to free it from areas of great

encumbrance. A Pitching wedge is one of two types of wedges.

PUTTUsing a special club to hit the ball squarely enough that it rolls along the ground

rather than popping into the air. Putting occurs once on the green where there is no longer a sizeable distance between the ball and the cup.

PUTTERThe club a golfer uses once on the green. It is designed for simply tapping the ball

so that it rolls along the ground.

72

ROUGHAreas on a hole that are off the fairway. It is not desirable to land a shot in this

area, since it can consist of tall grass, weeds, and other types of plant growth that make shots from within it to be much more difficult than on the fairway.

SAND TRAPSand traps are usually concave indentations in the ground that are filled with sand

and are used to provide obstacles for the golfer. Landing a shot in a sand trap is only partially annoying near the green, but it can be very damaging to your score if you land a shot in a sand trap that was placed on the side of the fairway, especially if you are still over a hundred yards from the green, because the distance you can carry the ball when hitting it out of the sand is very limited. You’ll have to sacrifice a shot, basically, just to free your ball. Also called bunkers.

SAND WEDGEA special club for knocking the ball high in the air to free it from areas of great

encumbrance. Much like the pitching wedge only it is designed specifically for freeing the ball from sand traps. It also does not provide as much distance as a pitching wedge.

SLICEThe course of a ball that curves in the direction towards the dominant hand of the

player propelling it, as to the right of a right-handed player.

STROKEA term referring to each shot that a player takes. If a golfer has hit the ball twice,

and is getting ready to take another shot, they are said to be on their “third stroke.”

TEEA small wooden peg upon which a golfer may sit their ball during their first shot

for the hole. It is placed into the ground at the start of a hole. The “tee” also refers to the starting location on a hole.

WEDGEA type of club used for pitching the ball. (See pitching, pitching wedge, and sand

wedge.)

WOODSRefers to clubs with a woodenhead. Woods deliver the most distance, but,

because the slope of the head on a wood is designed for distance over height, these clubs are really only suitable for shots originating from the tee or on the fairway.

73

74

Signature Sheet

TECHNICAL DIRECTOR Russell Aasland

DESIGNER Douglas DaSilva

PRODUCER Brad Wiggins

ART/SOUND DIRECTOR Jonathan Bryant

PRODUCT MANAGER Jemal Armstrong

75

Project Planning Timeline

This page is not intended to be printed.

76