Chapter



Final Design Document

Global Gaming

Redemption

Submitted December 6, 2003 for review

Developers:

Alex deVera

Lalita Tantipathananandh

table of Contents

1.1. Introduction 4

1.2. Description 4

1.3. Conclusion 4

2.1. Start Game 5

2.2. Control Options 5

2.3. Story Timeline 6

2.4. Gallery 6

2.5. Exit Game 6

3.1. User Feedback 7

3.2. User Information 7

3.3. Enemy Information 7

3.4. Radar Information 8

4.1 World Set Up 9

4.2 Targeting Cone 9

4.3 Radar 9

4.4 Ships 9

4.5 Weapons 10

4.6 Explosions 10

5.1 Background Music 11

5.2 Sound Effects 11

5.3 Collisions 11

5.4 Explosions 11

6.1. Level Data 12

6.2. Ship Settings 13

6.3. Energy Ball Settings 14

6.4. Laser Settings 14

7.1. NPC Handling 15

7.2. Handle User Controls 17

7.3. Handle Pitch 18

7.4. Handle Roll 18

7.5. Handle Turn 19

7.6. Handle Laser 20

8.1. NPC Targeting and Following 21

8.2. NPC Weapons Firing 21

10.1 Player View Type 23

10.2 Explosions 23

10.3 Weapons Design 23

10.4 World Set Up 24

10.5 Artificial Intelligence 24

10.6 Ship Size 24

10.7 Lighting 24

10.8 Radar 24

10.9 Player Ship Control 25

10.10 Shields 25

12.1 CS426 Concepts 26

12.2 Music and Sound 26

|Chapter |Executive Summary |

|1 | |

1.1 Introduction

1.2 Description

1.3 Conclusion

1.1. Introduction

Global Gaming developed Redemption as a 3D flight simulator using DarkBASIC for code development and 3D Canvas for designing 3D models. Development of the game was a semester long project assigned by Jason Leigh in his CS426 Multimedia Computing class at the University of Illinois at Chicago.

1.2. Description

Upon starting up Redemption, the user is taken to a main introductory title screen. This screen features basic animation where ships fly randomly around the screen for visual enjoyment. The music is also playing to get the user into the feel of the game before starting. The user may press any key to cut to the menu page.

The menu page includes 4 options. The user can read the storyline of the game, look at the gallery of characters in the game, change user controls, start and exit the game. To choose any of these options, the user simply uses the mouse to click on the button.

Upon the start of the game, the player starts up in the beginning level and plays through all the missions until the completion of the game. The user may at any time pause the game or exit.

1.3. Conclusion

Global Gaming strived to provide the gaming market with a unique flight simulator like no one else has offered before. With original features offered to the user, Global Gaming has put out the game Redemption that adheres to the company’s goals. With the success of this game and user feedback, Global Gaming can continue to develop new and improved gaming software that will provide years of gaming enjoyment.

|Chapter |Menu System |

|2 | |

1. Start Game

2. Control Options

2.2 Story Timeline

2.3 Gallery

2.4 Exit Game

2.1. Start Game

When the user selects the start game menu option, he or she is taken to a loading screen while the game is starting up and initializing. The player starts up in the first mission, initially stationary.

The object of the game is to kill all of the enemy alien ships in each level.

2.2. Control Options

Clicking on the control options menu button brings up the default settings for the controls during the play of the game. The user may play the game by either using the keyboard or a joystick with four buttons. If the user decides to play with the joystick, he or she is provided with force feedback when firing weapons during the game.

Default Keyboard Controls:

• Spacebar – Increase Speed

• Left Shift – Decrease Speed

• Left CTRL – Roll Right

• Left ALT – Roll Left

• Decimal Point on Keypad – Fire Energy Ball

• 0 on the Keypad – Fire Laser

• Q – Choose a Race

• W – Choose a Wing

• E – Choose a Ship

Default Joystick Controls:

• Button 1 – Fire Laser

• Button 2 – Fire Energy Ball

• Button 3 – Increase Speed

• Button 4 – Decrease Speed

2.3. Story Timeline

2013: WWIII

2070: Contact – New Era Begins

