Wednesday, 29 September 2010

Tutorial 6 : Tower Management

This tutorial will mainly focus on how the player will add in new towers through the addition of a new class called “Player.cs”.

The Player class will hold all the information about a specific player, such as how much money he has, what stage he is on etc. The reason we are putting all this information in it’s own class and not just in “Game1.cs” is that if we do decide to make this game multiplayer, it will make it much easier to store information about each person playing.

Sunday, 26 September 2010

Tutorial 5 : Towers

Now that we have something to shoot at, I think it is about time that we start adding in the “Tower” part of our Tower Defence. We will start off by creating a simple base class for the tower and getting it drawn, then we will move on to making it aim at our enemy. I will be leaving shooting, and placement of towers till next time. So, lets begin!

Tutorial 4 : Waypoints

In this tutorial, I will show you a method on how we can get our newly created enemy’s to follow the path that we have drawn out on our level.
The first big hurdle we face is, how will an enemy where the path is, when should he turn, when does he know when he is at the end of the path? This is where waypoints come in, when we are designing our levels, we can specify a set of points along a path (normally on the corners of paths), then when we load in our levels, we will tell our enemy’s that we want them to move between these points until they reach the end of the path.
As shown in the image above, we will specify a start and an end for the enemy, as well as intermediate points.

Saturday, 25 September 2010

Tutorial 3 : The Enemy Class

To start with, we will be creating a new class called "Enemy.cs", this will be a base class for all our enemy's, whether they are bosses or fast units or just plain cannon fodder.

So to start with add a new class called "Enemy.cs", then add the following using statements :

using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;

From now on these 2 namespaces will need to be added to nearly every class, so I am just going to assume that you will remember to add these.