Newsflash

Revision 102 PDF Print E-mail
Written by Stefan Hendriks   
Friday, 10 July 2009
Did you know D2TM exists for atleast 8 years? I knew I was working on it for a long time, but it seemed the very first code dated from 2001.

Funny thing is that the entire history of my development as a programmer can be seen in that code. If you had a timeline, and did a little bit of research you figure that I've found out about the singleton pattern at momentum X, and the Factory pattern at momentum Y.

Although I would like to see the code a lot more flexible, a lot less public, a lot more checks in methods/functions and whatsoever, it also clear that I am improving. Noticing my own flaws is a good thing in that sense.

Revision 102 has been committed, I have begun hiding data ("don't touch my private parts!"). Somehow I found all those public fields so easy , but they are hell if you want to debug stuff. For starters, the structure hitpoints are now private, as well as some properties (width/height). The StructureFactory is now responsible for setting some stuff for once and I have also added some asserts to know if methods are used correctly.

I have yet to find out how I can use Exceptions in C++ , because I find them very handy in Java. If for any reason you are grabbing the source, do note that it is in DEBUG mode, that means you have a very weird mode of the game. Meaning: faster construction of units/structures and a nice grid drawn.

(told you this project is not dead! :P)
< Prev   Next >
Copyright 2000 - 2005 Miro International Pty Ltd. All rights reserved.
Mambo is Free Software released under the GNU/GPL License.