2078: United – Earth united under one government

2101: AI is born – becomes slave race to humans

-First intergalactic war versus Barra

-Humans lose 7 of 9 solar systems in 4 months

-War ends with Barra being struck by an unknown plague, killing 90% of them

-Humans acquire vastly new technology

-Expansion begins again

2163: Humans encounter a primitive alien race on a remote world

-They locate extremely rare resources but cannot mine due to “culture contamination rules of Galactic Alliance” the alien race dies to a mysterious plague

-Humans begin to mine

-Eclavdra (a young race), who believes the race that the humans killed to be holy, therefore it has become a holy war with humans

2168: War still rages on

-More and more synthetic life forms being used in the battle to save human lives.

2.4. Gallery

The gallery menu option displays the ships that are used in the game. These pictures are screenshots taken during the design in 3D Canvas.

2.5. Exit Game

The exit game option allows the user to quit out of the game. He or she is taken to the credits page and the game exits.

|Chapter |Heads Up Display |

|3 | |

1. User Feedback

2. User Information

3. Enemy Information

4. Radar Information

3.1. User Feedback

All information in the HUD dynamically changes during game play. When the player collides with another ship, all text flashes red.

3.2. User Information

• Targeting Compass – A way to help the player locate the ship he or she is targeting. When the large circle is facing the player, the target ship is directly in front of the player.

• Hull – Damage to the user’s ship.

• Power – Power of the weapons, the energy balls and the laser.

• Current ID – The Current Wing the player is fighting in.

• Current Ship – Current Ship the player is fighting with.

• Wing Commander – Whether or not you have control of the other ships

• Speed – Speed of the user’s ship. Top speed reaches 29.9.

• Pitch Angle

• Turn Angle

• Roll Angle

Pitch Rate – Maximum is unique to each ship. (avg. 60)

• Turn Rate - Maximum is unique to each ship. (avg. 60)

• Roll Rate - Maximum is unique to each ship. (avg. 70)

• Crosshair – The crosshair is centered in the middle of the screen to help the user target where he or she is shooting at.

3.3. Enemy Information

• Race ID – The race the player is targeting

• Wing ID – The wing the player is targeting.

• Ship ID – The ship number the player is targeting.

• Name – The name of the ship if it has one

• Class – The type of ship

• Hull – Different for every ship, regenerates slower than the player’s Hull Damage regenerates

• Power

• Speed

• Distance

3.4. Radar Information

• Symbols:

1. Dots: Show you what types of ships are behind you and in what general direction.

2. Squares: Shows you what type of ship is flying in front of you and highlights where they are.

• Colors:

1. Purple: Friendly ships representing the human race.

2. Red: Enemy ships representing the alien races.

3. Yellow: The enemy ship being targeted by the humans.

|Chapter |Graphical Effects |

|4 | |

1. World Set Up

2. Targeting Cone

3. Radar

1. Target Dots

2. Target Brackets

4. Ships

5. Weapons

1. Laser

2. Energy Balls

6. Explosions

4.1 World Set Up

The world setting is a simulation of outer space. It was set up in DarkBASIC by creating a large 3D box sized 4000 x 4000 and texture mapped with a star field.

4.2 Targeting Cone

The targeting cone on the heads up display was created using 3D Canvas. It is composed of a cone and a sphere colored using the software and given a slight transparency.

4.3 Radar

4.3.1 Target Dots

The target dots were created using DarkBASIC. Each dot is composed of a series of co centric circles and colored depending on what type of ship it represents.

4.3.2 Target Brackets

The target brackets were created using DarkBASIC. Each set of brackets were composed of 8 separate lines organized together to create a broken targeting square. Each target bracket is colored depending on what type of ship it represents.

4.4 Ships

All enemy and user ships were created and textured using 3D Canvas. Ships were sized in 3D Canvas before exporting to a direct X file.

4.5 Weapons

4.5.1 Laser

The laser was created using 3D Canvas. Two cylinders were used, one embedded in the other. The outside cylinder is colored according to the type of ship, purple for humans and red for aliens. The inside cylinder is colored white for all of the lasers.

There are two sizes for the laser. There is a default size for all fighter ships and laser with a much larger diameter for all warships.

Each laser is placed in specific firing spots on all non-player characters. The user’s laser is placed just below the camera and reaches out toward the crosshair on the HUD.

4.5.2 Energy Balls

The energy balls were created in 3D Canvas. Two spheres were used, on embedded in the other. The outside sphere is colored according to the type of ship, purple for the humans and red for the aliens. The inside sphere is colored white for all of the energy balls.

Each energy ball is stretched to the shape of an oval. This was done to create the illusion of speed.

There are two sizes for energy balls. There is a default size for all fighter ships and also energy balls for all warships, which are much larger in diameter.

4.6 Explosions

All explosions were created using particle effects.

When a ship is hit with either the laser or the energy ball, a particle placed inside the ship is activated for a brief amount of time to make it look like it was hit.

When the hull damage for any NPC reaches zero, the ship explodes completely. The ship is hidden and three separate particles with different settings are activated. One particle is oriented with default settings to create a rounded explosion effect on top. A second is rotated 180 degrees to create a rounded out explosion on the bottom. The third particle is used to create a middle ring effect. All three particles combined were given the same life and velocity settings to create a full explosion.

|Chapter |Music and Sound Effects |

|5 | |

1. Background Music

2. Sound Effects

1. Laser

2. Energy Balls

3. Collisions

4. Explosions

5.1 Background Music

There is background music for each stage of the game. Music is played during the start up menu, each level of the game, and during the credits. Each of these stages plays a different track, which loops continuously. The music was chosen to give the player a different feeling during each stage of game play.

5.2 Sound Effects

5.2.1 Laser

The laser is a 3D mono sound to give it surround sound. Each laser has it’s own sound, which loops for as long as the laser is being fired. There are four different sounds. There are two sounds for the human fighter ships and the human warships and there are two sounds for the human fighter ships and for the human warships.

5.2.2 Energy Ball

The energy balls are 3D mono sounds to give it surround sound. A sound effect was given to each energy ball so that the sound does not cut off and can play fully when multiple energy balls are shot at the same time. The sound is positioned at the point where the energy ball is fired. The sound effects for the enemies are different from the human sounds for the fighters and also separate and different for the warships.

5.3 Collisions

Each collision in the game between any two ships, including the player’s ship with any NPC, plays a collision sound effect.

5.4 Explosions

The explosions were loaded in as 3D mono sounds to give it surround sound. For every explosion, there is a sound effect.

|Chapter |Data Files |

|6 | |

1. Level Data

2. Ship Settings

3. Energy Ball Settings

4. Laser Settings

6.1. Level Data

The level data file specifies how many players for each side will play during the level. It will build a maximum of five races, three wings per race, and five ships per wing depending on what is specified in the data file. The response time is initialized here, which is the time between each firing of the weapons. The lower the response time, the harder the game is. The below sample data creates a race with one wing that has two ships in its wing.

Sample Data File:

music=File Name //Specific unique music for the level

// Terran Race

CreateNewRace=Terran //Create a new race and name it

race_radar_color_red=153 //Specify the radar color with rgb values

race_radar_color_green=50

race_radar_color_blue=204

CreateNewWing=Hawk //Create a wing for the race and name it

CreateNewShip //Create a new ship for the wing

ship_class=T-Fighter (Hawk) //Specify the ship’s class

ship_response_time=25 //Specify how fast the ship responds

ship_position_x=0 //Specify ship’s initial position

ship_position_y=0

ship_position_z=-3000

BuildShipNow

CreateNewShip

ship_class=T-Fighter (Hawk)

ship_response_time=25

ship_position_x=-100

ship_position_y=0

ship_position_z=-3000

BuildShipNow

BuildWingNow

6.2. Ship Settings

This file initializes ship settings for each ship type. A sample file is shown below.

max_hull_hp=100 //The amount of hull power/hit points

hull_regen_rate=.25 //The rate of hull regeneration

max_power=100 //The maximum power of the weapons

power_regen_rate=40 //The power regeneration rate

size=small //Size of the ship

length=4 //Length of the ship

max_pitch_rate=60 //Pitch up or down independent of axis

max_turn_rate=60 //Turn right or left independent of axis

max_roll_rate=80 //Roll right or left independent of axis

pitch_increase_rate=50

turn_increase_rate=50

roll_increase_rate=50

pitch_decrease_rate=25

turn_decrease_rate=25

roll_decrease_rate=25

max_speed=30

speed_increase_rate=100

speed_decrease_rate=100

max_attack_range=400

min_attack_range=50

num_laser_ports=1 //Number of lasers per ship (up to 10)

laser_port_num=0 //Laser port number

laser_class=E-Laser Cannon (Katana) //Type of laser

laser_port_x=0 //Position of the laser on the ship

laser_port_y=0

laser_port_z=2

num_eball_ports=2 //Number of energy cannons (up to 12)

eball_class=E-Energy Cannon (Shuriken) //Type of energy ball

eball_port_num=0 //Energy ball number

eball_port_x=-1.2 //Position of the energy ball cannon

eball_port_y=0

eball_port_z=0

eball_port_num=1

eball_class=E-Energy Cannon (Shuriken)

eball_port_x=1.2

eball_port_y=0

eball_port_z=0

6.3. Energy Ball Settings

The energy ball file contains settings to initialize each of the fighter and warship energy balls. The names of the data files much match the names of the models in the model folder. The reload time is given so that the energy balls don’t look like they are all shooting out at once because the cycle time may make it appear this way. There is an energy ball file for every direct X file.

The energy balls are set on the turrets of the ship from where it shoots from by cycling through each of the turrets and adding an energy ball to it until the supply of twelve energy balls is exhausted. The energy balls may be distributed evenly or unevenly depending on how many turrets there are on the ship.

A sample file is given below.

reload_time=1000 //The amount of time to pass between each firing

range=1000 //The distance it travels before coming back to the ship

strength=850 //The power/hit points it takes from the target’s hull

power_usage=850 //The amount of power it takes to fire the energy ball

speed=60 //The speed the energy ball travels at

6.4. Laser Settings

The laser file contains settings to initialize each of the fighter and warship lasers. The names of the data files much match the names of the models in the model folder. There is a laser data file for every direct X file. A sample file is given below.

reload_time=100

duration=250

range=500 //The length of the laser so that it cuts off at some point

strength=30 //The power/hit points it takes from the target ship’s hull

power_usage=60 //The amount of power it takes to fire the laser

|Chapter |Finite State Machines |

|7 | |

1. NPC Handling

2. Handle User Controls

3. Handle Pitch

4. Handle Roll

5. Handle Turn

6. Handle Laser

7.1. NPC Handling

All NPC ships are handled using the finite state machine in the following diagram. The transitions of each state are explained below.

State: Fly Around

Transition: When the NPC is flying around and approaches the boundaries of the world, the game should automatically turn the ship around so that it never flies out of the world. The game, as of right now, handles this by blowing the ship up instead. Between each cycle of the ship flying around, the NPC also enters the Idle state.

State: Idle

Transition: At every cycle, the NPC is continuously entering the Flying state and searching for an enemy and going back to the Idle state again until another state transition is met.

State: Search for Enemy

Transition: The NPC is continuously coming in and out of this state from the Idle state. Whenever the NPC comes within range and sees an enemy within a certain targeting cone, the NPC will enter the Attack state.

State: Attack

Transition: From the Attack state, the NPC will enter the Fire Laser state if the NPC is within range of the enemy and within in 45 degree targeting cone. The NPC will enter the Fire Energy Ball if the NPC is within range and the enemy is within a 15 degree targeting cone.

States: Fire Laser/Fire Energy Ball

Transition: From these two states, the NPC either reenters the Idle state to continue flying around and searching for enemies or enters the Kill Enemy state where the level is over. If the enemy’s hull damage is still above zero, the NPC will enter the Idle state, otherwise it will enter the Kill Enemy state.

During any of the states listed above, the enemy may at any time be hit with a laser or energy ball from another player. In this case, the NPC will enter Loss of Shields or Power state and either return to the state it came from or enter the Enemy Dies/Explodes state.

