Friday, January 21, 2011

There was this PCSTree guy and PCSNode girl...


Well, I am back again here. I’ll use this post to explain the first assignment we got (which I actually finished a couple of days ago). The goal is to create a System to handle the Objects inside your game engine, that is, a centralized place where all game objects can be stored, organized and managed.

That’s basically the final objective of this Object System, but as Prof. Keenan says “We have to take Baby Steps in order to get there”, so for now the basic idea is to create a Tree-like Structure to store data on memory in a coherent and efficient way.

This structure consists of a bunch of nodes linked together by pointers creating a structure that resembles a tree. In the first place you have a class called PCSTree (where PCS stands for Parent-Child-Sibling) which has a pointer to an instance of the class PCSNode called Root. This root node acts as the connection between the tree and all its nodes, but when we count all the nodes in the tree this one is not taking into account. Mainly this node is generated when the tree is created and lives while the tree exists, even when it is empty.

Nodes can have as many children and siblings as possible, but each node only has a pointer to its first child and next sibling, and an additional one to its parent node. Therefore, each node ends up having a pointer to the first element of a linked list of child nodes, and also a pointer to the next element in the linked list of child nodes of its parent. In the end, this so-called Tree structure is better define as Tree of Linked Lists. Here is a diagram I drew to explain myself better.


Well, I’m off to do some code-commenting and smoothing of the rough edges (trying to optimize as much as possible). I’ll let you know how this part ends in the next post. See you around!

Adios!

Wednesday, January 19, 2011

Once upon a time...

First of all, I should have posted this a couple of weeks ago, you know, when the classes actually started and the professor told us that we had to keep a blog during the quarter.

So well, here I am, a couple of weeks later, introducing myself. My name is Diego Guerrero and I am a graduate student at DePaul University (Chicago), currently doing a M.Sc. in Computer Game Development.

This quarter I am taking a class named "Game Engine Programming I", which goes by the code GAM475 (that's where the name of this blog comes from). As part of the class we have have to keep a blog up-to-date during the quarter, where we should write about our experience/problems/frustrations doing this course's assignments and projects (like having an open journey I guess).

Basically that's the idea behind this blog. I already started (and almost finished) the first assignment, which is about making an Object System (a tree data structure for holding and managing objects in memory). I will give you guys more details about the assignment in my next post, this one was supposed to be about introducing myself and the blog.

Adios!

P.S.: By the way, I am from Venezuela and my native language is not english, so I apologize for any mistakes and grammatical errors you might find in my posts (they are not intentional, hehe).