-1Game: Zombie Farm
Team: Undead Psycho Monkeys
GAM400 Fall 2004
Zombie Farm
Technical Design Document
Version 1.0
Team Undead Psycho Monkeys
GAM 400B Fall Semester 7
10/02/2004
Managing Producer – Michael Moore
All content copyright © 2004, DigiPen (USA)
Corporation. All rights reserved
Managing Producer: Michael Moore
All content copyright © 2004, DigiPen (USA) Corporation. All rights reserved
-2Game: Zombie Farm
Team: Undead Psycho Monkeys
GAM400 Fall 2004
Table of Contents
Table of Contents .............................................................................................................. 2
Project Overview............................................................................................................... 4
Game Concept:................................................................................................................ 4
Technical Goals: ............................................................................................................. 4
System Requirements: .................................................................................................... 4
Risks:............................................................................................................................... 5
External Tools: ................................................................................................................ 5
Gameplay ........................................................................................................................... 6
Game structures/objects .................................................................................................. 6
Physics and math............................................................................................................. 7
Collision .......................................................................................................................... 7
Player actions .................................................................................................................. 8
Items .............................................................................................................................. 11
Scoring/Victory ............................................................................................................. 12
Coding Standards ........................................................................................................... 12
Coding Guidelines ........................................................................................................ 12

Comments ......................................................................................................... 12

Naming conventions ......................................................................................... 13

Coding guidelines ............................................................................................. 14
Main game loop ............................................................................................................ 14
File formats ................................................................................................................... 15
Global Variables ........................................................................................................... 16
Data classes ................................................................................................................... 17
Installer ......................................................................................................................... 18
Source control ............................................................................................................... 19
Artificial Intelligence ...................................................................................................... 19
Overview ....................................................................................................................... 19
Farm AI ......................................................................................................................... 19
Finite State Machine ..................................................................................................... 21
FSM-Actor Interaction .................................................................................................. 23
Graphics ........................................................................................................................... 23
2D Graphics Engine ...................................................................................................... 23
3D Graphics Engine ...................................................................................................... 26
Audio ................................................................................................................................ 29
Sound Effects ................................................................................................................ 29
Music............................................................................................................................. 29
Input ................................................................................................................................. 30
Keyboard ....................................................................................................................... 30
Gamepad ....................................................................................................................... 31
Mouse............................................................................................................................ 31
Managing Producer: Michael Moore
All content copyright © 2004, DigiPen (USA) Corporation. All rights reserved
-3Game: Zombie Farm
Team: Undead Psycho Monkeys
GAM400 Fall 2004
Internal Tools .................................................................................................................. 31
Timeline ........................................................................................................................... 32
Milestone schedule .......................................................................................................... 32
Managing Producer: Michael Moore
All content copyright © 2004, DigiPen (USA) Corporation. All rights reserved
-4Game: Zombie Farm
Team: Undead Psycho Monkeys
GAM400 Fall 2004
Project Overview
Game Concept:
The game takes place in the Demon Realm, inhabited by all kinds of friendly yet
strange ghouls and demons. You, the player, control an undertaker who is commissioned
by the king to produce an army of the undead by growing them in your graveyard. You
can order the zombies that you grow to help you with daily farm tasks.
Technical Goals:

To expand our working knowledge of DirectX and Direct3D.

To implement a functional 3D engine.

To complete a game that can be a center point for our portfolios.
System Requirements:

PC computer

Windows 2000/XP

Minimum Requirements:
OS:
Windows 2000
Processor:
700 MHz
RAM:
128 Mb RAM
HD Space:
100 Mb (For installation)
Video Card:
GeForce2
VRAM:
32 Mb
Managing Producer: Michael Moore
All content copyright © 2004, DigiPen (USA) Corporation. All rights reserved
-5Game: Zombie Farm
Team: Undead Psycho Monkeys
GAM400 Fall 2004


Recommended Requirements:
OS:
Windows XP
Processor:
1.0 GHz
RAM:
256 Mb RAM
HD Space:
100 Mb (For installation)
Video Card:
GeForce4
VRAM:
128 Mb
Delivery Method:
Standard CD (650 Mb)
Risks:

