More dimensions

After some bits of annoyance and anger about bit manipulation and how questionable it is to use memoization for a game's essential part, I simply decided to freeze it until I need it or find it more necessary than other stuff. I'm putting my array class into mre than one dimensions and must admit that I can't see ANY reason for having a seperate one-dimensional class then. Slowly everything unfolds how to make certain "special", usually one-dimensional operations multidimensional. In combination with loop unrolling, I hope I can use for simple tasks like adding/subtracting a smaller array component-wise from a bigger array. Such an array is basically just an ordered set vectors, thus it must be possible to define things like adding and subtracting, too. Of course, a pointer/string array or so doesn't have all number operations. I abused template instanciation in my dimension class to warnings of incompatible operators only when instanciating such an impossible functions. I really don't care about it beeing compatible with other compilers or so, but for me it's a useful behaviour I currently don't want to miss in my codebase. That said, I'll just define the same of operations I have for my dimension class for my dimension array class, too. You could use it for almost everything then. Need additive blending in your software renderer? Just call dst.add(src,pos,size) and you're done. Sounds nice, eh? It makes stuff a lot easier this way. I'm kind of re-implementing older stuff in a more versatile and effective manner. It's a cool concept I can use for everything game-related, not only or grid-based games. I'll extend to concept to feature not only rectangularly/box-shaped filling, but a filler system in general. Not sure how to exactly integrate it, but It should work once I implemented it successfully. This makes it also fundamentally easier for me to create an animation system in a grid-based game environment (it'd essentially like rendering shapes into the grid and thus getting all physics/collision information combined with data data and so on. Tackling it n-dimensionally give a lot more ideas how push and a copy stuff from A to B and so on.

However, this is a bit of future music and before anything happens this way, I need to make to class ready for setup.

No comments: