I am writing a mafia RPG game where it is required to hire "goons" to be part of your family, I have about 10 "goon" avatars/artwork (+ retina) already and am hitting a problem.

The problem is that for every avatar I imply a character (with stats), so if I have,

avatar001.png = {Character: Bob Health: 100 Skills: ... }
avatar002.png = {Character: Mike Health: 100 Skills: ... }
avatar003.png = {Character: Alan Health: 100 Skills: ... }

The implication is that these 10 pieces of artwork I have are 10 specific characters, with specific names and stats.

This causes me a problem in that in order to get a good selection of goons, I'm going to need a lot more than 10 avatars; probably even in the hundreds if not thousands.

Bottom line, To do this, it's going to be expensive.

The way Tiny Tower did it was to have a template and use this, and I've thought of a similar solution -- a faceset generation tool, but I'm mot sure if its going to work; all the current goon avatars I have are custom designed and would not lend themselves to 1-4 generic face templates.

The only solution I have right now is to,

Just use the 10 avatars I have and randomly generate the name, stats, class levels or whatever -- and don't worry about it.

But I don't know if this is good enough and I'm looking for alternative solutions -- how would you create character avatars without spending loads on literally thousands of avatars?



2 Answers 2


Right now, you are mapping avatars to characters. The first thing I would do is flip that around. In my game, I have the following:

  • Every object that has to updated and rendered (e.g. Enemy, Player) is a GameObject.
  • A GameObject holds different modules, like one for rendering, one for collision detection, etc.
  • Each child of GameObject holds state unique to that child.

As a result, I can now serialize my objects using a blueprint. I'm using protobuf for this. In your game, you could have the following blueprint:

name: "Bob"
type: eGoon
health: 10
skill {
    type: ePunching
    quality: 70
skill {
    type: eStabbing
    quality: 60
skill {
    type: eRunning
    quality: 100

This will create "Bob", who is a bit of a glass cannon.

As you can see, it's now very easy to define new blueprints for your goons. But back to the problem at hand: unique artwork. It really depends on your type of game, but you could store it in the following manner:

avatar {
    background: 2
    face: 1
    nose: 1
    mouth: 2
    eyebrows: 3

Now you create a bunch of different backgrounds (sea, docks, city, etc.), a bunch of different face templates (large, small, wide, thin, thick, etc.) and a bunch of different facial features (large nose, thin eyebrows, small mouth, etc.). Now you can create your avatar by combining these features.

However, you will have to be careful that the features match with each other. In your game logic, you could put constraints in your random generator. For example: don't generate a small mouth when you have a big nose, because that looks silly.

  • \$\begingroup\$ +1 however dependent on the game it really wouldn't matter if it looked silly at all... I know i'd find it amusing but thats me :) \$\endgroup\$ Jul 26, 2012 at 9:58
  • \$\begingroup\$ It does seem that I need to get face generation done, I need to speak to my artist about this and see what can be done. \$\endgroup\$
    – zardon
    Jul 26, 2012 at 15:25

If you really need that many avatars I would look into combinations (like police does when making faces of suspects). Have 3-4 face shapes/colors, 3-4 colors of eyes, 3-4 shapes mouths and noses, ears, etc.. Maybe some more distinct features (eyepatch, cigar, scar). However this way will require additional effort to hide the fact that they are stitched from half a dozen of patches.

In 3D I would suggest morphing like many 3D RPGs do these days.

  • \$\begingroup\$ I should have pointed out that the artwork is in pixel not 3D, but I like the concept of 3-4 face shapes, noses, etc \$\endgroup\$
    – zardon
    Jul 26, 2012 at 15:24

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .