Artician Home
Join Artician Login Search

kman's blog

avatar
  • kman
  • Male
  • Is Offline
  • Status: Administrator
  • Blog Views: 12695
  • Last Seen: A month ago

Profile

kman's Info
  • Joined: 08/25/06
  • Account: Artician Pro
  • Visits: 12695
  • Total Discussion Posts: 439
  • Portfolio Count: 15 | View
  • Blog Entries Count: 85 | View
  • Favorites Received: 26
  • Watchers: 21
Professional
Personal
Social Networks
Category: Personal Development - Career Success Tags: game development , fullsail , artician , michael kofman
Tuesday August 12th, 2008
It feels like it's been ages since I've spent quality time on Artician. Is there any hope of becoming nearly as active in the near future, afraid not. My time has become ever so prioritized, and as sad as it is I'm as far from Art as I'll ever be. Two years ago I made the decision to program video games, and I am five months away from living my dream (well getting paid for it).

I started final project last week. Essentially it marks the end of our education, and now begins a different form of learning. The kind others are only privileged to experience in the industry or in post grad studies. We'll be pitching two game ideas this Wed, one of which will be fleshed out into a Game Bible, accompanied by Gantt charts, intense UML diagrams, and than development into a polished product (well I hope). Despite lack of final exams, coding labs, we are busier than ever. I particularly took on the role as project officer, and my main job has been to keep the team on track (I was lucky enough to be part of the ultimate dream team of programmers, and this has been largely a non-issue). But I think most importantly my job has been to motivate and inspire others.

My approach has never involved, criticism (constructive or not), and it has always been about hands off leadership. In certain cases this is very dangerous, and I would recommend this for everyone. My method is based on inspiration. I work hard everyday, and don't ask the same of others. If you wait long enough, people begin to feel uneasy, and soon enough you'll be shocked and amazed at the sort of things that they will do without even saying a word. I think the job of any project leader is to do one thing and one thing only. Make the job of other easier, and more productive. As long as you can justify what your doing as such, your safe, and in time you'll gain the sort of respect that doesn't go away. Better yet, you make friends.

I've got a new website up btw.
http://www.michaelkofman.com/

It's in development-ish, I don't do web design anymore, and I actually had to spend a good minute to get back into CSS yet alone learn some PHP (I just can't take it seriously, no matter how hard I try). Hopefully in the coming months I'll beef it up just a bit, and feed my obsession for perfection.

My immediate goals are to drive the game project forward, and keep up with my other duties ( a Mars based education game for NASA, a research internship for AI, and the ever difficult task of maintaining a proper living environment; cooking, cleaning, laundry, paying the bills ).

I hope that Artician is doing well without me trolling the forums and new submissions. Eric is a great guy that is determined and I'd go as far as to say destined for great things. Along with Henry, one of the few people who I can truly be myself around, I wish you guys the best and of course keep on doing what you guys do!
Category: Computers & Internet - Programming & Web Development Tags: game development
Tuesday July 17th, 2007
I wrote this today in record breaking minute and thirty seconds.
Below is a Doubly Linked List with support for backend and frontend insertion.
This again more C++ code, but someone somewhere might find it useful as it's fully optimized.
Oh yea, this header file also comes with it's own walkie class, or Iterator if you prefer. Basically speaking it allows for indexing.


#ifndef DLLIST_H_
#define DLLIST_H_

// Authored by Michael Kofman
// July 17, 2007

template <typename Type> class DLLIter;

template <typename Type>
class DLList
{
private:
friend class DLLIter<Type>;
struct Node
{
Type m_data;
Node * pNext;
Node * pPrev;
};
Node * pHead;
Node * pTail;

public:
// DLList : constructor.
DLList ()
{
pHead = pTail = 0;
}

// ~DLList : destructor.
virtual ~DLList ()
{
clear();
}

// addHead : append a new item to the front of the list.
void addHead (const Type &v)
{
Node * temp = new Node;
temp->m_data = v;
temp->pPrev = 0;

if(!pTail && !pHead)
{
temp->pNext = 0;
pHead = pTail = temp;
}else
{
temp->pNext = pHead;
pHead->pPrev = temp;
pHead = temp;
}
}

// addTail : append a new item to the back of the list.
void addTail (const Type &v)
{
Node * temp = new Node;
temp->m_data = v;

temp->pNext = 0;

if(!pTail && !pHead)
{
temp->pPrev = 0;
pHead = pTail = temp;
}else
{
temp->pPrev = pTail;
pTail->pNext = temp;
pTail = temp;
}

}

// clear : clear out the list
void clear ()
{
Node * temp;
while(pHead)
{
temp = pHead;
pHead = pHead->pNext;
delete temp;
}
pTail = 0;
}

// insert : place a new item directly before the index
// passed in. Do nothing on a bad iterator.
// Note : iterator will point at the newly inserted
// item after the function call.
void insert (DLLIter<Type> &index, const Type &v)
{
if(index.curPos)
{
Node * temp = new Node;
temp->m_data = v;

temp->pPrev = index.prevPos;
temp->pNext = index.curPos;
index.curPos->pPrev = temp;
index.prevPos->pNext = temp;

index.curPos = temp;

if(!temp->pNext)
pTail = temp;

if(!temp->pPrev)
pHead = temp;
}
}

// remove : remove (and delete) the item at the index
// passed in. Do nothing on a bad iterator.
// Note : iterator will point at the item after the one
// removed after the function call, or NULL (bad) if
// the tail is the one removed.
void remove (DLLIter<Type> &index)
{
if(index.curPos)
{
Node * temp = index.curPos;

if(!index.curPos->pNext) // Removing Tail
{
if(index.curPos->pPrev)
{
index.list->pTail = index.prevPos;
index.prevPos->pNext = 0;
}else // Removing last item in List
{
index.list->pHead = index.list->pTail = 0;
}

}else if(!index.curPos->pPrev) // Removing Head
// Did not include extra empty list check due to presedence
{
index.curPos = temp->pNext;
index.curPos->pPrev = 0;
index.list->pHead = index.curPos;
}else
{
index.curPos->pNext->pPrev = index.prevPos;
index.curPos->pPrev->pNext = index.curPos->pNext;
}

delete temp;
}
}
};

template <typename Type>
class DLLIter
{
private:
friend class DLList<Type>;
DLList<Type> * list;
typename DLList<Type>::Node *curPos;
typename DLList<Type>::Node *prevPos;

public:
// DLLIter : constructor.
DLLIter (DLList<Type> &listToIterate)
{
list = &listToIterate;
curPos = prevPos = 0;
}

// ~DLLIter : destructor.
virtual ~DLLIter ()
{
delete curPos;
delete prevPos;
}

// beginHead : start the location at the head of the list
void beginHead ()
{
curPos = list->pHead;
prevPos = 0;
}

// beginTail : start the location at the tail of the list
void beginTail ()
{
if(list->pTail)
{
curPos = list->pTail;
prevPos = curPos->pPrev;
}
}

// end : only return true when iterator is NULL
bool end()
{
if(curPos)
return false;
return true;
}

// operator++ : prefix ++ operator for incrementing
// iterator to the next node in the list.
DLLIter<Type> &operator++ ()
{
prevPos = curPos;
curPos = curPos->pNext;
return *this;
}

// operator-- : prefix -- operator for decrementing
// iterator to the previous node in the list.
DLLIter<Type> &operator-- ()
{
curPos = prevPos;
if(prevPos)
prevPos = prevPos->pPrev;
else
prevPos = 0;
return *this;
}

// current : extract the element at the current location.
Type &current ()
{
return curPos->m_data;
}
};
#endif