Archive for In-Depth

The Beginning of the End

by   Posted on May 9, 2011 in In-Depth

How does one represent 5 months of learning in one night? Well, one (specifically, me) would start by hoping his game that has been comming along steadily is up and working by the 30th. He would then proceed to attempt to  figure out a way to communicate said learning to the programming illeterate.

So basically, my “learning center” is going to be my laptop running whatever version of my game that I currently have working (I only have 1 feature left to impliment before it works, but I’d like to add a few bells and whistles). I thought about having a copy of the code that I wrote so that I can prove that I speak “computer” like I did last year, but I don’t think that it would work because I’m using multiple different files in my game, some which I wrote myself, but there are others that control the actual generation of the graphics so it wouldn’t really work (also, the file is significantly larger than it was last year, and I think that I might have to chop down a forest to get the paper necessary to print it all out). I’ve also decided to do away with the tri-fold science fair type poster board that I used last year as, as my teacher said that people don’t really tend to look at something for more than a minute or two.

Instead I think that I’ll make a “programming a game in 10 easy(ish) steps” giving a brief outline of the process that I took from knowing no C++, to being able to make a working video game.

If you’ve actually read this far into my post, I suppose you’ll also want to know the progress I’ve made on my game. Right now, I’m able to move objects within the scene in real time, have the “hero” move according to the player’s input, and have the camera move with it.a screenshot of my game
I’m also able to have the boxes that fly at you faster and faster and they spawn randomly relative to your position (instead of spawning in absolute co-ordinates). The only big thing I have left to do is make it so that the program “knows” when a box hits the “hero” (right now it just passes right through). I’d also like to add a score, and maybe even a high score feature. If I have time, creating power-ups is certainly a possibility.

Untill next time (In-Depth night)

-Nicholas

Of Ogres and Headers

by   Posted on April 8, 2011 in In-Depth  and tagged , , , ,

I have to admit, the progress on my In-depth project since last post hasn’t been that great in comparison to previous posts. This is not to say that I haven’t learned anything new, but since I was away in Mexico for most of the time, I haven’t been able to work on my project a lot. However I have still learned quite a few concepts.

The most important “concept” that I’ve learned is header files and how to use them. Basically, a header file is “source code” that allows you to put things like Classes (which I haven’t learned about yet, although I know the basics) and variables. At my current level, header’s aren’t all that important (although they do help tidy things up) but later on, as my programs become larger and larger, they will become indispensable.

The other type of source code that I’ve learned how to use is other .cpp files. I usually use .cpp files for my regular code, but having other is really important as they help store code so your main file isn’t cluttered with thousands upon thousands of lines of code. For example in a game, my main code might consist of something like:

int main()
int quit = 0;

{while(1)

{
move();
shoot();
check_for_damage();
quit quit_func();

if (quit == 1)
{break}

}
}

Which, as you can tell, is a lot simpler than having all of my code in that one file.
However, the most important development in my project these past few weeks has been my start with OGRE, an open source (free) 3D graphics engine (although I’ll only be using 2 of the 3 dimensions). Basically, OGRE will let me create and manipulate graphics much much easier than I would be able to otherwise. In the words of my mentor “you’ll go from crawling speed to light speed”. First I’ll be figuring out how to run OGRE programs, then start creating my own basic ones (probably rendering boxes or something like that). Eventually I’ll be able to create more complexed images and finally have them interact with each other while creating a framework for my game.

It’s time for me to step up my game.

The Art of Code

by   Posted on January 22, 2011 in In-Depth  and tagged , ,

I’ve always been fascinated with computers, and with what makes them tick. I also enjoy playing video games and have always more or less aspired to make one of my own. That’s why I did programming for my In-Depth project. I succeeded in understanding enough of the programming language python, to make a game very similar to this one. I enjoyed the project so much, that for this year, I have decided to do programming again, only this time, I’m going to learn a different language, C++.

The reason that I decided to learn a completely different language is because, while python certainly makes programsC/C++ easier to write (especially if you’re doing anything with graphics) C++ is “the” language. I guarantee you that 99% of the games that you buy in a store are written with C++. It’s a very powerful language because relative to others (like Python, Flash or Java) it’s fairly “low-level”, meaning that in the various different steps from you clicking something on your screen to a change actually being made in you computer, C++ is closer to the actual changes. In short, it’s the industry standard and I’ve decided to learn it because, even though it’s more difficult than the other languages, it’s also a lot more powerful.

So what progress have I made so far?
Well, I’ve contacted my mentor from last year and he has agreed to help me again this year. I’ve also downloaded the software necessary to make programs, and I’ve even started writing a few (though at the moment, they’re laughably basic).

This is probably my favorite project of the year, and I’m hoping to make the most of it, because not only do I find programming “fun” in its own way (I know, I’m a nerd sometimes), but It’s also a potential career choice for me.