I want to make a game with character choices. I am currently under the impression that I should create a basic character scene, that based on menu action, has a child scene containing specific character stuff added to it.
So basically. I have a generic scene with a characterbody and a script which will call down to it’s to-be-added specific scene containing mesh and specific character functions.
This should work as long as I’m careful, but I’m mostly worried about where to store all the needed scene references. do i just add a bajillion preload vars to the basic script, is that ok?
Also is this even the right way to do it or should I pivot before I go to far with this?
The basic character scene is placed within an arena world scene. When switched to from a menu, that scene is told what character data to instantiate as a child of the basic scene.
This is my method of trying to uniform the characters, having them all technically be controlled from one single scene, which calls to it’s child containing all the specifics, which when called controls the main.
Yes, your characters should always be on separate scenes. You can just do right click->Save Branch as scene if you already started working on your main arena.
If you have some sort of character selection screen, you could just store a variable with the character position, then instantiate the new character and then free the last character and place the new character on the position of your old character.
Ok thanks! Not quite what I was looking for but it seems I was looking for an overcomplicated solution! One last thing. Is it ok to have a bunch of preloads if I’m working with a large variety of assets? Or is the performance cost minimal?
You could just load them on demand, using load(). Otherwise they’d probably take a long time to load. Like, for instance, if you have like fifty 3D characters it’s probably better to just load them on demand, when the player selects one character, you load them there, instead of preloading all 50 characters for no reason.
You could preload the character portraits, which is lightweight and then when the player selects the character, then you load() them.
I don’t know if I’m making myself clear.