Flamingo Dev Log

Never Trust A Software Developer

leave a comment »

I’ve learned quite a lot developing Flamingo so far, though there isn’t a lot to show for it yet. Near the top of that list is that Software Developers lie (just take a look at 3dRealms’ track record). “Mostly Done” really means it’s about time for a rewrite in the software world, which is the case for the Flamingo math module (it’s named fmath so as not to override the built-in math module in Python).

The reason for the massive fmath refactoring is mostly lack of foresight on my part. The old version was very rigid and concrete, it was hard to get much done, and it was slow. The new version supports the abstract notion of Coordinates, Polygons, and Matrices, making it much more flexible and extensible. As a result you can now use tuples, lists, the concrete Vector class, or your own Coordinate class to show coordinate points. The same is true for Polygons (and, by extension, the Rect class which will be the basis of much of the rest of the engine). Matrices, however, are best handled by numpy. The wonders of Cython will also be taken advantage of in fmath and all of Flamingo.

This refactoring has gotten me thinking a lot about the rest of Flamingo and how it’ll be pieced together. I now know that I want it to be as easy to extend as possible, making it useful for people other than myself. For example, I need a way to make it easy to roll in a new audio engine or sprite system, which I suspect developers would like to extend. I’ll have to draw a line somewhere, though. What sections do I make concrete? What parts don’t need custom functionality by someone? Striking a balance poses an interesting problem.

Next up after the final touch-ups on fmath is the general rendering system, which will take advantage of OpenGL. I’m not going to go too far into this because I want to get started on the audio component soon (experience with Opossum tells me that it’ll get pushed to the end, at which point it’ll be too hard to integrate into the rest of Flamingo).

Source Updates
The repository has been updated so you can download the trunk without adding the installation path to PYTHONPATH (which is much more convenient ). The source is located here. The new fmath is not there yet, but it will be shortly.

Advertisements

Written by bradzeis

December 28, 2009 at 9:48 pm

Posted in Flamingo

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: