A crash course in pointers

April 27th, 2011

OK, so a crash course on pointers. This will be a long email. But it’s at least a month worth of classes crushed into a couple of pages.

A pointer is a variable literally pointing to an address (any address) in memory.

for instance:

int nVar = 12; //This is a regular variable!
int * pVar = 0; //This is a pointer variable!

Read the rest of this entry »

Need to start posting more often!

April 27th, 2011

Ok, so between school, work, other projects and getting some gaming done, I just haven’t been able to post anything.

I shall soon, when I get my ruby project going!

WoW Addon: Soda Leveling Stats

September 18th, 2009

I finally finished my addon. Took me just a little over a week or about 8 solid hours of actual programing. But finally, it’s life at Curse.com.

The idea of the addon is simple; Now that I’m leveling a brand new druid along with my friends, I wanted a simple way to track my progress on each session. We all love playing but we have very limited time. Our biggest time constrain at the moment is my wife, who comes home from work at 9pm and after eating it barely leaves us with 2 hours (till midnight) to play. Two hours a night might seem like a good amount of time for most people, but anyone that knows MMOs and how RPGs generally work, knows that 2 hours is such a small window that progress needs to be made efficiently. Read the rest of this entry »

Making wow addons

September 15th, 2009

My Latest read on writing addons:

http://www.tentonhammer.com/node/26419

I’ve been trying to solve an issue with saving variables between sessions, and after much looking, I came across this particular tutorial. It is very outdated, but the information on it is still very valid. If not accurate, it is still a good reference guide for my first addon.

I will post pics when it’s in a more fitting working condition.

XNA Mouse Input and Handling

March 22nd, 2009

This is short tutorial on how I’m handling some of the mouse commands. I’m dumping it here in case some one find it useful:

using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Graphics;

static public class InputHandler
{

}

Notice the libraries that are included. Only the ones that are strictly necessary. The reason it’s static and public, it’s to allow all other parts of the program access to it. This is handy because it will allow us to control menu selections, and gameplay at the same time without having to initialize the class everywhere. Read the rest of this entry »

Slow progress…

March 11th, 2009

I have been doing a lot of things lately. One of the most interesting was creating a set of screens for game flow:

* Initial Screen
* Options
* Pause
* others

This was done thanks to one of the resources in the XNA (again using code from resources… shame on me). The complexity of it is a bit above my knowledge, so it was a direct copy/paste and I just did some mark up to get it to work with my own code.

I did this because of several reasons. First of all, I really got to clean up the code and outsource everything out of the main class and into a World class. World class controls everything in the game board through function calls on update for each element. The only logic here is on the AI behavior changes (when enemies shoot or dive).

The second reason is because it let me use a Options screen that lets me load and reaload things without having to quit the game. This was when the big eureka moment hit me. After having traced how each screen worked, i noticed that it didnt’ have a way to pass game options from point to point. In other words, any options that I added to the options screen was lost the moment I left the screen.

This posed a problem to my idea of having options for adding enemies and other elements. Of course, this is the whole purpose of the options screen! The solution was rather inspired by my previous work with the Sound class. So I created a public static GameSettings class. Why static? well, the answer is rather simple, it offers me the option to control them and access them from anywhere. When the options are updated in the options screen, they’re read by the World class in the GamplayScreen and taken into account when the game loads.

I like this solutions a lot. I think it’s both elegant and functional. It also led me to create a Level class which can store level options. I can create a array of levels, and then access each level as the game progresses.

I am currently working on a HUD. I just got started on it, so there is no much functionality to it yet. So far I am only drawing a radar and a small marker for where the hero is. I still need to decide how to work the radar in the game. I have 2 options, to display a radius of where things are, or display everything in the playing field. They both have pros and cons. I haven’t decided because I’m still strugling with now I want to make the game work. This is a bad thing at this stage… I really should know where I’m going, but I have become increasingly worried about what it takes to make any type of RTS work (even on the simplest level). I love the idea of the RTS, but it takes more than one person, and I have been doing this all by myself, which makes it extremely difficult.

I think I will be working on a single controlled ship taking a number of enemies very much Galaga style though the AI will be free roaming.

More to work on =)

Finding solutions to problems…

March 6th, 2009

I have been enjoying my journey through the XNA very much. It all started with a little project to move a sprite around, and now I can control a number of sprites, spawning different behaviors, animations and sounds. It wouldn’t be fair to say that I have done all this entirely on my own. The XNA has a great number of resources that I have tried to take as much advantage of as possible. It is not a bad thing to admit that have copied at lot of source code from the resources when it fits my needs. However, more importantly, I have tried to write my own code as much as possible. I have only copied it when it fits my exact needs, and when I think I can learn more from copying it, than from writing my own.

Read the rest of this entry »

Working with AI

February 25th, 2009

I have been working on a lot of things. Mostly on learning AI implementation. This week I have been working on learning all the simple AI behaviors (I’m very new to this stuff) and finally got it all working last night. I had been stuck on getting my wondering behavior working. Turns out that while cleaning my code, I had left an old variable laying around. I hate it how this small details give you such headaches.

In the process of learning all this stuff, I have found a new love for AI. The complexities of it and the subtle things that make it great even on the most simple games. The book I’m reading is http://ai4g.com/. It’s is certainly a great book though I wish the pseudo code was a bit better as far as what each function needs to pass and return. I guess their idea is to make it as open as possible, the downside is that if you’re learning, you’re left wondering.

Read the rest of this entry »

The XNA Clock

February 19th, 2009

The last few months I have been working on XNA. The great thing about the XNA is that it wraps the DirectX interface in some really accessible functions. The downside is that it becomes slightly less flexible. For instance, there is not a function to draw a single textureless rectangle. This is obviously not the end of the world. The solution is quite simple, you can just use a 1×1 blank .png and size is to the rectangle size needed.

I actually found working with the XNA very comfortable and fun. C# is very easy to pick up if you already know Java and C++. I’ve been working in my own project, and helping others with little things here and there. I created this little splash screen in just 30 mins.

Just a logo with a clock like animation. I’ll put more details on my actual project later on!

Battlestar Galactica – Sometimes a Great Notion

January 19th, 2009

Thus will it come to pass. A dying leader will know the truth of the Opera House. The missing Three will give you the Five who come from the home of the Thirteenth. You are the harbinger of death, Kara Thrace. You will lead them all to their end. End of Line

Spoiler Alert: Episode – Sometimes a Great Notion. January 16th, 2006

This is the last line that the Hybrid gives to Starbuck before being unplugged during the Season 4 (1st half) Episode – Faith. Why is it so significant? Well, for the second part of season 4 this will be the line to unravel the story (or so my theory goes).

Danielle has an interesting theory actually. She believes that Starbuck is actually a 13th cylon or cylon related “creature”. The theory is actually pretty good if you tie it to this specific line. This is go it goes.

Read the rest of this entry »