Player customisation: Changing character game object/s based on player selection

Scenario 1: If I have 1 character where I want to change only the skin depending on the players selection.
Answer: Just change the animation associated with that game object and within that animation have a different sprite?

Scenario 2: Scenario 1 but instead of changing just the skin, changing to a new character with its own collision object, scripts etc.
Answer:

Scenario 3: Scenario 2 but imagine the character is made up of 3 game objects. A body. A weapon. A shield. All of the 3 game objects are more complex than simple reskins. For example you might start with a pistol gun, then swap it out for a sword. Collision objects will be different sizes, scripts will be different, sounds etc etc. What is the best way to swap a game object that makes part of a character (held in a collection I guess?)?
Answer:

Can anyone provide any examples or tips on the best way to approach this? Best way to store all of the game objects/sprites etc?

For #2 it would make sense to have different game objects for the characters, but perhaps use the same scripts. And spawn using a factory per game object type.

For #3 it is probably best to use a collection per character and spawn using collection factories. Or use game objects and spawn the weapon you need and child it to the player character.

3 Likes