[pic]

7.2. Handle User Controls

During the play of the game, the user has several ways to control the ship that he or she is playing as. The user is continuously entering, exiting, and reentering the Idle state and handling the specified controls as the user presses the required keys. The Idle state may enter Handle Turn, Move Forward, Handle Speed, Handle Targeting, or Handle Pitch.

[pic]

Each control, pitch, roll, and turn, for the user is handled using the below finite state machines. The states and transitions are described below and are the same for each of the controls with the difference of command key pressed.

State: Handle Pitch, Roll, and Turn

Transition: After pressing one of the specified keys, the negative and positive angles are retrieved respectively to handle the control. After the object is pitched, rolled, or turned the Handle Pitch state is returned to. In order to realistically slow down the pitch, roll, or turn, if no key is pressed, the angle turn rate is retrieved and the curve value is set to zero.

7.3. Handle Pitch

[pic]

7.4. Handle Roll

[pic]

7.5. Handle Turn

[pic]

7.6. Handle Laser

When the user enters the handle laser state, there are three states the user enters. The finite state machine and descriptions of states and transitions are below.

State: Laser Ready

Transition: The player enters the laser ready state when the fire laser button is pressed. It is then transitioned to the Laser Attack state when the player is within range of the target and the target is within a thirty-degree firing cone.

State: Laser Attack

Transition: While the user is within range of the target and within the thirty-degree firing cone, this state continuously loops as long as the power is greater than five percent. If the power of the weapon is less than 100% and the user is not firing the weapon, the Laser Recharge state is entered.

State: Laser Recharge

Transition: The laser is recharged in this state by continuously looping through this state until the power of the weapon is back to at least 95%. Once this is achieved, the user is taken back to the Laser Ready state.

[pic]

|Chapter |Artificial Intelligence |

|8 | |

8.1 NPC Targeting

2. NPC Weapons Firing

8.1. NPC Targeting and Following

The NPC’s target both player ships and alien ships. Picking the ship with the highest number chooses the wing leader for each wing. The wing leader targets the ship for the wing. If the wing leader dies, the next highest numbered ship is chosen to be the wing leader. The ships in the wing will then target and try to kill the targeted ship.

For each NPC, the camera is jumped to the NPC, which is able to view the environment at all angles. Starting at the top right corner and rotating clockwise, the screen is divided into four quadrants in front and back of the ship.

Once the target ship is found, the NPC’s use the maximum and minimum attack ranges specified in the data file to follow the ship. If the target ship is starting to fly out of range, the NPC will speed up to get closer to it. If the NPC is too close to the target ship, the NPC will veer off to the side and start targeting the ship again.

8.2. NPC Weapons Firing

Once the NPC has found its target, it uses its response time to target the target ship and fires a weapon according to range and firing cone degree.

The NPC will fire an energy ball if the target ship is within range and it is within a 15 degree firing cone.

The NPC will fire the laser if it has power, within range of the target ship, and the target ship is within a thirty-degree firing cone. There are three different laser-firing states, which are described in the finite state machine in section 7.6.

|Chapter |Collision Detection |

|9 | |

Collision Detection for the game detects collisions by using DarkBASIC’s collision detection commands.

If any ship approaches the boundaries of the skybox, the ship blows up.

If any ship hits another ship, both of the ships get hull damage depending on the speed of the both of the objects. Their speeds are set to negative speed times half of what they were going before they collided and “bounce” away from each other.

If the player hits another ship, the heads up display turns red.

When an NPC gets hit by a weapon or collides with another ship, they will start to barrel roll by rolling right or left depending on a number generated by the random number generator, and pitching up.

|Chapter |Design Tradeoffs |

|10 | |

10.1 Player View Type

2. Explosions

3. Weapon Design

4. World Set Up

10.1 Player View Type

The view of the player was initially designed in third person, but it became more difficult to tell where the fighter was turning. It looked like the fighter was just hung right in front of the camera and not moving at all. To make the flight more realistic, the game was changed to a first person view.

10.2 Explosions

First we tried one particle object and it created a ring effect. We did not feel that this was realistic enough.