The team has two years of experience working with Direct3D, but this will be our
first project actually using fully 3d environments.

Given the looming threat of “senioritis” we have to try to accelerate our progress
to try to reach as close to Alpha stage as possible by the end of 1st semester.

This will be our first year using CVS for Source Control, which may cause
problems.

We didn’t receive an Art Team, so we have to do all the 3d art ourselves, which
adds a considerable amount to our already full task-list.
External Tools:

Microsoft Visual Studio .NET

CVS Source Control
Managing Producer: Michael Moore
All content copyright © 2004, DigiPen (USA) Corporation. All rights reserved
-6Game: Zombie Farm
Team: Undead Psycho Monkeys
GAM400 Fall 2004

3D Studio Max v6

Adobe Photoshop

Inno Setup (to generate the installer).
Gameplay
Game structures/objects

Actor
o Actors will handle all the creatures and units in the game. Including the
player and all town NPCs.
o The Actor class will contain the 3d mesh, and will control all animation,
state handling, and physics for the unit.

Prop
o Props will include non-interactive objects, such as grave stones. Any
object that does not animate, and is not part of the terrain mesh, will be a
prop.

Terrain
o The terrain will be a basic mesh with no animation data.
o Terrain will need to hold a list of collision boxes outlining all the areas on
the map the player can collide with.

Bounding Box
Managing Producer: Michael Moore
All content copyright © 2004, DigiPen (USA) Corporation. All rights reserved
-7Game: Zombie Farm
Team: Undead Psycho Monkeys
GAM400 Fall 2004
o All objects and terrain will contain at least one bounding box that will
determine collision areas.
Physics and math

The physics system for our engine Phoebos will be completely rewritten from last
year’s version.

Physics will now be completely 3d Newtonian based physics.

Simple physics is all that we’ll need, force based acceleration/deceleration and
ground friction should suffice.

Math Objects:
o Vector:

The 2d vector class.
o Vector3

The 3d vector class.

Typedef-ed as VECTOR for easier use (read: lazy).
o Matrix

The 4d matrix class.
Collision

Given the stocky nature of all the characters, and the simple interaction needed for
the gameplay, all collision will be handled by simple box collision calculations.

Collision boxes will be set up manually for the environment.
Managing Producer: Michael Moore
All content copyright © 2004, DigiPen (USA) Corporation. All rights reserved
-8Game: Zombie Farm
Team: Undead Psycho Monkeys
GAM400 Fall 2004

Character collision boxes will be stored in the character class, and will be handled
dynamically.
Player actions

All player actions are context sensitive; which means they can only occur when
the player is standing near the correct place for the action.
o For example, when the player is standing near an untilled grave, when
they press the action button they will be prompted to plant a new skeleton.

There are two contextual buttons on the player’s controller: Action and Dig.

The area for each type of action will be determined by a special collision box. The
box will be given an ID pertaining to a specific action. When the player collides
with that box they can then perform that action.

If no action collision is present, the player does nothing.

Action List:
o Plant

Occurs when a player is next to an untilled grave.

Prompts the player for a “recipe” to bury. The player then selects a
collection of bones to bury, along with a sigil.
o Water

Occurs when the player is next to a tilled, un-watered grave.

If the player has any blood left in their watering can, they will
water the grave.
Managing Producer: Michael Moore
All content copyright © 2004, DigiPen (USA) Corporation. All rights reserved
-9Game: Zombie Farm
Team: Undead Psycho Monkeys
GAM400 Fall 2004
o Fill Watering Can

Occurs when the player is next to the blood pool.

Fills the player’s can completely.
o Harvest

Occurs when the player is next to a “ripe” grave.

The player will pull up the corpse, which will then be moved to the
storehouse.
o Unearth

Occurs when the player is next to a tilled, watered grave.

The player will be prompted to see if they really want to dig up the
current grave. The bones will be returned to them, but the sigil will
be lost.
o Feed

Occurs when the player is next to the livestock pen.

The player will be prompted to feed the unfed animals.
o Sheer

Occurs when the player is next to the sheers at the livestock pen.

The player will be prompted to sheer all the “sheep”. The sheep
ready for harvest will then be sheered, and the player will receive
the skin from each.
o Talk

Occurs when the player is next to a town NPC
o Shop
Managing Producer: Michael Moore
All content copyright © 2004, DigiPen (USA) Corporation. All rights reserved
- 10 Game: Zombie Farm
Team: Undead Psycho Monkeys
GAM400 Fall 2004

Occurs when the player is next to a vendor in the town.

There are two shops, the hot spot for each being a gumball
machine for the sigil shop, and a cart for the bone shop.

You do not have to talk to the shopkeeper to buy something.
o Enter house

Occurs when the player is standing near the front door of their
house.

The player will then enter the house.
o Read

Occurs in the player’s house when they examine the books lying
on the table.

The books will serve as a form of tutorial for the player.
o Sleep

Occurs in the player’s house when they examine the coffin
standing at the far wall.


The player’s progress will also be saved at this point.
Dig-Action List
o Scavenge

Occurs in town when the player is not facing an NPC.

Digs directly in front of the player.

Has a random chance of digging up an item.
o Hit
Managing Producer: Michael Moore
All content copyright © 2004, DigiPen (USA) Corporation. All rights reserved
- 11 Game: Zombie Farm
Team: Undead Psycho Monkeys
GAM400 Fall 2004

Occurs when the player uses the shovel when standing next to an
NPC. The player will hit them with the shovel.

This action will push back farm-bots wandering around the farm
and townsfolk wandering around the town.
o Dig Grave

Occurs when the player is facing an empty, dirt-filled grave plot.

Changes the grave plot’s state to “Dug,” indicating that it is ready
to receive a corpse planting.
Items

Bones
o There are 9 bones in total: head, torso, arms, and legs for both bipeds and
quadrupeds, along with a wing bone for the highest level units.

Sigils
o There are 4 sigils in total. The 4th is only usable on the high level units,
and require a wing along with the full skeleton.

Quest Items
o Several quests will require you to deliver a particular item to a
townsperson. These items will only appear in your submenu, and are only
used to further the quest.

Reward Items
o The player can complete one quest each month, except for the final month.
o The rewards are:
Managing Producer: Michael Moore
All content copyright © 2004, DigiPen (USA) Corporation. All rights reserved
- 12 Game: Zombie Farm
Team: Undead Psycho Monkeys
GAM400 Fall 2004

Improved bone-digging luck.

Defense upgrade.

Shop discounts.
Scoring/Victory

Victory:
o The game ends in victory when the player completes the final month with
a passing amount of Quota Points.

Defeat:
o The game ends in defeat if the player misses the quota for two of the first
three months.
o Also, the game ends if the player misses the quota for the final month.
Coding Standards
Coding Guidelines
 Comments
-
All files MUST have a header listing the filename, author, and what the
file does (its purpose).
-
All functions or methods must have a comment explaining at the very least
what the function does. Preferably the function header should have the
function name, the argument list, return types, and a description of what it
does.
Managing Producer: Michael Moore
All content copyright © 2004, DigiPen (USA) Corporation. All rights reserved
- 13 Game: Zombie Farm
Team: Undead Psycho Monkeys
GAM400 Fall 2004
 Naming conventions
-
Pheobos Engine modules:

All files in the Phoebos engine must be prefixed with a “PH_” in
the filename.

All Phoebos related source files should be stored in the
“ZF_Base_Phoebos” directory.
-
Zombie Farm Engine modules:

All files in the Zombie farm base engine must be prefixed with a
“ZF_” in the filename.

All Zombie farm base files should be stored in the “ZF_GameLib”
directory.
-
Zombie Farm driver modules:

All files in the Zombie farm driver must be prefixed with a
“ZFM_” in the filename.

All Zombie farm base files should be stored in the
“ZF_MainDriver” directory.
-
General conventions:

Classes:

All classes must have a comment header describing the
purpose and general usage of a class.

All methods must have a function header of some form
both in the header and the cpp file.
Managing Producer: Michael Moore
All content copyright © 2004, DigiPen (USA) Corporation. All rights reserved
- 14 Game: Zombie Farm
Team: Undead Psycho Monkeys
GAM400 Fall 2004

All member variables must be prefixed with an “m_”. The
underscore can be optional, but the letter following the ‘m’
must be capitalized.

Class names should follow the same naming conventions as
with the filenames. So a class in Phoebos should be
prefixed with “PH_”, and so on for the other game sections.
 Coding guidelines
-
Digipen copyright info must be at the top of every header file.
-
Global variables are acceptable, but must be kept in strict check. Only
large master systems should be global, and even then, it’s preferable they
be pointers.
-
Cross dependencies should be avoided like the plague. There are some
instances where having a cross dependency can be really cool, but it’s far
too difficult to debug properly.
Main game loop

The main game flow is controlled by a state machine.

ZFM_GameSystem
o The class that controls the game control state machine.
o Has a pointer to a state class, which it dynamically allocates when
switching between states.
Managing Producer: Michael Moore
All content copyright © 2004, DigiPen (USA) Corporation. All rights reserved
- 15 Game: Zombie Farm
Team: Undead Psycho Monkeys
GAM400 Fall 2004
o The Update function is what gets called every frame by the main loop.
This function handles all the basic input and game logic. Then it calls the
appropriate functions on the current state to handle the specific logic.

GState
o The base class for all game states.
o Each specific game state must inherit from this class.
o The initialize function sets up all the data for the state.
o Draw handles all the rendering, and Update handles all the logic and input.
o The function CheckChange determines if the state machine must enter a
new state. If it does, the current state allocates the new state, and returns a
pointer back to the GameSystem, which then de-allocates the old state and
keeps the new one.
File formats

Graphics formats:
o All textures will be 24 bit bitmaps.

Sound
o Sound effects must be 2 channel wave files.
o Music will be mp3 format, specific bitrate doesn’t really matter.

Mesh Files
o Standard DirectX x files, exported from 3dsMax.
o Objects should be centered at the origin, with the base on the zero-plane.

Custom Formats
Managing Producer: Michael Moore
All content copyright © 2004, DigiPen (USA) Corporation. All rights reserved
- 16 Game: Zombie Farm
Team: Undead Psycho Monkeys
GAM400 Fall 2004
o Map files

Simple text file, generated by hand.

Define the x file for the map’s mesh data.

Has a list of bounding boxes for collision and action boxes.
o Save files

Simple text file.

Will contain all the player’s progress variables:

Farm data, unit data, grave data, livestock data, money,
current items, and quest data.

Also has the world data:

Current time, date, NPC data.
Global Variables

PHOEBOS
o The global PH_Phoebos class, the master class for the entire Phoebos
engine.
o Contains instances of all the most important classes:

PH_Settings

The settings class. Contains all the information needed to
setup Phoebos and the window.

PH_Graphics


The 2d graphics system.
PH_Graphics3d
Managing Producer: Michael Moore
All content copyright © 2004, DigiPen (USA) Corporation. All rights reserved
- 17 Game: Zombie Farm
Team: Undead Psycho Monkeys
GAM400 Fall 2004


PH_SurfaceList


Used for drawing 2d sprites with proper z-ordering.
PH_Controller


The list of surfaces (textures) currently loaded.
PH_DrawList


The 3d graphics system
The input handler class
PH_Camera

The camera class. Used to define the viewport of the scene.
o Most these classes also have their own global defines, much like
PHOEBOS, and can be access either through those variables, or through
the PHOEBOS master class.
Data classes

Phoebos Data classes
o PH_List

The all powerful list class.

As long as the data type is registered in the PH_List file and is
inherited from PH_Base, you can add any type of class to the
PH_List.

The list takes care of allocating new items, so if you want to add a
new item, you ask the list to allocate it for you.
Managing Producer: Michael Moore
All content copyright © 2004, DigiPen (USA) Corporation. All rights reserved
- 18 Game: Zombie Farm
Team: Undead Psycho Monkeys
GAM400 Fall 2004

Takes advantage of a base initializer struct type. All
PH_List compatible types must have an Initialize function
that takes an initializer struct inherited from this base type.
This ensures that the list knows how to properly initialize
any data type.

When the new item has been properly allocated and
initialized the list will pass the user back a pointer to that
new object.
o PH_DataFile

Interface class for standardizing how data files are loaded.

Can load any file filled with initializer structs.

Initializer structs are differentiated using a unique ID given
to each type.

Also has functionality to save initializer files.
Installer

The installer will be created using the program Inno Setup. This program makes it
very easy to quickly produce a full installer/uninstaller. So we don’t have to do
any manual installer coding.

Installer will be completely stand-alone. It will display the standard Digipen
EULA during install, and allow the user the option of where to install, along with
the option for desktop icon, shortcut icon, and start menu shortcuts. The installer
Managing Producer: Michael Moore
All content copyright © 2004, DigiPen (USA) Corporation. All rights reserved
- 19 Game: Zombie Farm
Team: Undead Psycho Monkeys
GAM400 Fall 2004
WILL affect the registry, but it automatically generates an uninstaller for the
program, to allow the user to clean up everything.
Source control

We will be trying out CVS for our source control this year. In past years we’ve
used Microsoft Source Safe, and will probably use it as a fall back if we decide
CVS causes too much trouble.

All source files must be checked in and merged every week, to reduce conflicts.

The entire project must be built at least once a week on school computers in
release mode. In past years we’ve had far too many compatibility issues due to
working exclusively at home. We have to avoid that this year.
Artificial Intelligence
Overview
Zombie Farm’s artificial intelligence is fairly simple. All AI falls into two
categories: Actor AI and Farm AI. Actors will be controlled using finite state machines.
Farm AI is not state-based, and does not require the use of the FSM.
Farm AI
Farm AI is simple. There will be a FarmBrain class which manipulates the semiglobal farm data structures. It will contain the following members:

GraveGrowth :
Managing Producer: Michael Moore
All content copyright © 2004, DigiPen (USA) Corporation. All rights reserved
- 20 Game: Zombie Farm
Team: Undead Psycho Monkeys
GAM400 Fall 2004
o Called at the end of the day.
o Traipses through the graveyard class, updating each grave.
o Empty, dug-up graves will be filled in with dirt and returned to “Ground”
state.
o Counts the number of watered graves.
o Using this value, applies upgrade information and number of lich units to
calculated an evenly distributed grave growth rate, a floating point number
greater than 1.0f.
o Applies the growth rate to all watered graves.

LivestockGrowth
o Called at the beginning of the day.
o Evaluates the number of livestock fed and applies it to the cows first.

Saves the number of cows successfully fed to a member variable.

This value will be used in “GraveWater”.
o If the number of livestock fed is greater than the number of cows, the
remaining feedings will be applied to the sheep:

Advances the growth of the sheep (taking farm upgrades into
account).


For each sheep fed, their growth is advanced one day.

Fully “ripe” sheep cannot be advanced further.
GraveWater
o Called at the beginning of the day, after “LivestockGrowth” is called.
Managing Producer: Michael Moore
All content copyright © 2004, DigiPen (USA) Corporation. All rights reserved
- 21 Game: Zombie Farm
Team: Undead Psycho Monkeys
GAM400 Fall 2004
o Taking into account the number of capable cows (calculated in
“LivestockGrowth”) and the number of Zombie Farmer units, calculates
the number of graves that can be watered by the player’s units:
“GravesToBeWatered”.
o Linearly traipses the graveyard’s grave array, updating a number of graves
equal to “GravesToBeWatered”.

LivestockFeed
o Called at the beginning of the day.
o Taking into account the number of Vampire Shepherd units the player has
on the farm, calculates the number of livestock units to feed.
o Using this number, sets the appropriate number of trough cells to be full.
Finite State Machine
The FSM has two major classes: BState and FSMachine.
-
BState:
o The base class of the state machine.
o All state structures inherit from this class.
o States are dynamically allocated. Then, their members must be set up by
the creating function; which is, typically, in another state.

