Search Unity

Top Down 2D NPC / Avatars - Best Design for this.

Discussion in 'General Discussion' started by andrew210, Sep 24, 2014.

  1. andrew210

    andrew210

    Joined:
    Apr 23, 2014
    Posts:
    241
    Hello all,

    I'm creating a top-down 2D rpg and as part of this need to create a large number of varying NPC's. The uninspiring video below shows my little avatar walking about and talking to one of the NPC's.



    Coming from a Flash background, all our NPC's were stored as vectors and drawn to a texture atlas when we needed them only, which saved quite a lot on file size.

    This time around the best method I can think of for making customisable NPC's is:

    • Have an atlas containing all the possible body / clothing parts for every NPC
    • Create a Game Object which can contain any number of the above parts as children.
    • For each child of the game object, allow tint, scaling and x/y offset information.
    Is there a better way to do this? I did originally want to create a fully customisable avatar system and let the NPC's be created using this system, but as every avatar part would also have to be animated by hand, I decided I don't really have the resources to go with that approach.

    I have access to Toolkit2D (which I'm using for the tilesets), if that could be utilised in any way for this.