Monday, April 14, 2008

Designology

Wow, I've got a full head of steam going now!

I reworked the GUI code where it's starting to look like a real widget framework.

We now have a catalog with multiple pages.

All the zoom issues have been worked out, there just remains a problem with tiling where you see hairline fractures between the tiles when the scale is not 1:1. There's a rounding problem afoot. Maybe I'm supposed to tile to a framebuffer first, and then blit?

When it came time to write classes for all of these new items in the catalog, I thought 'There has got to be a better way!'

So instead of writing a class for each item, there will exist only one class for multiple items of a similar category. For the blocks, landscape and treasure this really makes sense.

As you can see, I decided to go the spreadsheet route again to define the catalog. It works pretty well, just property/value pairs in a row.

The catalog reader is able to instantiate a class, pass the item that was used to create it and also assign attributes on the fly!

This means that it will be possible to create new catalog items by mixing and matching different classes. Say, you want the Boy with a different brain, or with a different image, or whatever.

Okay, I have got stop putting off committing this darn thing to SVN. If you download it just realize it's only two weeks old!

No comments: