Monthly Archives: April 2010

Header files and project management

Lot’s of work lately. School, work etc. etc. Well, I suppose this is good since I’m getting better and better and you know, when you have lots of experience over something, you can take part in more discussions and chats, except of course if your friends are dump enough and talk about eurovision etc. etc.

Lately I’m trying to develop a game with some friends. So a nice start would be to choose a game engine, and split up the tasks each other will do. We want to know more about computer science so we decided to create a game with OpenGL, and not with XNA which would be fairly easier but our understanding over game mechanisms would fall to pieces.

After much discussion, drinks, food, drugs and sex… oh forget it, we decided to use as a game engine Ogre 3D (have you ever played Torchlight?), or Irrlicht, since they both have a fair amount of tutorials, and we can easily track down the mechanics of these engines.

So finally to work. But from where do we start? I read some tutorials, changed some bits, felt fluent with the API of my engine, downloaded some source code and studied it… and here I had some problems. Well, first of all not every software is developed with the compiler you work on, so the debuggin is a mess, if you want to understand some code. You have to find some algorithms which you later write in your programming language and that isn’t always easy, if you don’t have a real example that works. Well, I knew it wasn’t easy, but the danger was intriguing.

After you have not abandoned (yet) your project you continue trying to understand the source code, and you find it separated in various source code (.cpp), and header files (.h), and lets not talk about the #includes on top of our code or the .dll. WTF??? WHY THE HELL THEY MADE IT SO COMPLICATED? HAVEN’T THEY HEARD THE KISS PRINCIPLE??? Well I suppose that’s how someone who wants to dive deep into programming so fast gets…. like me. If you yet to abandon your project, you don’t know what this is about, and you stupidly persist in keep walking while there is no future keep reading.

Why do we need creating our own header files? This is simple enough, but first you have to understand what a header file is. Head over here and grasp the basics. No need to fully understand the code provided, just realize its use. And now head over here, and read it. An advice: Don’t skip parts, and that’s the reason I’m not summing it up here. Get it?

BTW, I really love the way has in the end of its articles a link to discuss it in forums. Also if you are so interested take a look at the featured articles. Now imagine how in past days people have developed video games, without that knowledge. Yeap, they had to figure it out by theirselves. If you tried to imagine it, don’t try it again, not alone at least.

I believe you and I get the point. For now I shall return to Mass Effect 2.