Monday, August 31, 2009

Avatar Core Updates

A bunch of new Wiki pages have been added for Avatar Core, adding a little more in terms of explanation for the different parts of the framework. When I get around to it (though probably not any time soon), I'll try to include some additional visual aides and maybe demos, or links to demos that cover each specific topic.

Speaking of demos, the source code for the previously mentioned demos have also been posted there (Demos wiki page). However, there have been some problems with the hosting for myavatareditor.com where the files are hosted, so they might not be accessible at the moment.

When writing up some of the additional wiki documentation, I ended up adding a few more things to the framework. In other words, version 0.2.1 is looming. But I also just ran across another issue which is a little more serious and something that could require some additional changes to the API (never fun). I'll have to think about how to solve that problem and weigh in convenience vs. performance and all that jazz. Without getting into too much detail, the problem essentially boils down to art being loaded far often than it needs to be.

Friday, August 28, 2009

Avatar Core 0.2.0

Avatar Core version 0.2.0 (beta) is now available on through svn on the project page. The API documentation has also been updated. The release notes for 0.2.0:

=== 0.2.0 (August 28, 2009) ===

There have been a number of new API changes, as well as a reworking
of how parenting is handled. The new approach allows Constrain behaviors
to work better with parenting. In addition some rendering changes have
been made that change the effects of parent transforms on their children.

- Added Viewport.resetContent()
- Added a padding parameter to Viewport.fitContent()
- Added ThumbnailArtSprite class
- Added SourceLoaderSprite class as a base class for ArtSprite and
ThumbnailArtSprite
- Renamed AvatarArt to AvatarDisplay to prevent confusion with with the
Art/ArtSprite classes
- ArtSprites no longer redraw themselves (i.e. their feature) when their
feature property is set. This was creating many more calls to draw() than
was necessary, though may require additional manual calls for updates
- Scaling a parent feature no longer scales its children; child position,
however, is still affected by scale
- Renamed Transform to Adjust to prevent confusion with flash.geom.Transform
- Instead of mirroring features with a negative scale, flipX and flipY
properties have been added to the Adjust (Transform) class
- Fixed a bug in Adjust.add and Adjust.subtract where x and y were flipped
- Renamed "update"-related API in Feature and Avatar to "redraw"
- Changed parent-related API in Feature (removed getParentFeature, added
parent, [internal]parentCount, [internal]updateParent)
- Features are no longer hidden if their parent cannot be found. They are
instead left visible and treated as though they have no parent
- Added Feature.getConcatenatedParentMatrix()
- Added Avatar.updateParentHierarchy(). This is called frequently through
other APIs but may be necessary to call to make sure the parent
hierarchy of an avatar is accurate
- Added getDefaultPropertiesInXML to IXMLWritable, helping to reduce the
inclusion of default values in generated XML
- Range class now has a steps property
- Separated Constrain.position (Rect) to Constrain.x (Range) and
Constrain.y (Range)
- Removed Rect class (was only used by Constrain before)
- Constrain uses its Ranges' steps, if provided, to apply stepping
to constrained values
- Constrain is now applied to feature adjusts (transforms) rather than
directly to art sprites to allow child adjusts to honor the
constrain
- Added Constrain.name, making it more convenient to access Constrain
behaviors in a feature
- Other minor bug fixes

Complete ReleaseNotes.txt.

The wiki pages, demos, and non-svn downloads still need to be updated. I'll try to get to those in the next couple of days.

New Demos Preview

I've been working with some simple sample applications of the framework preparing for the next, soon to be released build of Avatar Core (0.2.0). The purpose of these samples was to make sure the features that have been implemented into the framework can actually be used when applied in the real world (vs. looking good on paper). The samples will be available for download and presented as demos on the Avatar Core project page when the 0.2.0 build is released.

The two sample demos previewed below demonstrate manipulating feature properties (position, size, and rotation) and the use of Mirror and Constrain behaviors. They use a new character I whipped up for these samples that I like to call Fred.


The source for each demo only amounts to about 150 lines of code - this including the XML descriptor for the avatar (which takes up about 60 lines by itself). Again, these will be available (in FLA form) when 0.2.0 is released, shortly.

Wednesday, August 26, 2009

Considering new Avatar Core logo

This morning I was thinking about making a new logo for Avatar Core. The current logo looks too cold and doesn't really say "avatar" when you look at it, despite my attempts to incorporate an "A", a gear (being a framework), and a character's head - one which ends up looking more like a cycloptic robot.


I was also thinking, given that the project is based off of My Avatar Editor (and hosted from that domain), that maybe the logo should be more reflective of that project. I quickly slapped together two new variations of that logo which could serve as a replacement for the current Avatar Core logo. Anyone have any preferences? Stick with the current, go with one of the new variations, or think about it more and come up with something else?





Granted, the logo has no functional bearing on this project, but it is a fun aside to coding.

Monday, August 24, 2009

Back in the Saddle

I've started to get back into development of AvatarCore (the offshoot project from My Avatar Editor to serve as a framework for new avatar viewing/editing clients). So far I'm mostly just re-familiarizing myself with the codebase. Luckily the getting started docs I wrote weren't too shabby, so that hasn't been a difficult process. At the same time, its also good coming into a project with a fresh eye so it's easier to see where the problem spots might exist. I'm happy to say that it hasn't been too bad so far, though I do wish that some of framework was simpler. It's been a tough process trying to mix simplicity and ease of use with functionality. I'm not unhappy with what exists now, so not much of that will change.

Having said that, I've already been making some changes that are beyond simple additions or name changes, particularly with parent handling, that could potentially have a substantial impact on programming clients using AvatarCore. I'll try to release an update with those changes fairly soon. In the mean time, I had hoped to create some more sample applications to weed some of these issues out. A 1.0 release isn't going to happen until I'm able to whip together some scenario applications covering most if not all of the framework's capabilities.