Quick progress report.. or lack thereof.
I have not been putting the time into this recently due to extended family visiting and doing the host / tourist guide thing... but I started working again today. All I need to do is add the dynamic word list building and the engine is basically ready for final command processing. The problem is I seem to be going in circles. You see the entire leevlinitilises through the reading of data files but the ACTIVE COMMANDS and TARGETS need to be dynamically initialised latter in the program flow as they need to dynamically build every time the player moves to a given area. The problem is that I have been trying to shoehorn in this dynamic code into what is essentially a bunch of code the creates constants for the entire life of the program. I am half way through but I have this feeling that I am just creating an ever-expanding knot of ropes crossing every which way. There is just to much referencing other classes and going back and forth with data. The entire thing feels like a mess and it is confusing to me and I wrote it.
I really think what I need to do is split the Area Initialisation and Area Activation into separate classes and then split all the word list stuff into separate classes. I originally thought the more I kept it together the better, it seemed a waste to have a class for what is essentially a single function, but during run time I am finding things are initialising more than once, as the constructor for the "large" file is going every time it loads a part of the data it is looking at .. stuff like that.
This is super annoying as rebuilding the entire area phrase is basically rebuilding how the engine constructs the game world and is a significant re-write. I tried to get around this by removing class constructors and building sub set initialisation functions.. like CommandList.Init_Nouns(); So only parts of the class initialiser certain points in the program but this is where the spaghetti-figation started to really get bad.
I can't see any alternative than rebuilding how my gameworld initialises. It shouldn't take to long as most of the grunt work with the actual data reading code and processing should be directly transferable.. it is more about when in the codes line it all occurs.
Thanks for Reading