Saturday, November 24, 2007

Pipe Fighter Update

Well, I've been hard at work with Pipe Fighter for the past week (ignoring classwork which I'm getting back to do after work) and good thing. I'm finally at the meat of the game. The fighing I have a working a introduction, main menu screen, options, character selection and now the fighting screen. My problem now is the use of the Farseer Physics engine which is implemented within the RayEngine. Once I get a hold on the use of it for fighting, Pipe Fighter will have a unique fighting feel to it compared to just Street Fighter. I hope to release a beta test at the end of the year or in January. It will be an online Beta, but just something to show after over a year of no one playing this game besides a few. Here's a little look at the character select screen. There's still some kinks that I have to rough out for the second player but that will be done after the beta when I start polishing stuff up. Oh just to let you know, the clouds are a particle system that is moving through the sky randomly ;) (There's an oxymoron in there when you see the video...which I will upload one, one of these days.) Enjoy.

Friday, November 23, 2007

An easy way to make stages for fighting games.

I've been working long on Pipe Fighter and last night I came across something I haven't thought of the first time I made Pipe Fighter (I have an old version that I stopped making because I decided to make the RayEngine and make it easier on me). That thing was designing the structure of stages. The first time through, I hardcoded the positions of all the little parts of the background (like houses and the ground). The only thing I didn't hardcode was the lifebars. If you want a tutorial on how to make lifebars, you can go to George Clingerman's XNA website (XNADevelopment) where his tutorial is what I used.

My structure for my stages is pretty simple. I have a class called Level that has 2 main fields (my level class has 4 fields for more stuff that I can add later on for effects).

private int ground
private BackgroundScreen background

I also made properties out of the ground field. The backgroundscreen is basically just an image that is stretched to the size of the screen but has the properties of the Screen class that can be found in the XNA starterkit. The constructor is null. That's the end of the Level class, simple huh?

After we have that done, now it's time to make a specifice level. In PipeFighter, I called it JapanStage, but let's make two stages. In the constructor you have to initiate the ground to a number. You also have to initiate the background.

public JapanStage()
ground = 400;
background = new BackgroundScreen("Content/Graphics/Stages/JapanStage");

public ChinaStage()
ground = 350;
background = new BackgroundScreen("Content/Graphics/Stages/ChinaStage");

My constructor for a backgroundscreen is different from the XNA starterkit, so you may have to modify your code. This is just to give you an idea of the steps to take. That's the end of the class. Easy right?

Now we aren't finished yet. The reason why we made these two classes is because we are going to use them in a class that determines which stage is going to be shown. We will call this class the FightingScreen, which is the same as a Screen in the XNA Starterkit.

public class FightingScreen : Screen
private Level Stage;

public FightingScreen(int ChosenLevel)

private void LoadStage(int whichStage)
if(whichStage == 1)
Level = new JapanStage();
Level = new ChinaStage();

Now you have an easy way to go to different screens. The ground level is the point where you don't want your characters not to go past (on fighting games, you don't want them to go beyond the floor, unless you want them to). Now let's say if you had a Select Level screen and the user wanted to choose a level, all you have to do is something like:

*Psuedo Code*

if(playerChoseLevel == 1)
new FightingScreen(1);
else if (playerChoseLevel == 2)
new FightingScreen(2);
new FightingScreen(RandomNumberBetween(1,2));

That's the basics on how I setup my levels for Pipe Fighter. You can use this approach in any typ of game. There is more you can do to your levels than it just being a background. In the base Level class, you can add a list of ParticleSystems and a List of Sprites and make them properties or public variables. Then in your level classes, you can add custom particle systems and/or sprites and make your backgrounds better. Enjoy.

Tuesday, November 20, 2007

Day One: Intro, Piping, and Raying

Hey. I am Charles Christopher Woelfel; a student at North Carolina State University in the US. I am also an XNA Hobbyist. This is my first blog and hopefully I'll be able to keep up with it. I will give you insight into my projects that I create. The latest being Pipe Fighter. A Mario/Street Fighter crossover that I made a flash movie out of a couple of years back. This project has been in development for over a year now. I've been going off and on with the project being sidetracked because of school and other reasons. One big reason was this summer I made my first Game Engine, called RayEngine.

The RayEngine got it's name from my father who's middle name is Ray. I basically did it to honor him as I love my crazy father. It's definitely not the best Game Engine ever created. I made it for myself so I don't have to rewrite code (which you do alot in programming unless you can think ahead) for every game I make. It has a whole bunch of Managers that are in charge of stuff like: Sprites, Text, Input, Effects, etc.... I like how it turned out, only that I still have bugs in it that I have to fix while programming Pipe Fighter. I'm getting better at programming since programming with the XNA framework. I think that's what made me even make this engine. I will go into detail in another post on the RayEngine and how I got it started and what you can use in order to make your own little engine.

Well, that's all I want to say for right now. I might make another post at the end of today or sometime this week about Pipe Fighter. I hope you have a great day.