Thursday, September 10, 2009

Avatar Core 0.5.0 + My Avatar Editor Lite

Avatar Core 0.5.0 has now been released on the project page (both SVN and ZIP download). The release notes have more information about the changes made.

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.

"My Avatar Editor Lite" is now a new demo example. The source is currently only available through SVN, though you can browse the demo source files through the project page. A live version of My Avatar Editor Lite is also viewable online. It's a great example in that it uses a lot of the features of the framework.


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:

m0dx said...

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!

senocular said...

Hi m0dx,

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

As for me, I am not available for hire, sorry.

Gustavo said...

I love your blog
I do not know your blog until now
I 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)

I hope you hear my idea

PS: sorry my bad english, i'm not native speaker

senocular said...

Hi Gustavo,

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.

nikerush2 said...
This comment has been removed by the author.
Joshua Mostafa said...

Hey Senocular,

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!

Josh

senocular said...

Hi Josh,

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).

Joshua Mostafa said...

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.

senocular said...

checking for the clone method is used instead of the interface because there are native objects (such as flash.geom.Point) that could be used and implement no interfaces.

I haven't worked a lot with copying features/avatars but it sounds right that the avatar association should probably be removed for copies. I'll look into that.

Joshua Mostafa said...

Hey Senocular,

I've created that clone method .. have to check if it's OK with my employer (work was done on their time) but would be interested in seeing the patch?

senocular said...

Hey Joshua,

Can you send me information on what exactly your problem was and the use case around your changes? Thanks.

Joshua Mostafa said...

Hmm - you mean more info than discussed in this comment thread .. ?

I can put the details in an email along with the patch for your consideration. I'd rather not go into lots of detail in a public forum as it's a commercial project.

Rodolfo said...

Hi,
I would like to post this doubt in other place but I didn't realize where to post it right.

Why does My Avatar Editor need Flash 10?

Is it possible to remove functionalities and get it working for Flash 9?

My best regards,
Rodolfo