Character appearances

I wanted to know how you’re able to make characters with different looks such as wearing different shirts.

Example:

Guy with a white shirt and blue pants.
You remove the white shirt.
You have the guy without a shirt and has blue pants being shown.
You equip a red shirt.
You show the guy with a red shirt on and blue pants being shown.

I want to know if you have to draw every possibility the person could look like, or if you have something like a layer-system for the different parts of the character. I can see this becoming VERY tedious for EVERY possibility a game might have, which could be thousands of combinations easily.

I wanted to know how you’re able to make characters with different looks such as wearing different shirts.

Example:

Guy with a white shirt and blue pants.
You remove the white shirt.
You have the guy without a shirt and has blue pants being shown.
You equip a red shirt.
You show the guy with a red shirt on and blue pants being shown.

I want to know if you have to draw every possibility the person could look like, or if you have something like a layer-system for the different parts of the character. I can see this becoming VERY tedious for EVERY possibility a game might have, which could be thousands of combinations easily.

In SDL if theres are 2 pictures blitted onto a surface, blitted in the same location, the one that was blitted second will show up.

Example:

u blit an image which is a red square 20x20 pixels onto 0,20
then
u blit an image which is a blue square 20x20 pixels onto 0,20

in the end only blue square will display on the screen as they occupy the same position and blue square was blitted second.
Same in your problem, just blit the naked guy, and then after that blit the clothing parts onto him just like that, having pants/shirts/other stuff imae files, or 1 spritesheet so its cleaner;

Dont see what more to say, I rly suggest reading some tutorial before asking questions thou, because if u ask such a question u most likely miss the most basic basics which is color keying:

http://lazyfoo.net/SDL_tutorials/lesson05/index.php

Thank you for the reply SmokeScreen.

I figured that’s all it was. I’ll just have the character go through a few surfaces inside the character class so they are all put in accordance to their layer and then render a single image on the screen to save processing power.

Thanks!