I discovered a really awesome library for scientific C++ programming called Blitz++. It implements almost everything what I also implemented for my game, cause I do heavy array operations to get my stuff done. It's really an awesome source of inspiration, especially cause it uses an similarly extreme amount of operator overloading I could use, to. It's stuff like accessing arrays using array(x,y,z) or that makes it worth reading. I feel that they took they their job serious and performance-oriented, almost charming by the fact that they released under the GPL license! I'm currently reading and constantly thinking about how to apply some interface decisions they've chosen for their classes. It's awesome! I can't stop reading it, even if don't like to use vectors or so. My stuff shares such a similar base with them, sometime I should implement it. And I think it's best to create a multidimensional arrays, too. At first I thought it'd be pointless, cause I can still create and access it normally by using Array(vector.product()), array[vector.offset(size)], etc. But well - this destroys readability a bit. And that's one of thing that brought to coding all this stuff - improving readibility and motivation by giving the best possible interface. I started my ascii raytracer while I was in a heavy learning phase. I'm still learning, but who isn't? The difference is that I'm more experienced now and know how to keep stuff flexible for later uses. However, a multidimensional array class derived from a normal array class brings all benefits of the old array class, including one-dimensional access, functions and whatever not along with the multidimensional variants. So far, so good. But I'll still have to hardcode loops depending on how many dimensions there are. Not sure whether it's useful to do recursive inlining here - another could be to rely on an old recursively inserted template system, but that was kind of ugly and tricky to work nicely. I don't know, I should start converting this part into a better meta programming system that using normal recursion. Yeah, that might a solution. However, at first I want to finish my general dimensional class so that I can use it like a native datatype in C++. That's my current goal, the next one is to tackle multidimensional arrays as these make up the other essential component for my videogame.
It's coming slowly together, unfolding like a rotton onion in a forgotton tomato salad. For my goal is clear and my mind sharp!