software engineering tower defense

1
Software Engineering Tower Defense Requirements: Test Cases: The objective of this project is to employ software engineering techniques from the classroom to build a quality tower defense game in a real life setting. The project follows the software life cycle, specifically the spiral paradigm, to gather requirements, design a viable solution, code into usable software, and mitigate errors through standardized test practices. Through this process, a game was created that has been built to customer requirements and software engineering standards. Programming: Planning: Design Diagrams: Screen Shots: Emily Doll, Charles Kruzan, Brandon Kick, Benjamin Gilles, Derek Hall Computer Science a. Tow ers 1. The tow er sizesare asfollow s: Tow er type Size C ost Basic 1x1 250 verm eerium Freeze 1x1 300 verm eerium Fire 1x1 300 verm eerium M ortar 1x1 400 verm eerium Pulse 1x1 500 verm eerium 1. D escriptions:There w illnow be nam esassociated w ith allofthe tow ersin the interface: a) Basic tow er: (1) G A U -81A “A venger” (2) 30m m Hydraulically-Driven Seven-Barreled G atling-Type Rotary Cannon (basic gun tow er) b) Fire tow er (1) H PN C-61 “D ragon’sBreath” (2) H igh Pressure Napalm Cannon (once placed, it w illfire a steady stream offire in one direction the playerm ay choose,radiusw illbe a cone shape in the direction the playerplaced the tow er) c) Freeze Tow er (1) LN CC “Ice Box” (2) Liquid N itrogen Cryogenic Cannon (hits everything in itsradius.Firesevery second regardlessofw hetherthere isan enem y w ithin its radius) d) M ortar Tow er (1) LRH O D S-27 “H otRod” (2) Long Range H eavy O rdinance D elivery System (very high pow er,slow firing, single shottow er) e) Pulse Tow er (1) EM PCS “Sparky” (1) Electrom agnetic Pulse Charging Station (hits everything in the radius. Firesevery five seconds regardlessofw hetherthere isan enem y w ithin its radius) 2. These are the statisticsfor each tow er, including type, dam age,range, fire rate, cost, and the effectto enem ies. Tow er Type D am age R ate of Fire Effecton Enem ies R ange (R adius) C ost Basic 10 2 shots/sec N/A 3x3 250 Verm eerium Freeze 5 1 shots/sec Slow s25% 3x3 300 Verm eerium Fire 10 2 shots/sec 2 Dam age/sec every 5 sec 3x1 300 Verm eerium M ortar 40 1 shot/3 sec n/a 6x6 400 Verm eerium Pulse 100 1 shot/5 sec n/a 3x3 500 Verm eerium 3. U pgrades U pgrade # C hange C ost 1 (1 st Tree) 25% Increase in D am age from base 25% Tow er Purchase Price 2 (1 st Tree) 50% Increase in D am age from base 50% Tow er Purchase Price 3 (1 st Tree) 100% Increase in D am age from base 100% Tow er Purchase Price 1 (2 nd Tree) +1 U nitofRadius* 25% Tow er Purchase Price 2 (2 nd Tree) +1 U nitofRadius* 50% Tow er Purchase Price 3 (2 nd Tree) +1 U nitofRadius* 100% Tow er Purchase *Thism eans+1 U nitofRadiusfrom the centerofthe tow er 4. Tow er info panel– w hen a tow er iseither hovered over in the store or clicked after itisplaced itw illdisplay the tow er info panelw hich includes: a) Tow er nam e b) Tow er dam age c)Tow er rate offire d) Tow er currentsellprice e)Tow er upgrade radiusbutton (button w illinclude price ofupgrade and currentupgrade rank f)Tow er upgrade dam age button(button w illinclude price ofupgrade and currentupgrade rank) g) Tow er sellbutton h) Tow er avatar Item T ested Pass F ail Comments A . Basic Tow er 1)Basic Tow erattacks allenem ies *towerm ightnotbe able to hitallenem ies. Thisisintended. 2)Basic Tow erdoes correctdam age (10 dam age) 3)Basic Tow erradiusis 3x3 4)Basic Tow ershave correctfire rate (2 shots/sec) 5)Basic Tow ersstop firing w hen enem ies leave radius 6)Basic Tow ergraphic iscorrect 7)Basic Tow ernam e, dam age, radius, fire rate, upgrade button, sellbutton, and graphic are displayed in info pane w hen the tow eris clicked 8)Basic Tow ershow s radiusw hen clicked 9)Basic Tow ersare correctsize (1x1) 10)Basic Tow erscost 250 V erm eerium 11)O nly attacks1 enem y ata tim e B. Freeze Tow er B. Freeze Tow er 1)Freeze Tow erattacks allenem ies *towerm ightnotbe able to hitallenem ies. Thisisintended. 2)Freeze Tow erdoes correctdam age to all enem ies(5) *Enem y resistance could reduce the am ountofdam age enem y receives 3)Freeze Tow erradius is3x3 4)Freeze Tow ershave correctfire rate (1 shots/sec) 5)Freeze Tow ersattack continuously *Tow erw illfire even w hen no applicable enem iesare in range 6)Freeze Tow er graphic iscorrect 7)Freeze Tow ernam e, dam age, radius, fire rate,upgrade button, sellbutton and graphic are displayed in info pane w hen the tow eris clicked 8)Freeze Tow ershow s radiusw hen clicked 9)Freeze Tow ersare correctsize (1x1) 10)Freeze Tow erscost 300 V erm eerium 11)Freeze Tow ers attack and slow all enem iesw ithin its radius(5 dam age,25% slow effect) C . Flam e Tow er 1)Fire Tow erattacksall enem ies *towerm ightnotbe able to hitallenem ies. Thisisintended. 2)Fire Tow erdoes correctdam age to all enem ies(10) *Enem y resistance could reduce the am ountofdam age enem y receives 3)Fire Tow erradiusis 3x1 4)Fire Tow ershave correctfire rate (2 shots/sec) 5)Fire Tow ersstop firing w hen enem ies leave radius 6)Fire Tow ergraphic is M onsterLifecycle Activity Diagram Begin round M onsterhasnotarrived atthe base M onsterhasarrived atthe base M onstertravelsset path M onstertravelsto base Tow er/Spell attacks/affects M onster Player’slivesare reduced M onster’shealth is reduced OR is affected byspell M onsteris rem oved from the m ap M onsterisnotin a tow er’sorspell’s radius M onsterisin a tow er’sorspell’s radius M onsterhealth isnotzero M onsterhealth is zero Playerearns Vermeerium EnterMonster *Same process is used for bosses +Cost(): int +Dam age(): int +Radius(): float +Target: Enem y() +Tow erType(): string +Tow erID(): int +UpgradeNum ber(): int +Texture : Texture2D() +BulletTexture : Texture2D() +Tow erShot: SoundEffect() +Tow er:Constructor() +HasTarget(): bool +FaceTarget() +IsInRange(Vector2)(): bool +GetClosestEnemy(List<enem y>)() +Update(Gam eTime)() +Draw (SpriteBatch)() #tow erType : string #cost: int #radius: float #tow erID : int #dam ageUpgradeNum ber: int #radiusUpgradeNum ber: int #target: Enem y #bulletTim er: float #bulletTexture : Texture2D #bulletList: List<bullet> #tow ershot: SoundEffect Tow er.cs Detailed Descriptions Variables: tow erType – the tow er’stype cost– the price ofbuilding thistow er dam age – the dam age thistow erdoes radius– circularradiusin w hich the tow ercan dam age enem ies tow erID – A unique ID forevery tow erthat’splaced dam ageUpgradeNum ber– the level thatthe dam age hasbeen upgraded to radiusUpgradeNum ber– the level thatthe radiushasbeen upgraded to target– the enem y thatthe tow eristargeting bulletTim er– how long ago the bulletw asfired buleltTexture – thistow er’sbullet’stexture bulletList– Bulletsthatthistow erhas tow erShot– Sound effectofthe tow errshooting Gettersand Setters: Cost– getterforcost Dam age – Getter/Setterfordam age Radius– Getter/Setterforradius Target– Getterfortarget Tow erType – getterfortow erType Tow erID – getterfortow erID Dam ageUpgradeNum ber– getter/setterfordam ageUpgradeNum ber RadiusUpgradeNum ber– getter/setterforradiusUpgradeNum ber Texture – getterfortexture BulletTexture – getterforbulletTexture Tow erShot– getterfortow erShot Constructors: Tow er– (texture, bulletTexture, position, tow erType, tow erID, tow erShot) M ethods: HasTarget– checksifthe tow erhasa target FaceTarget– rotate the tow erto face the Enem y IsInRange – Checksan enem y position, returnstrue ifitisin range GetClosestEnem y– Getsthe enem y w hose position isclosestto the tow er Update – Updatesthe tow er Draw – draw sthe tow erand bulletsto the screen Parentofall Towers

Upload: ursa-griffith

Post on 30-Dec-2015

28 views

Category:

Documents


3 download

DESCRIPTION

Software Engineering Tower Defense. Emily Doll, Charles Kruzan , Brandon Kick, Benjamin Gilles, Derek Hall Computer Science. Programming:. Planning:. Design Diagrams:. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Software Engineering Tower Defense

Software Engineering Tower Defense

a. Towers

1. The tower sizes are as follows:

Tower type Size Cost Basic 1x1 250 vermeerium

Freeze 1x1 300 vermeerium Fire 1x1 300 vermeerium

Mortar 1x1 400 vermeerium Pulse 1x1 500 vermeerium

1. Descriptions: There will now be names associated with all of the towers in the interface:

a) Basic tower:

(1) GAU-81A “Avenger”

(2) 30mm Hydraulically-Driven Seven-Barreled Gatling-Type Rotary Cannon (basic gun tower)

b) Fire tower

(1) HPNC-61 “Dragon’s Breath”

(2) High Pressure Napalm Cannon (once placed, it will fire a steady stream of fire in one direction the player may choose, radius will be a cone shape in the direction the player placed the tower)

c) Freeze Tower

(1) LNCC “Ice Box”

(2) Liquid Nitrogen Cryogenic Cannon (hits everything in its radius. Fires every second regardless of whether there is an enemy within its radius)

d) Mortar Tower

(1) LRHODS-27 “Hot Rod”

(2) Long Range Heavy Ordinance Delivery System (very high power, slow firing, single shot tower)

e) Pulse Tower

(1) EMPCS “Sparky”

(1) Electromagnetic Pulse Charging Station (hits everything in the radius. Fires every five seconds regardless of whether there is an enemy within its radius)

2. These are the statistics for each tower, including type, damage, range, fire rate, cost, and the effect to enemies.

Tower Type

Damage Rate of

Fire Effect on Enemies

Range (Radius)

Cost

Basic 10 2

shots/sec N/A 3x3

250 Vermeerium

Freeze 5 1

shots/sec Slows 25% 3x3

300 Vermeerium

Fire 10 2

shots/sec

2 Damage/sec every 5 sec

3x1 300

Vermeerium

Mortar 40 1 shot/3

sec n/a 6x6

400 Vermeerium

Pulse 100 1 shot/ 5

sec n/a

3x3

500 Vermeerium

3. Upgrades Upgrade # Change Cost 1 (1st Tree) 25% Increase in

Damage from base 25% Tower

Purchase Price 2 (1st Tree) 50% Increase in

Damage from base 50% Tower

Purchase Price 3 (1st Tree) 100% Increase in

Damage from base 100% Tower

Purchase Price 1 (2nd Tree) +1 Unit of Radius* 25% Tower

Purchase Price 2 (2nd Tree) +1 Unit of Radius* 50% Tower

Purchase Price 3 (2nd Tree) +1 Unit of Radius* 100% Tower

Purchase

*This means +1 Unit of Radius from the center of the tower

4. Tower info panel – when a tower is either hovered over in the store or clicked after it is placed it will display the tower info panel which includes: a) Tower name b) Tower damage c) Tower rate of fire d) Tower current sell price e) Tower upgrade radius button (button will include

price of upgrade and current upgrade rank f) Tower upgrade damage button(button will include

price of upgrade and current upgrade rank) g) Tower sell button h) Tower avatar

Requirements:

Item Tested Pass Fail Comments A. Basic Tower

1) Basic Tower attacks all enemies

*tower might not be able to hit all enemies. This is intended.

2) Basic Tower does correct damage (10 damage)

3) Basic Tower radius is 3x3

4) Basic Towers have correct fire rate (2 shots/sec)

5) Basic Towers stop firing when enemies leave radius

6) Basic Tower graphic is correct 7) Basic Tower name, damage, radius, fire rate, upgrade button, sell button, and graphic are displayed in info pane when the tower is clicked 8) Basic Tower shows radius when clicked 9) Basic Towers are correct size (1x1) 10) Basic Towers cost 250 Vermeerium 11) Only attacks 1 enemy at a time

B. Freeze Tower

B. Freeze Tower 1) Freeze Tower attacks all enemies

*tower might not be able to hit all enemies. This is intended.

2) Freeze Tower does correct damage to all enemies (5)

*Enemy resistance could reduce the amount of damage enemy receives

