multiplayer game 'wearable clothes'

So, I'm working with someone else to create a multiplayer game in which your character is able to wear armor. I am doing the modeling portion of the game so I'm no expert in the coding aspects. I believe my partner intends to use C++ to code which is why I am writing here.

I wish to make armor which is able to be see by all players when it is equiped. How would I go about creating the armor? Would I create a single character body and then have changeable clothes, or would I make several character bodies for each combination of clothing?
This isn't really related to C++ but more to graphics design/stuff...Anyway, I would just make the body then layer clothes/armor over it.
But I'm asking from a coding standpoint, which way would be better?
It doesn't make much of a difference.
What does make a difference is not having a model for every possible combination of clothing.
Last edited on
You definitely don't want to have a model for all possible clothing combinations for a number of reasons. Imagine if your player has 4 pieces of armor and he equips all 4 pieces. Every single time he equips an item you have to swap the entire model. Instead, lets say your player object has 4 armor slots on his being and every frame you are getting his current state. If say chestArmor = NULL, then nothing gets displayed. But if its not NULL, it will get rendered as part of the player. This is at least the way I do it, I'm not sure what your C++ approach is. What API are you using for rendering and what tool for graphics?
What does make a difference is not having a model for every possible combination of clothing.

Imagine:
10 weapons
10 torsos
10 pants

You can either make them as separate items: 10 + 10 + 10 = 30
Or make all the possible combinations: 10 * 10 * 10 = 1000
Last edited on
Each node (PC) should have the images necessary to compose sprites that represent a player.

The server then only needs to send the codes that indicate which images are needed to compose the player.

The client can then compose the sprite images (on the fly) and then the game can use those sprites to represent said player.
Topic archived. No new replies allowed.