Thursday, December 23, 2010

Clixmaker Objects

Four days ago I performed a major rethink of Clixmaker. It's no longer tile-based, but more free-form (however all moving objects except missiles can still only move in 4 directions: up, down, left and right). Today I wrote design specs for objects, groups, and primitives. Primitives are rectangles, rounded rectangles, ellipses, polygons, and bitmaps. Groups are collections of primitives and other groups. Every group has a 3 x 3 linear transformation matrix (a transMat), a parentId value which is always positive, and a linkId value which is non-zero if this group is a link to another group (all child objects of this group belong to another group, and are stored in that group).

Objects are standalone game entities that contain either a primitive or a group. All objects have a transMat, and a parentId value. If the parentId is non-zero, this object is a copy, and also a child object, of another object. If this object has associated copies (child objects), then it must exist on a page, not a field. A field is like a game level where the game action takes place. A page can only be accessed by the game designer, and contains objects, and each of those objects have child objects which are located in fields (or pages). An object has an optional bounding polygon, which is composed of horizontal, vertical, and diagonal (45-degree) lines. Objects which have bounding polygons are stored as transparent bitmaps, and are saved on disk as image files (some image files contain multiple objects). Objects without bounding polygons are composed entirely of rectangles. Every transMat has an isScale flag. If true, the associated linear transformation is a scale or a translation, not a rotation or a shear.

Now I think I have at least designed the foundations of the Clixmaker Field Editor, and can resume coding soon. Yesterday I gave Maria, my cleaning lady, a $70 Christmas bonus. Her first cousin recently won $6.7 million playing Lotto 6/49. Today I visited my friend Constance at the shelter, and gave her 50 dollars for the month of January (I give her $50/month). Tomorrow is our Christmas Lunch at APROM. Today I must give my Christmas gift of $20 to the concierge, which is for the building staff: Gopal, Ejaz, and Raquel. On Christmas day I must wrap my Christmas presents and head over to my brother's place. On Boxing Day I might go to Zellers and buy a winter coat and a pair of blue jeans. In the New Year I might return to Progress Place (I was a member there 20 years ago) and quit my volunteer job at Fred Victor. So it appears that everything is under control and any suicidal thoughts I may have from time to time need not be acted upon, at least not for the next little while. If I don't blog again in the next 2 days, Merry Christmas everyone, and Happy New Year.

No comments:

Post a Comment