Make your own free website on Tripod.com

Jonathan Kim

Jason Mooradian

Andrew J. Santa Maria

Warren Seranio

Design Document

Overview

In our game --------, the player must struggle to survive a never ending zombie onslaught. The premise of the story is that the player is one of M.O.O.N. (Mobile Overt Operations Network) unit’s soldiers who was separated from his squad and is forced to barricade himself inside of a mansion in Badger City. Due to a mixture of nuclear and chemical experiments done by the Parasol Company near the city and the discovery and accidental release of a previously unknown strain of the influenza virus, the S-Virus, the citizens of Badger City has been turned into zombies. To make things worse, the army government and the Parasol Company has sent in a team of mercenaries and soldiers, the M.O.O.N. unit to dispatch and get rid of all evidence i.e. survivors. Since the player’s character was separated from his squad and no one is able to account for all of his actions and determine for sure whether the player is infected or not, he is also a target to be eliminated. As a result zombies and occasionally M.O.O.N. soldiers will charge into the mansion and try to break into it in order to eat or splatter the player’s brain respectively.

The player’s sole job is to survive by using various weapons and using traps the player sets inside of the mansion. The zombies assault the room for three minutes every round. In between rounds there is a rest period of at most 30 seconds where the player buys necessary equipment such as ammunition, weapons, traps, and food/med kits. As the player survives more rounds the number of zombies that assault the house will increase until eventually the player is killed. Traps are set between rounds via a grid based system and they vary in area of effect, power, number of uses, and cool down or reactivation times. The player will move using the arrow or wasd keys and fire or use weapons primary and secondary functions with the spacebar and shift keys respectively. The activation on traps will vary by trap with some such as mines activating on impact, trapdoors activating via a button press on an assigned number key, or bombs activating after a timer. Health and weapons are refilled between rounds through “internet” transactions. Money that needs to be used for transaction is collected by killing zombies with each zombie dropping a random amount of money in its wallet before it is killed. Zombies can also drop articles of food which can restore a little bit of health. Note that this game is an intentionally unbeatable game like Tetris and Space Invaders and the goal of the player is nothing more than to see how long he can last before he is eaten or killed.

The entire game is played from a top down perspective similar to the style used by the old Nintendo Legend of Zelda games or the Pokemon games. The art style on a whole is reminiscent of Pokemon with characters possessing slightly enlarged craniums. The game is also going to feature a ridiculous amount of blood and gore to satirize the survival horror genre of video games. The copious amount of blood, gore, and the over the top violence will also offset the otherwise cutesy cartoon-esque look of the game giving it an interesting look and style overall. In the audio department the game will feature the standard zombie moaning, bone crunching, bullet firing, chainsaw revving, flesh hacking, and profanity spouting sound effects that are common for this genre. The music will also feature a cheesy soundtrack to emphasize the satirical nature of this game.

Game Specifications

Rules and Mechanics


Artwork/User Interface


Gameplay and Balance


Music and Sound


Background Story


Characters


Levels


Scripts


Cut Scenes



Artificial Intelligence

Technical Specifications 

Our game will be written in Java using the Eclipse environment for easy, organized development.  Additionally, the game will not only be utilizing several provided data structures in the Java library, but Dan Frost's ucigame for displaying the graphics and controlling the entities.  Utilizing the Java library and ucigame, I am basically writing the game from scratch.  Since this game is written in Java, it should be able to execute on all systems which can compile and run Java.  There isn't anything attached to the underlying engine which doesn't make it cross-compatible.  Additionally, thanks to Google's 2+ gigabytes of disk space for email, recent updates of the code will be kept in my email.
While Sprite is a great class for display digital entities, there was still more I needed to expand upon.  Since the ucigame source is closed, I had no real way of extending it so I had to make a new class which encapsulated it.  For the record, the MR prefix stands for our group name: Minority Report.
private abstract class MRSprite
{
   
protected Sprite data;
   
protected boolean mVisible;

   
public MRSprite(Sprite spr) { ... }

   
public Sprite getData() { ... }
   
   
public void setVisible(boolean visible) { ...}
   
public boolean isVisible() { ... }
}

In addition to the given sprite data, as of now, the entities will also have a boolean declaring their visibility, this will help out the SceneManager described next.  Since there are several types of sprites such as ones representing characters and items, object oriented programming is essential. 

private class CharacterSprite extends MRSprite
{
   
...

   
private float mHealth;

   
public void setHealth(float health) { ... }
    public float getHealth() { ... }

}

The character sprite obviously needs a new floating point variable which represents its health.

private class ItemSprite extends MRSprite
{
   
...

   
private long mLivingTime;
    private long creationTime;

   
public void setLivingTime(long time) { ... }
   
public long getLivingTime() { ... }
}

Items such as traps and grenades aren't forever.  They need to know when to disappear, explode, and/or what not.

With visual display being a primary element of any videogame, I'm going to pay special attention to the manipulation of graphics.  The game features our protagonist fighting against endless hordes of zombies.  The only way he can hope to survive is if he utilizes his items, weapons, and skill.  Of course, with so many things sprites on screen, managing them is essential.

 

// code thus far

private class SceneManager

{

    private HashMap<String, MRSprite> mSprites;

    private HashMap<String, Image> mImages;   

 

    public SpriteManager() { ... }

 

    public Image addImage(String name, String filename) { ... }

    public Image getimage(String name) { ... }

    public void removeImage(String name) { ... }   

 

    public CharacterSprite addCharacterSprite(String name, Image img) { ... }