Then we tried to make it look more realistic and round so we tried three particles with various settings. This is the current setting and is described above in section 4.6.

We liked that but then tried , which had really great particle effects, which would be easier and better looking than trying to program them ourselves. The problem with that is the very obvious watermarks they placed over the movie screen. The real the version costs $400. We tried different software to try and remove the watermarks, but did not succeed.

10.3 Weapons Design

Both the laser and the energy ball were originally designed with three spheres and three cylinders respectively. At this time we had a problem with firing the energy ball because the middle white area disappeared after firing more than one. We took out the white part of the weapon.

We then discovered that the problem was because the objects were being scaled in DarkBASIC. Scaling before exporting solved the problem. The white area was added again but the middle colored cylinder was removed.

10.4 World Set Up

First we used a sphere made in dark basic with texture mapping but the texture was too spread out. We then went to a cube in DarkBASIC with the texture map, which we have now and it looks good but it has unrealistic corners in it.

Someone suggested that we move the world box with the player, but that made it look like the player wasn’t moving at all.

Starbits7 was recommended to us because you can create custom star fields with it better than what we had done. We have not yet found a good site to preview to software yet.

10.5 Artificial Intelligence

We used a firing cone for the enemy to target shoot instead of the game physics of idea dead reckoning. We considered using it but because the fighters have two types of weapons, we thought it would be easier to just use a firing cone.

10.6 Ship Size

The speed of the energy balls is 2 and if you make the size of the ships smaller than two (say one), it passes right through (or jumps over) the ship. Therefore, we had to make the ships at least a certain size greater than 2 units.

10.7 Lighting

We tried to put the light source on the ship but if the ship is too small, you can see the light source, if it is too big you can’t tell the light source is there. We tried to put the light source coming from the camera but you can’t tell that the light is there

As of right now there is only default lighting for the ships and in the world.

10.8 Radar

At first the radar was just sprite on the screen for visual effect with no other real purpose. We then created a sphere so that it was in 3D so we could start doing something with it.

For design purposes, a rough radar was created by showing the names of all of the ships on the screen in relation to where they were in the world. We wanted to try either putting small dots on the screen with different colors corresponding to in front or behind the player in the sphere or we want to try having two different radar screens with one showing ships in front of the player and one with ships that are behind the player, similar to a rearview mirror.

The rearview mirror could not be implemented because it was disrupting the radar and the AI because they both use object screen x and y, which tells you where on the screen the object is. When we added a rearview camera, the command was looking at both cameras at the same time so it could not just get the coordinates of objects only in the rear camera.

The final result is described in section 3.4.

10.9 Player Ship Control

First we wanted to have the user be able to switch which ships he or she controls whenever they wanted to, then it seemed that we’d have to keep track of a lot more things and it would be more complicated.

The second option was to have the user die and have to start the level over again in a different ship.

The last option was to have multiple friendly ships on the screen and have the user control one of them. When he or she dies, he can continue on that mission/level by controlling one of the other ships right after his ship is destroyed. There will be no other way to continue, these are the only extra lives he or she has. The friendly fighter ships that the user controls can be destroyed on their own. The final result implemented this feature with a button to allow the user to control when he or she jumps ship.

10.10 Shields

We wanted to implement shields for each of the ships by adding a graphical effect and making it an option for the user to toggle on and off. Instead we made the maximum hull damage for each ship different according to its class.

|Chapter |Acknowledgements |

|11 | |

1. CS426 Concepts

2. Music and Sound

12.1 CS426 Concepts

Steve Jones: Music and setting the tone/mood for the game, attempting to make the player feel how we wanted him or her to feel while playing the game

CPU Speed and Constancy: All aspects of the game are on timers so that it doesn’t rely on CPU speed

Particle Presentation Demo: Giving the presentation taught us how to use it and so we used it for our explosions

Human Interaction Lecture: Make the movements realistic, response time is 100 ms in finding the player to shoot at, turning the fighter in command by the controls was changed because the response time when turning was too quick

12.2 Music and Sound

Sound effects were taken from the website and edited using the software FRUITYLOOPS 3.

................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download