Thursday, September 10, 2009

Avatar Core 0.5.0 + My Avatar Editor Lite

It should be noted that the SVN repository has been redesigned to also include documentation, examples, and a library SWC for the framework. The location of the source files have moved a couple of directories deeper as a result, so you may need to make some changes with respect to classpaths/source path references. The ZIP download also reflects this restructuring, though it only includes the source code and the same selection example as before.

I've also combined the two new demos from before (with Fred) into one demo now listed in the SVN examples. It modifies position, scaling, and rotation using mouse interaction. However it doesn't go so far as to incorporate Constrain behaviors. The original demos will probably remain on the wiki for now unless they end up becoming incompatible with new releases.

So what's next? For one, the documentation will need updating. I don't think it covers a lot of the new changes very well and is pretty lacking in other areas too. With that, also more attention given to the documentation on the wiki. Then, its just a matter of tying up and loose ends preparing for a 1.0 release for production use.

13 comments:

Great work with Avatar Core so far! Are you planning on adding a save function to this lite example? If not, could you provide some pointers for it? Also, are you available for hire to make a customized version of this editor (with only few modifications)?

Thank you for your continuous hard work, it is certainly helping me out a ton!

No save feature is planned for this lite example. It serves only as a simple reference example for others to see how the Avatar Core framework can be used.

A method for saving (Flash Player 10+) is available in the original My Avatar Core source:http://code.google.com/p/myavatareditor/

You can also search google for other approaches. For image files, the Viewport class should be helpful with its capture() function and ability to fit an avatar within its view area.http://code.google.com/p/avatarcore/source/browse/trunk/as3/src/com/myavatareditor/avatarcore/display/Viewport.as

I love your blogI do not know your blog until nowI always want crate a mii and finally got, but your avatar creator it's same to mii creator of nintendo wii.why you don't put difernte hair styles, new colors clothes or new glasses to be better that miis?AND please create a avatar(xbox 360)creator ( I love avatar from 360, but need pay to acess xbox live)

The design of My Avatar Editor prevents it from being easy to add new features to the Avatars it creates. It is too tightly integrated to the Mii format used by the Nintendo Wii. If a feature does not exist there, it would not work for My Avatar Editor.

But that is what prompted the creation of the Avatar Core framework. That framework is designed to let developers create My Avatar Editor-like applications with the flexibility of being able to easily add/remove/change features. My Avatar Editor Lite is an example of this, and new features *could* be easily added to that.

I, however, do not have the time to update My Avatar Editor to do this. Not only that, a lot of effort was put into making My Avatar Editor create avatars that look like Mii characters. It would be far too time consuming for it to also be done with XBox 360 avatars, though I welcome anyone who is up to the challenge to do it.

Great work on Avatar Core. I have a question. Is it possible to hold multiple avatars simultaneously in memory that share the same art? I have found (attempting to use Collection.copyCollectionFrom) that the new avatar seems to cannibalise any shared features from the old one!

If I remember correctly, copied avatars/collections purposely copy (clone) individual assets where possible to prevent changes in one affecting changes in another. Standard use of the API doesn't directly support the reuse of Art objects by reference, though I'm sure that could be monkey patched in (or the source could simply be edited to allow that).

I can fix the problem for myself, sure, but copying an avatar isn't exactly an edge case, so you might want to consider taking my comments on board in your own development.

The problem, I think lies in line 146-149 of the Avatar class. The feature is removed from the previous avatar. Perhaps if features were themselves cloneable, the problem would go away? (Because cloning a feature should remove the reference to its avatar.)

I would suggest also, rather than checking for the presence of a method, as per line 131 of Collection:

if ("clone" in item){

... you use a Cloneable interface with a clone() method and have the relevant clases implement that; cleaner and easier to keep track of what's going on.