I am trying to make a game where the person can create their own character, but instead of using a character builder, i want the person to be able to draw their character. how do i code that in c# so that they only have to draw their character once, and the code can animate that character without the player having to do very much except draw their character on the screen?
One way to do it would be to make the character consist of different parts. I'm currently working on a 3D game, and I have written an exporter for Blender in Python that takes the currently active (selected) object and exports it's data and then goes recursively through all of the object's children and their children and so on, so I end up with a sort of a file with a tree like structure where there's one root object (the first one written) and the other ones are laid down after it, and they all have number of children written as part of their data so the parser (written in C) knows how to reconstruct the entire model tree so I can translate/rotate/scale any part and all it's children will have the same transformation applied.
So, I'd suggest doing a similar thing, just making things fixed. For example:
- You have an interface where a user can draw a torso. Besides actual pixel data, you can also let them put where the head and extremities will be attached, sort of a pointer that they can drag around and place where they want. Then, when the user goes to draw the head of the character, he should be able to see the point where the head connects to the torso and draw around it. Same thing for legs and arms.
- Then you can load that data (pixel values and joint positions) and draw them accordingly.
- Animate them relative to their respecting marker's positions.
- Something like this: