Avatars System

Hello!
I need to build a system of avatars using 2D images. The system consists of 12 categories (nose, mouth, hair, etc), of each category is obtained an image (1 image-mouth, 1 image-nose etc) ,these images are combined and form the user’s avatar. The problem is that the rendering of each avatar contains 12 objects on screen (12 OnscreenImage objects) to form the avatar of the user, and if we add the avatar opponent would be another 12 objects, 24 in all, too many objects on screen, I think. Is there any way to generate a single avatar for user given these conditions? As I can optimize this system? Anyone have a better idea to build a system of 2D avatars?

Thank You!

PS: You can not have all the images of the possible combinations of the avatars as they are over a million.

Before I start, are you confident that your current arrangement is a problem? Does it seem to be slowing things down?

That said, the rest of this post is written on the assumption that it is indeed a problem.

The following are off the top of my head and untested: they may not work, but may be worth a shot.

First, do your avatars have to keep the various parts separate (such as for animation purposes)? If not, perhaps–once an avatar has been selected–use the PNMImage class to draw the final avatar into a single image, and show that.

Second, if your avatars do call for separate parts, have you tried simply applying your images to raw quads (perhaps made via CardMaker)? I don’t know how much overhead OnscreenImage has, but using a simpler arrangement of quads might remove some of that.