Monday, January 21, 2013

c++ == : )

I am by formal education a linguist.  Have always loved languages. 
And having studied and spoken several, I must say that C++ is by far my favorite. 
The more I study it and use it, the more it makes sense.  The more I polish my classes, the more my grasp of the concept crystalizes and clears. 
Classes are a form of structuring not only information but complex concepts, complete with their construction, operation, modification and destruction. 
Of course, I read all of this about classes a long time ago when I began studying it.  But many things don't really sink in until you start to experience it for yourself. 

Work on kyuplex continues.  In my construction of kxEditor I began running into problems and ugly casts with void *pSelectedNode.  I discovered to my chagrin that void pointers can not be dynamically cast.  My mess of classes was proving terribly difficult to work with. 
But the solution is simple.  I need to refactor all my classes to derive from irrlicht classes.  In this way, I can make ISceneNode *pSelectedNode where ISceneNode is the base class for all irrlicht nodes and thus all my classes.
Furthermore I can utilize the built-in functionality of irrlicht's attribute serialization and simplify my level save/load function altogether.  Something I should have done in the first place.
I've already refactored kxQuadPlane and it simplified things in several places : )


This game rocks. (Splice)

No comments:

Post a Comment