3) Freeze Tower radius is 3x3

4) Freeze Towers have correct fire rate (1 shots/sec)

5) Freeze Towers attack continuously

*Tower will fire even when no applicable enemies are in range

6) Freeze Tower graphic is correct

7) Freeze Tower name, damage, radius, fire rate, upgrade button, sell button and graphic are displayed in info pane when the tower is clicked

8) Freeze Tower shows radius when clicked

9) Freeze Towers are correct size (1x1)

10) Freeze Towers cost 300 Vermeerium

11) Freeze Towers attack and slow all enemies within its radius (5 damage, 25% slow effect)

C. Flame Tower 1) Fire Tower attacks all enemies

*tower might not be able to hit all enemies. This is intended.

2) Fire Tower does correct damage to all enemies (10)

*Enemy resistance could reduce the amount of damage enemy receives

3) Fire Tower radius is 3x1

4) Fire Towers have correct fire rate (2 shots/sec)

5) Fire Towers stop firing when enemies leave radius

6) Fire Tower graphic is

Test Cases:

The objective of this project is to employ software engineering techniques from the classroom to build a quality tower defense game in a real life setting. The project follows the software life cycle, specifically the spiral paradigm, to gather requirements, design a viable solution, code into usable software, and mitigate errors through standardized test practices. Through this process, a game was created that has been built to customer requirements and software engineering standards.

Programming:Monster Lifecycle Activity Diagram

Begin roundBegin round

Monster has not arrived at the base Monster has arrived at the base

Monster travels set path

Monster travels set path

Monster travels to base

Monster travels to base

Tower/Spell attacks/affects

Monster

Tower/Spell attacks/affects

Monster

Player’s lives are reduced

Player’s lives are reduced

Monster’s health is reduced OR is

affected by spell

Monster’s health is reduced OR is

affected by spell

Monster is removed from the

map

Monster is removed from the

map

Monster is not in a tower’s or spell’s

radiusMonster is in a tower’s or spell’s

radius

Monster health is not zeroMonster health is zero

Player earns VermeeriumPlayer earns Vermeerium

Enter MonsterEnter Monster

*Same process is used for bosses

+Cost() : int+Damage() : int+Radius() : float+Target : Enemy()+TowerType() : string+TowerID() : int+UpgradeNumber() : int+Texture : Texture2D()+BulletTexture : Texture2D()+TowerShot : SoundEffect()+Tower:Constructor()+HasTarget() : bool+FaceTarget()+IsInRange(Vector2)() : bool+GetClosestEnemy(List<enemy>)()+Update(GameTime)()+Draw(SpriteBatch)()

#towerType : string#cost : int#radius : float#towerID : int#damageUpgradeNumber : int#radiusUpgradeNumber : int#target : Enemy#bulletTimer : float#bulletTexture : Texture2D#bulletList : List<bullet>#towershot : SoundEffect

Tower.cs

Detailed DescriptionsVariables:

towerType – the tower’s typecost – the price of building this towerdamage – the damage this tower does radius – circular radius in which the tower can damage enemies towerID – A unique ID for every tower that’s placed damageUpgradeNumber – the level that the damage has been upgraded toradiusUpgradeNumber – the level that the radius has been upgraded totarget – the enemy that the tower is targetingbulletTimer – how long ago the bullet was fired buleltTexture – this tower’s bullet’s texturebulletList – Bullets that this tower hastowerShot – Sound effect of the towerr shooting

Getters and Setters: Cost – getter for costDamage – Getter/Setter for damageRadius – Getter/Setter for radius Target – Getter for targetTowerType – getter for towerType TowerID – getter for towerIDDamageUpgradeNumber – getter/setter for damageUpgradeNumberRadiusUpgradeNumber – getter/setter for radiusUpgradeNumberTexture – getter for textureBulletTexture – getter for bulletTextureTowerShot – getter for towerShot

Constructors: Tower – (texture, bulletTexture, position, towerType, towerID, towerShot)

Methods: HasTarget – checks if the tower has a targetFaceTarget – rotate the tower to face the Enemy IsInRange – Checks an enemy position, returns true if it is in rangeGetClosestEnemy – Gets the enemy whose position is closest to the towerUpdate – Updates the tower Draw – draws the tower and bullets to the screen

Parent of all Towers

Planning: Design Diagrams:

ScreenShots:

Emily Doll, Charles Kruzan, Brandon Kick, Benjamin Gilles, Derek HallComputer Science