How do I change the hair on my avatar?

How do I change an avatar's clothes and hair styles using Canvas?

  • I am making an HTML5 game and in one part of it I have to let users create their own custom avatars similar to as shown here: I was asking, as to whether usage of canvas would be a nice idea. Even if we go with canvas,  how to position the various elements that make up the avatar? I.e shoes, pants, weapon, left/right arms etc, etc?

  • Answer:

    I think using images would be a better idea. You can have all you hair styles in as images, then apply the appropriate. Save a param based on which image is applied for the current user. Using an HTML 5 canvas means, you'll have to redraw for every style change, which is a heavy process and can make your application slow.

Rutwick Gangurde at Quora Visit the source

Was this solution helpful to you?

Related Q & A:

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.