How do I creat a character creation menu. What I mean by this is like in deltarune when you get to make your own character by selecting pre-made heads, bodies, and legs. Then you get to select personality, favorite food, etc. All of it gets deleted in the end of creating the character but that’s besides the point. I would like to implement that but without the deleting feature. (You actually keep the character you created.)
What’s your experience doing games?
Litterally none lol. I have coded in Python though so that’s a start.
What happens is that there are tons of ways to create a character selection screen (and even more ways to do a character creation screen, which is much more complex).
So technically it is perfectly possible to make a character creation screen in GD, all the parts necessary for it are there, but in the case of explaining how to make one I would probably end up doing it for you.
In the game I’m currently developing the main character will be able to change costumes (and the same techniques I’m using could be applicable to hair or physical features). So I can give you some general ideas:
Creating a character requires having different sprites that fit together. It is like dressing a doll and putting on wigs: it is made of parts, it is not a single piece or picture, but an overlay of several pictures, so you must have control of the order of the layers and the Z-position of each object (picture), as well as be able to organize different sprites in different animations on different objects.
If you intend to create a character in a single pose and export it as an image, that takes less effort; but if you intend to create an usable character in a video game level you have to adapt each characteristic for each frame of each animation of the character. Example: if you have the option to add long curly hair, then you will have to create a long curly hair sprite for each frame of each character animation (walking, jumping, falling, etc.) and multiple animations can lead to even more complexity.
Saving the character configuration is a bit easier: you just have to save the value of the variables that indicate what the features of the character are (there are many tutorials and posts in this forum explaining how to save and read data) and then ensamble your character again when reading the stored data.
Those are some that can help to organize yourself with what you want to do, but all of that requires prior knowledge of GD features, use of variables, conditionals, and probably loops, plus some experience.
So would I have to mess around with the x and y layer too much? For all of the different hair and stuff?
I do it in the following way so as not to complicate it too much:
I create all the pieces in a defined size. For example, I have a body sprite (no hair, no clothes) that is 32px wide x 64px high, and that of the hair measures the same and thus that of each feature. Inside the hair picture, which is mostly a large transparent background, the hair is located exactly where it’s correctly overlapped over the head, and so for each picture of each feature.
In this way, all the images share the same X and Y coordinates.
In a previous version of my project I did it with specific coordinates for each picture.
i highly recommend to you to check out LPC sprites over at opengameart.org
Its very easy to do a character creation system with these sprites, since they do work, like erdo was explaining, means you do not need to change the position of the sprites.