For example, a state in an FSM associated with an actor would be
dynamically allocated, then its Actor pointer must be set to the
appropriate actor.
o The Initialize function takes no parameters and sets up the state structure.
Managing Producer: Michael Moore
All content copyright © 2004, DigiPen (USA) Corporation. All rights reserved
- 22 Game: Zombie Farm
Team: Undead Psycho Monkeys
GAM400 Fall 2004
o The Update function updates all values for the frame.

For example, a state in an FSM associated with an actor would
update the actor’s position.
o The StateCheck function checks all exit conditions of the state. If an exit
condition is met, an appropriate new state must be created, set up, and
Initialized. Then, this new state is passed as the return value of this
function. The FSM that contains the current state would then destroy the
current state and replace it with the newly created and initialized state.
o All BState-inherited classes must properly clean up after themselves using
their destructors.
-
FSMachine
o The FSM machine is a simple structure containing a pointer to a BState.
o This pointer is polymorphic; it stores the current state of the machine.
o The Update function calls Update on the current state, then calls
StateCheck.

If Null is returned, nothing happens.

If a new state is returned, this state replaces the current state as
described above.
o FSMachine is a base class. You can inherit from this class to make a
custom machine.

For example, it may be necessary to create an FSM class for actors,
which would contain a pointer to the actor the machine is
associated to.
Managing Producer: Michael Moore
All content copyright © 2004, DigiPen (USA) Corporation. All rights reserved
- 23 Game: Zombie Farm
Team: Undead Psycho Monkeys
GAM400 Fall 2004
FSM-Actor Interaction
To resolve dependency issues, the actor class will not be aware of the state classes;
rather, the state classes will be aware of the actor class (meaning, they will include the
actor header file). All actors will be kept track of in a list called the ActorList. Parallel to
this list is a list of FSMachine-inherited classes. The FSMachines will have actors
associated with them; their states will be applied to that actor and that actor alone. There
will be a one-to-one correspondence between an actor and an FSM.
Graphics
2D Graphics Engine

The 2d engine is carried over from our junior year Phoebos engine.

Main Components:
o PH_AnimSurf

The container class for DirectX textures.

Handles animated images. The texture can be split up into frames,
which will be drawn in sequence.

The frame size is defined at initialization. If a frame size of
0 is specified the entire texture is used.
Managing Producer: Michael Moore
All content copyright © 2004, DigiPen (USA) Corporation. All rights reserved
- 24 Game: Zombie Farm
Team: Undead Psycho Monkeys
GAM400 Fall 2004

Animation speed is defined by a frameDelay variable, and
is regulated by a pointer to the main systemClock class if
it’s passed in during creation. Otherwise the sprite will
animate normally, not frame independently.

Each texture generates a unique GUID on creation, which allows
for a texture list to keep track of individual textures, so we never
load the same texture twice (We called this list the surface list in
our previous project).

The AnimSurf class will be what we use for all our textures in the
3d module. The existing surface list will be modified to be a
texture list for easier use. (Though this is mostly a semantic
difference.)
o PH_Graphics

The main 2d graphics module class.

Responsible for setting up and keeping track of the DirectX 9
device and interfaces.

Contains the sprite system class, the ID3DXSprite class that
DirectX uses to draw 2d images.

Note: We no longer need our Sprite class to handle
animated sprites, as we’ll be working primarily with
AnimSurfs to handle simple 2d images. So the sprite class
will most likely go unused in this project.

UI Objects:
Managing Producer: Michael Moore
All content copyright © 2004, DigiPen (USA) Corporation. All rights reserved
- 25 Game: Zombie Farm
Team: Undead Psycho Monkeys
GAM400 Fall 2004
o All the UI classes are carried over from our junior year project. These are
the only classes and files that break the naming scheme, as they are all
prefixed with “ST_”.
o ST_UIBase

The base UI object. All other object inherits from this class.
o ST_UIButton

The button object.

Contains a list of images, each representing a separate button state.
o ST_UIDialog

The dialog window.

Displays a basic window, with a portrait image in the upper left
hand corner, and text displayed in the main portion.

