After some fine-tuning on my game's GUI I am finally ready to begin with the gameplay. But that's a tall order. My game will be something like a 2D platformer with RPG elements like collecting armor, helmets, weapons etc. So with that in mind I begun thinking about a way to create my player. First, I thought a single
Player class would do the job for me but since I want to equip the armor/helmet I've acquired, I quickly abandoned this concept.
Next I got another idea. I could have the player's
Legs to be different classes and each of them drawing its own texture, respectively. So I can swap between different armor/helmet sprites for each of the body parts. But that would seem pretty complex to implement... or not?
Could I have a code example on how you would do this? Which path you would take if you are in my stead? Single
Player class or different body parts classes? If the latter, how would you hook them so that it all looks like a single sprite?