    public CharacterSprite addCharacterSprite(String name, Image img, int shade) { ... }

    public CharacterSprite addCharacterSprite(String name, Image img, int red, int green, int blue) { ... }
   
public ItemSprite addItemSprite(String name, Image img) { ... }

    public ItemSprite addItemSprite(String name, Image img, int shade) { ... }

    public ItemSprite addItemSprite(String name, Image img, int red, int green, int blue) { ... }

    public Sprite getSprite(String name) { ... }

    public void removeSprite(String name) { ... }

 

    public void renderScene() { ... }

}

 

The SceneManager is a major class for this game.  Instead of making several unorganized calls to getImage() and makeSprite(), the SceneManager takes care of those calls.  The SceneManager especially utilizes Java's HashMap.

public Image addImage(String name, String filename, int red, int green, int blue)
{
   
Image img = getImage(filename, red, green, blue);
   
if (img != null)
       
mImages.put(name, img);
   
return img;
}

public CharacterSprite addCharacterSprite(String name, int width, int height)
{
   
Sprite spr = makeSprite(width, height);
   
if (spr != null)
       
mSprites.put(name, new CharacterSprite(spr));
   
return mSprites.get(name);
}

In looking for the right data structure to organize allocated Sprites and Images, I needed quick, immediate, and especially, recognizable access.  Map's proved to be the right structure.  The keys for these maps are Strings; thus, the SceneManager can tie a given String to each Sprite or Image.  This way, if I gave a sprite the name "name0," I can retrieve that specific sprite using getSprite("name0") without needing to memorize some traditional number index.  addImage() and addSprite() are just like their counterparts getImage() and makeSprite(), except they call those functions and require a String as a key.  renderScene() does exactly what it does; the function will allocate through the HashMap of Sprites and render each one for the scene. 

public void renderScene()
{
   
Iterator<MRSprite> i = mSprites.values().iterator();
   
while (i.hasNext())
    {
       MRSprite spr = i.next();
       if (spr.isVisible())
           spr.getData().draw();
    }
}


Instead of calling draw() on each Sprite myself, SceneManager does everything for me.

 

private class Vec2

{

    public float x;

    public float y;

 

    public Vec2() { ... }

    public Vec2(float x, float y) { ... }

    public Vec2(Vec2 rhs) { ... }

 

    public Vec2 add(float x, float y) { ... }

    public Vec2 add(Vec2 v) { ... }

    public Vec2 sub(float x, float y) { ... }

    public Vec2 sub(Vec2 v) { ... }

    public Vec2 mult(float x, float y) { ... }

    public Vec2 mult(Vec2 v) { ... }

    public Vec2 div(float x, float y) { ... }

    public Vec2 div(Vec2 v) { ... }


    public Vec2 normalize() { ... }
    public float length() { ... }
    public float distance(Vec2 v) { ... }

}

 

Much like any two-dimensional game, entities require some kind of euclidean coordinates.  Vec2 provides a general purpose representation for position, direction, and magnitude.  Vec2 can be arithmetically combined with other Vec2's thanks to its member funtions.  The x and y variables are public for immediate access to the fields rather than implementing get()/set() functions.  Of course, Linear Algebra comes into play when programming these 2D vectors.
float length()
{
    return (float)Math.sqrt(x * x + y * y + z * z);
}

Vec2 normalize()
{
    float invSqrt = 1.0f / length();
    return new Vec2(x * invSqrt, y * invSqrt);
}

I'll definitely need to do much vector normalizing when it comes to calculation directions.  And of course, there is no way for me to do that without calculating its length/magnitude.  Picking up tips on game development forums, I've learned that divisions require more computation than multiplications.  For that reason, I calculate the reciprocal for the length and simply multiply it to the elements of the vector.  As of now, this is one of the many optimizations for the game.  Since this fast paced game depends on skill, optimization is essential to providing a speedy game experience.

As for the actual game, zombies and M.O.O.N. Soldiers both possess a common goal: to destroy the player. The zombies, of course, are relatively dumb. All they really want is the player for sustenance.


Vec2 direction = new Vec2(player1.getData().x, player1.getData().y).sub(new Vec2(zombie.getData().x, zombie.getData().y)).normalize();

zombie.motion(direction.x * velocity, direction.y * velocity);


With this code, the zombie ghoulishly walks toward our hero.  M.O.O.N. soldiers use much the same algorithm but move even faster.  Since the soldiers are armed with weapons as well, they don't really need to get so close to the player anyway.  They'll probably keep their distance.

public float distance(Vec2 v)

{

    Vec2 dir = v.sub(this);

    return (float)Math.abs(dir.length());

}


Schedule and Personnel












Week

Jonathan Kim

Jason Mooradian

Andrew J. Santa Maria

Warren Seranio

1

Think of game idea

Think of game idea

Think of game idea

Think of game idea

2

Agree upon game idea

Agree upon game idea

Agree upon game idea

Agree upon game idea

3

Expand upon ideas



Write up outline

4


Start creation of sound/music

Start coding major data structures

Start creation of graphics content

5

Write up Game Specifications for the Game Document


Write up Technical Specifications for the Game Document


6


Finish character sound effects

Fully implement enemy AI

Finish enemy graphics

7


Finish item sound effects

Fully implement items

Finish item graphics

8

Testing

Testing

Finish an alpha for testing

Testing

9

Possibly more testing

Possibly more testing

Finish prototype for demonstration

Possibly more testing

10

Any last minute polish

Any last minute polish

Any last minute polish

Any last minute polish