Most likely we won’t be using this class for this project.
o ST_UIFillbar

The fill bar object.

Displays a background image, and scales a bar image over top
depending on a value range.

Used for slider bars, health bars, etc..
o ST_UIInput

The input field.

Displays a field and allows the user to enter text.
Managing Producer: Michael Moore
All content copyright © 2004, DigiPen (USA) Corporation. All rights reserved
- 26 Game: Zombie Farm
Team: Undead Psycho Monkeys
GAM400 Fall 2004

Control is designed for a controller, so it doesn’t accept keyboard
input. Left/Right moves the cursor along the word, and up and
down selects the next/previous letter in the alphabet.
o ST_UIMenu

The menu class.

Contains a list of buttons, each with 2 states. One highlight image
displayed when the selection is active, and a default state.
o ST_UIText

The text class.

Uses a custom bitmap font to display text.
o ST_UIWindow

The window class.

Displays a window made up of 9 tiles. The corner tiles are static,
and the border and interior tiles are stretched to fit the window.
o ST_UISystem

The UI handler class.

Keeps a list of generic UI objects, and can manipulate all the
objects.

Used to control input focus between UI objects, along with draw
order.
3D Graphics Engine

The new 3d component to the Phoebos engine.
Managing Producer: Michael Moore
All content copyright © 2004, DigiPen (USA) Corporation. All rights reserved
- 27 Game: Zombie Farm
Team: Undead Psycho Monkeys
GAM400 Fall 2004

Utilizes several existing 2d base classes like the AnimSurf.

Main Components:
o PH_Mesh3D

The 3d mesh class. Built off the D3DXMesh class.

Loads meshes from x files.

Only draws static meshes. Doesn’t handle any animation.

Has functionality to scale, translate, and rotate.
o PH_AnimMesh3D

The 3d animated mesh class. Uses a series of base classes to load
and store the animated mesh:

D3DXFRAME_DERIVED, derived from the DirectX class
D3DXFRAME. Keeps track of the bone data for a frame of
animation.

D3DXMESHCONTAINER_DERIVED, derived from the
DirectX class D3DMESHCONTAINER. Keeps track of the
mesh data.

CAllocateHierarchy, derived from the DirectX class
ID3DXAllocateHierarchy. This class handles loading and
storing all the animation and mesh data.

The AnimMesh3D has functionality to scale, translate, and rotate,
just like the Mesh3D. But also has controls for handling the
animation speed, and switching between animation sets.

Supports both animated and static meshes loaded from X files.
Managing Producer: Michael Moore
All content copyright © 2004, DigiPen (USA) Corporation. All rights reserved
- 28 Game: Zombie Farm
Team: Undead Psycho Monkeys
GAM400 Fall 2004
o PH_Camera3D

The 3d camera class.

Defines the view for the scene.

Contained in the PH_3DGraphics class.

Has functionality for setting the camera properties and orientation.
But doesn’t have any collision, as the game is in a fixed angle view
the entire time.
o PH_Emitter

The particle emitter class.

Dynamically allocates particles to generate the particular effect.

Keeps a list of PH_Particle3D types.

Has functionality to define the emitter effect, and to set the
position and orientation of the emitter.
o PH_Particle3D

The 3d particle class.

Implemented using DirectX point sprites along with various render
states to get the desired effects.

Keeps track of their own position and physics. Initial position
however is determined by the Emitter class that generates the
particle.
o PH_3DGraphics

The main 3d graphics module class.
Managing Producer: Michael Moore
All content copyright © 2004, DigiPen (USA) Corporation. All rights reserved
- 29 Game: Zombie Farm
Team: Undead Psycho Monkeys
GAM400 Fall 2004

This class will have to hook into the 2d graphics class to get access
to the DirectX device pointer.

Will contain a texture list class (built off the PH_List class) to keep
track of unique textures.

If a mesh tries to load a texture already in the texture list, it
will just be passed a reference to that texture (or AnimSurf
in this case).

A list of ZF_Mesh3D objects (3d meshes) can be used to keep
track of all the objects in the scene. Certain optimizations can be
made using a list like this to cull away entire objects before the
render process even starts.

This class will also contain the particle handler, which will keep
track of all emitters and subsequently all particles in the scene.
Audio
Sound Effects

Sound effects will be handled by our DirectSound wrapper.

Sound effects will all be in standard 2 channel wav format.
Music

Background music will all be in mp3 format. We’ll be writing a DirectShow
wrapper to facilitate the mp3 playback.
Managing Producer: Michael Moore
All content copyright © 2004, DigiPen (USA) Corporation. All rights reserved
- 30 Game: Zombie Farm
Team: Undead Psycho Monkeys
GAM400 Fall 2004

If we don’t have the time to write our own music, and can’t find suitable music
from the school media library, we will add in an in-game music player so the user
can play mp3s from their hard drive.
Input
Keyboard

The keyboard input will all be handled by our DirectInput wrapper.

PH_Controller
o Server as the master input class. Handles setting up and monitoring input
from the keyboard and gamepad.
o This class maps input to both the keyboard and the gamepad into a single
interface.
o When the class is initialized it checks the Phoebos PH_Settings class for
the keymap, which is read in from the initialization file.
o This class contains the actual DirectInput device handle, which is then
passed to the keyboard and gamepad classes to initialize them.

PH_Keyboard
o The keyboard interface class.
o Uses the DirectInput device from the PH_Controller class to set up the
DirectInput keyboard object.
o The class only recognizes a list of 48 valid keys, predefined in the cpp file.
Managing Producer: Michael Moore
All content copyright © 2004, DigiPen (USA) Corporation. All rights reserved
- 31 Game: Zombie Farm
Team: Undead Psycho Monkeys
GAM400 Fall 2004
Gamepad

PH_Gamepad
o The gamepad interface class.
o Uses the DirectInput device from the PH_Controller class to set up the
DirectInput gamepad device.
o Currently only supports 14 button gamepads, but we will be expanding it
to support analog controllers, and possibly more buttons.
Mouse

Mouse input will be handled using basic windows messages.

The messages will be passed down to the mouse controller class.

PH_Mouse
o The mouse interface class.
o Uses standard windows messages to handle mouse input.
o Handles standard 3 button mice, along with scroll wheel input.
Internal Tools
We aren’t planning on having to develop any internal tools. All the environments
will be created in 3dsMax. Collision boxes will be stored in a separate data file and will
be generated manually by referencing from 3dsMax’s coordinates. Due to the small
number of environments we have, we don’t see any need to waste development time on
producing a tool to automate this process, when it can be done simply enough by hand.
Managing Producer: Michael Moore
All content copyright © 2004, DigiPen (USA) Corporation. All rights reserved
- 32 Game: Zombie Farm
Team: Undead Psycho Monkeys
GAM400 Fall 2004
All other data files will also be generated by hand, as we don’t plan on using many
external data files at all.
Timeline
(See seperate Project Timeline)
Milestone schedule

Week 4 – Milestone 1: Completion of GDD.

Week 6 – Milestone 2: Completion of TDD
o 3D graphics engine in place
o base code complete

Week 8 – Milestone 3:
o Player control complete
o Physics module complete
o Basic NPC AI in place
o World modules complete

Week 10 – Milestone 4: Code Review:
o Audio complete
o AI half complete
o In game UI complete

Week 14 – Milestone: Prototype Demo
Managing Producer: Michael Moore
All content copyright © 2004, DigiPen (USA) Corporation. All rights reserved
- 33 Game: Zombie Farm
Team: Undead Psycho Monkeys
GAM400 Fall 2004
o Half of the mission done
o Player actions in place
o AI 80% done

(Second Semester)

Week 6 – Milestone: Pre-Alpha
o AI 100% Complete
o Shell Menus 75% Complete

Week 9 – Milestone: Alpha
o Shell Menus 100% complete
o All game features completes
o Hardcore testing begins

Week 12 – Milestone: Beta
o All NPC quests complete
o Hardcore testing continues

Week 14 – Milestone: Gold Master
Managing Producer: Michael Moore
All content copyright © 2004, DigiPen (USA) Corporation. All rights reserved