Chopper
Commander : The Final Product
Created
by Team Eggstream
Leslie Ducray
Patrick Cummins
Matthew Allen
Craig Hanan
Niall Gaffney
Our title screen menu.
This in game screen shot shows many of our game
features.
In our game we have a paralaxing background , with multiple different layers , moving at different speeds.
1. Our player dashboard displays the players' health , score and fuel.
In our game we have a paralaxing background , with multiple different layers , moving at different speeds.
1. Our player dashboard displays the players' health , score and fuel.
The player health is a variable of the main player
“Chopper1” class .
The player can loose health by being shot by the enemies or by colliding with them.
The player can regain health by collecting the falling health rewards.
The player can loose health by being shot by the enemies or by colliding with them.
The player can regain health by collecting the falling health rewards.
Score is increased by destroying enemy vechicles or by
collecting falling score (pts) rewards .
The player's fuel is constantly decreasing and so is
their altitude.Another challenge of our game is to remain airborne.
Falling Fuel canisters are another reward that players can (and must
collect).
These results are
printed to the screen using sprintfont file and a function Drawtext()
and are altered within the different classes where their collision
detection applies. For example if our helicopter collides with
another helicopter , then the player health is subtracted.
2. Bullets , Our player , the enemy helicopters and the tanks each have an individual bullet class.
6.
3. The rewards is a class , there a three different rewards that spawn randomly on the screen.
Random random;
2. Bullets , Our player , the enemy helicopters and the tanks each have an individual bullet class.
6.
3. The rewards is a class , there a three different rewards that spawn randomly on the screen.
Random random;
int
i;
public
override
void
LoadContent()
{
random
= new
Random();
i
= random.Next(0, 3);
if
(i % 2 == 0)
{
Sprite
= Game1.Instance.Content.Load<Texture2D>("Rewards/health");
}
else
if
(i % 3 == 0)
{
Sprite
= Game1.Instance.Content.Load<Texture2D>("Rewards/Points");
}
else
{
Sprite
= Game1.Instance.Content.Load<Texture2D>("Rewards/fuel
");
}
They are called randomly , by a random variable (between
0 and 3) being called and modded %
to result in a different reward.
It is set up for Fuel to appear more often than the others.
An alternative could have to been to use switch statements instead.
to result in a different reward.
It is set up for Fuel to appear more often than the others.
An alternative could have to been to use switch statements instead.
The
rewards are called from the main game ,
private
void
generateRewards()
{
if
(distance1 % 200 == 1 || distance2 % 200 == 2 || distance3 %200 ==3)
{
reward
rewards = new
reward();
reward.tempIsAlive
= false;
rewards.LoadContent();
Game1.Instance.children.Add(rewards);
}
}
The
if statement is there to ensure that only 1 reward is called at any
time during the game. We have 3 different distnace variable for each
of the 3 levels . We worked it out so that while the different
distance increment , a reward will only be generated every 200 pixels
past.
4&5&6
The helicopters , there are two helicopter classes and an Enemytank (the player's helicopter and the ememy class). All our classes inherit from a gamesentity class such as Sprite , Position , isAlive .
In the player's Chopper class , more variables are initialized such as :
public int Health;
4&5&6
The helicopters , there are two helicopter classes and an Enemytank (the player's helicopter and the ememy class). All our classes inherit from a gamesentity class such as Sprite , Position , isAlive .
In the player's Chopper class , more variables are initialized such as :
public int Health;
public
static
int
TempHealth;
public
int
score ;
public
static
int
tscore;
public
float
fuel;
public
static
float
tfuel;
which records the users statistics. There are also static temporary variables that stay consistant with their counterparts. These variables are used as accessors when interacting within other classes to change the values.
Within each of the object classes , we create a temporary rectangle which mimics the sprite rectangle. This temporary rectangle works the same as the temporary variables , as we are able to use it within other classes. This technique is ideal for collision detection.
Level 3
7.Another feature /weapon class that the helicopter has is to drop bombs. The bombs kill both enemy helicopters and tanks... as well as the Enemy Boss.
8. In the level 3 , the final level , the Sophisticated Duck that has been observing from the bottom right corner becomes active. He moves up and down the right side of the screen firing .
7.Another feature /weapon class that the helicopter has is to drop bombs. The bombs kill both enemy helicopters and tanks... as well as the Enemy Boss.
8. In the level 3 , the final level , the Sophisticated Duck that has been observing from the bottom right corner becomes active. He moves up and down the right side of the screen firing .
For our game we did a lot of testing within the labs
with class mates , and then also once we were demonstrating our game
at the Games Fleadh , we also gained more insight into some issues we
would have with the game.



No comments:
Post a Comment