Uncategorized

Diamond Maze on Tempermanent Hold

So, the new XNA Diamond Maze is checked into SVN, but now entering tempermanent hold status.

The word tempermanent is one of my pet words, like complexibility. In the case of tempermanent, it means “something that is meant to be ‘temporary’ but will in all likelihood become ‘permanent'”, which is kind of like income tax and the tolls on the freeway in Chicago.

But! The code is there if I should ever want to pick it back up.

Speaking of backing up, I am still missing a crucial step in my backup scheme. Yes, I have a repository on my external HD, and I keep my stuff checked in. If my computer takes a dive, and the external HD doesn’t I’m good. If the external HD takes a dive, and my computer is fine, I’ve got the local copy I can revert to, and make a new repo on a new external HD.

But! If both fail, then what?

Uncategorized

My Dev Setup

image_169.jpg

Above is a picture of my computer setup at home.

The setup consists of:

1) the screen(83″ 4:3) Cost: $150

2) the projector inside of a tv stand modified into a roll cart.  the bottom part of the cart contains most of the wires for the rig. Cost: $500 for projector, and I think $50 for the cart, the casters, and various extension cords and power strips.

3) the computer, which does not fit inside the cart. I need to figure out some way to attach it. Cost: $450, plus $80 for the video capture card, plus another $30 for the wireless ethernet card.
4) a 36″ piece of 2×12 (sits across the arms of the recliner I sit in) Cost: can’t remember, but this was a part of a 10′ section at one point. The rest of this particular piece of lumber is a base for my bathtub.

5) wireless keyboard and mouse . Cost $25

6) external hard drive  where my SVN repository is (inside the cart) Cost $100

A little less than $1400, and I can develop software on my wall with my feet up.

I also watch tv with it, and I’ve got a gamecube connected into it.

Truly, the only way to develop software.

Uncategorized

Diamond Maze

diamondmaze_ss_200803020917.png

Well, there’s not much to it yet, but the maze is present, and the player can move about the maze.  There is nothing for him to do yet, however.

Some differences from the original version include a different screen resolution (800×600 instead of the original 640×480).  I did not change the actual number of ascii cells, which remains 40×30, it just scales the sprites to the 20×20 from the 16×16 in the bitmap.

However, the area left for the minimap has changed this time.  Originally, this area was 128×128, and it is now 160×160.  Since the minimap consists of individual pixels, and I don’t want to be scaling something like that, I’m going to  change the size of the entire map to 160×160.

Originally, the individual “rooms” of the maze were 16×16, and there was a grid of 8×8 of them.  This leaves me with a decision to make.  Stay with the 16×16 rooms and change the number of them to 100?  Or, stick with 64 rooms and make them 20×20?  Or, go with a totally different room size completely.

After that, I have a few other decisions to make.  The original game had 4 differently colored doors, and the differently colored keys to go with them.  Do I leave it at 4, or change it?  The four potions: invincibility, freeze, health, and wealth.  Keep as is or add/remove/modify the list?

In any case, the end result should be interesting, and recognizably  the same game as the original, so it really doesn’t matter what is decided as long as it keeps the game fun.

Uncategorized

Maze Generation Code and Diamond Maze

The following is the current iteration of the maze generation algorithm I’m using.  Currently, I am working on a remake of Diamond Maze with XNA.

Yes, it will be using the same ASCII style graphics as it did originally.  This is more of a “ramp up on how I’m going to do stuff in XNA” than anything else.

A colleague of mine once referred to Diamond Maze as a roguelike, which I had never really thought of it as, but I guess the term does accurately describe the game.  I usually associate a way more elaborate combat system and inventory system than what I used in DM.

This code is my implementation of Pim’s algorithm.  It isn’t terribly useful without the associated classes, but I just wanted to share it.

public void Generate(int randomSeed)
{
Random random = new Random(randomSeed);
Clear();
List<MazeCell> frontier = new List<MazeCell>();
MazeCell cell = GetCell(random.Next(Width), random.Next(Height));
cell.Frontier = false;
int direction;
for (direction = MazeDirections.First; direction <= MazeDirections.Last; ++direction)
{
if (cell.Neighbors[direction] != null && cell.Neighbors[direction].Frontier)
{
frontier.Add(cell.Neighbors[direction]);
}
}
while (frontier.Count > 0)
{
cell = frontier[random.Next(frontier.Count)];
frontier.Remove(cell);
cell.Frontier = false;
do
{
direction = random.Next(MazeDirections.Count);
}while(cell.Neighbors[direction]==null || cell.Neighbors[direction].Frontier);
cell.Portals[direction].Open = true;
for (direction = MazeDirections.First; direction <= MazeDirections.Last; ++direction)
{
if (cell.Neighbors[direction] != null && cell.Neighbors[direction].Frontier && !frontier.Contains(cell.Neighbors[direction]))
{
frontier.Add(cell.Neighbors[direction]);
}
}
}
}