C++
CSCI 111 – Programming and Algorithms I
Project Documentation
Zombie Attack!
CSCI 111 – Programming & Algorithms I, Project 6 - Zombie Attack! (11/2014)
Introduction Saberware’s newest game title, “Zombie Attack!”, is in pre-production. The design team has outlined the mechanics of a proposed combat system for the game. This document describes the technical specifications for the proposed combat system.
Game Object Specifications The proposed combat system is designed around interactions between three (3) separate game components: Weapons, People, and Zombies. The following specifications outline the characteristics of each component.
Weapon Specifications Each weapon in the game has the following characteristics:
Type – There are a variety of weapon types such as knives, guns, machetes, etc. Strength Required – Each weapon requires a certain amount of strength in order to be
wielded by a person. Damage Bonus – Once equipped by a person, the damage bonus is added to the hand
strength when used in combat. Uses remaining – Each weapon can only be used a limited number of times. Once this
number has been met, the weapon will no longer offer a damage bonus during combat.
Person Specifications Each person in the game has the following characteristics:
Name – Each person has a name. Evasion Skill – This characteristic is used to determine the likelihood of the person being bit by a
zombie during combat. Left Hand Strength – The strength of the person’s left hand. This characteristic is used for
attacking zombies and wielding weapons. Right Hand Strength – The strength of the person’s right hand. This characteristic is used for
attacking zombies and wielding weapons.
CSCI 111 – Programming & Algorithms I, Project 6 - Zombie Attack! (11/2014)
Zombie Specifications Each zombie in the game has the following characteristics:
Former Name – Some zombies have former names from before they were zombies (i.e. People in the game become zombies if they are bitten).
Health – The health is the amount of damage the zombie can sustain before being destroyed. Each zombie starts with a random health level between 1 and the number provided for health. For example, to create a zombie with a health value between 1 and 30. Provide 30 for the zombie's health when creating it.
Max Attack – During combat, a zombie generates a random attack number. A different number is generated each round. The number generated is between 1 and the Max Attack value provided when the zombie is created.
Pre-Combat: Equipping People with Weapons Before combat begins, weapons are assigned to the people. The following list outlines the rules for equipping weapons:
1. Only people can use weapons, zombies cannot. 2. Prior to combat, each person may be assigned up to two weapons.
3. Each weapon can be assigned to a person’s left or right hand, or to both hands if a weapon requires the combined strength of two hands.
4. To assign a weapon to a person, try one hand first, then the other, then both. a. The person’s hand must not already be holding a weapon. b. The strength value of the person’s hand must be greater than or equal to the weapon’s
strength required value. 5. For a person to hold a weapon with both hands, the following must be true:
a. Neither of the person’s hands may be holding a weapon. b. The sum of each hand’s strength value must be greater than or equal to the weapon’s
strength required value.
CSCI 111 – Programming & Algorithms I, Project 6 - Zombie Attack! (11/2014)
Combat Order-of-Operations The proposed combat system is premised on the idea of a horde of zombies attacking a group of people. To begin combat, the first zombie in the horde will attack the first person in the group. These two will fight until either the zombie is killed or the person is bitten and becomes a zombie. The process repeasts with the next person and next zombie. Combat continues until only zombies or people remain.
1. Display information about the zombie and player about to engage in combat.
3.
The person attacks the zombie. The zombie loses health equivalent to the sum of the left and right hand strengths plus the damage bonus of any held weapons.
The zombie attacks the person. Generates a random attack value between 1 and the zombie's Max Attack. If the attack value is greater than the person's evasion skill, the player is bitten and joins the horde of zombies.
2.