... and the Inevitable Conclusion...

After more development, I've finally decided to split the math-related code out of the project into specific libraries:

Not only is this more convenient when reusing them, but the important reason right now is to keep code organized, and, truth be told, the package where I was developing these classes was growing out of control (it originally was a lowly "utils" package... How it has grown!).

The split doesn't just include geometry related code, but I've also split general math-related utilities code into it's own library, as well as fast-math implementations of certain operations.

Now, onwards to refactoring many of the structures, because I've realized the current naming scheme is a mess, and not too representative of the real object implemented.

On a happier note, being able to properly split things like this, somewhat cleanly I might add, really bodes well for the long-term, specially for my goal of having decent modularity!

And now, the hard question... Will I be able to get the Doomie running again soon? Will it be chased by angry polyhedra? Mystery! Intrigue! Pass...ably interesting.


The Wonders of Re-Inventing the Wheel

So I've been working into meeting my next deadline. My usual methodology is to focus on the next piece of code that needs to work, and take it from there... That methodology takes me to strange places.

It first began while perfecting the collision system for the game. I realized the collision calculations could be generalized into a 2d vector class. Which I implemented. But then realized I could split the location information into it's own 2d point class which handled the related distance/location based calculations. And then I though "why don't I take all those mathy calculations and move them to a static library so I can tweak them outside the class implementations". Which in turn lead me to organizing all those static methods into appropriate namespaces...

Suddenly I though "Hey! I'm losing focus!" so I went back to finalizing the collision system. And realized I needed to also check collisions with rectangular areas. But as I worked on the simple formulas, it turned out I needed also to be able to rotate said areas. So they were split into Bounding Boxes and Rectangles. And as I worked on the Rectangle I realized they were, in essence, and specific case of a Polygon, so the whole class was renamed Polygon and a new class inheriting from that one with a limited number of edges was created...

And then I pulled back, realized I had skipped dinner in my excitement, and was too late in the night to cook without bothering my neighbours.

So, in conclusion, I might end up creating my own 2d polygon library.

This, I think, is a good thing. I was considering using an existing library (straigthedge) that provides most of the functionality I need, but as I'm still learning many of the concepts involved, doing it myself, even if badly, is really helping me grasp many notions, which can only help when eventually resorting to using third party libraries.

So I'm mostly venting because despite churning out lots of code, the game is still at roughly the same point it was before, only with a more solid foundation.