Multiple playable characters methods
Posted: Fri Feb 16, 2024 9:15 pm
I am creating a rogue-lite that has multiple selectable characters. I am trying to incorporate this into the dialogue system. I've read various posts on the forums about various ways this has been handled, but I'm wondering if there is a best method for doing this that is intended or recommended. Each method I've identified has both advantages and drawbacks.
I have different conversations and conversation options for different characters, and I am also playing audio for voices for each different playable character which eliminates some of the simpler options such as just changing the name displayed for the actor within the conversation.
The main two methods that I have identified that work for this context is to have either a generic "Player" actor, or to have specific actors for each character, set the "IsPlayer" variable on character selection, and then manage it after that.
The main advantages to the first option (generic player actor) is that I can have conversations that start out in a generic manner and can then branch off based upon which character is selected via changing variables within the Player actor and then using conditions to check which character is the one being played. The main disadvantages I can see in this situation is that I need to do lots of conditions all over and that managing the audio clips played for different characters will get complex and can be error prone. I would also have to figure out a different method for playing audio clips since my current method isn't conditional, so using the same node to play different audio clips based upon the selected character would be something I would have to tackle for the 'generic' response nodes.
The main advantages for the second option (Changing "IsPlayer" variable at runtime) is that I can then just split off into different conversations depending upon which actor is the player. I wouldn't have to do any condition checks in this method to determine which actor is the player after switching to the specific conversation for that player. Everything would be less cluttered but much more spread out. This is also the main disadvantage because that would essentially eliminate the generic conversation sections from the other option. I would have to have the same node path in different conversations to have the same interaction, and to change these identical parts I would have to go through each conversation to update them.
I would really appreciate advice on which option is the better one, or if there is a third option that is best which I haven't identified yet. I am hesitant to pick one of the two options because I suspect that there are disadvantages that may reveal themselves to either option once I start to build it out to scale, and I am trying to avoid redoing work the best I can.
Thanks for any suggestions or help anyone may give!
I have different conversations and conversation options for different characters, and I am also playing audio for voices for each different playable character which eliminates some of the simpler options such as just changing the name displayed for the actor within the conversation.
The main two methods that I have identified that work for this context is to have either a generic "Player" actor, or to have specific actors for each character, set the "IsPlayer" variable on character selection, and then manage it after that.
The main advantages to the first option (generic player actor) is that I can have conversations that start out in a generic manner and can then branch off based upon which character is selected via changing variables within the Player actor and then using conditions to check which character is the one being played. The main disadvantages I can see in this situation is that I need to do lots of conditions all over and that managing the audio clips played for different characters will get complex and can be error prone. I would also have to figure out a different method for playing audio clips since my current method isn't conditional, so using the same node to play different audio clips based upon the selected character would be something I would have to tackle for the 'generic' response nodes.
The main advantages for the second option (Changing "IsPlayer" variable at runtime) is that I can then just split off into different conversations depending upon which actor is the player. I wouldn't have to do any condition checks in this method to determine which actor is the player after switching to the specific conversation for that player. Everything would be less cluttered but much more spread out. This is also the main disadvantage because that would essentially eliminate the generic conversation sections from the other option. I would have to have the same node path in different conversations to have the same interaction, and to change these identical parts I would have to go through each conversation to update them.
I would really appreciate advice on which option is the better one, or if there is a third option that is best which I haven't identified yet. I am hesitant to pick one of the two options because I suspect that there are disadvantages that may reveal themselves to either option once I start to build it out to scale, and I am trying to avoid redoing work the best I can.
Thanks for any suggestions or help anyone may give!