JohnBoyJohn / Game_Engine

0 stars 0 forks source link

Talk class / design pattern #10

Open JohnBoyJohn opened 7 years ago

JohnBoyJohn commented 7 years ago

The talk class or the talk design pattern must be improved.

Now the player class stores the lastnpc NPC who has talked to the player. The npc stores the messages to the player and is loaded from the npc class. The problem is now, that the merchant class has to extend the talk class with a question / answer option panel.

I want to design the talk class more abstract and usable for scripting (talk-manager), simple yes/no question and maybe more? Some images for the talking creature? The message must be splitted in more parts, if the message is to long to render on the panel. A writing speed will be nice, for displaying the letters step by step. I hope you understand...

Another issue is the storage system of the messages. The message is now a single sentence. But one character can say more than one simple sentence. There must exist a little decision tree depending on the player answers for first contacts, scripting scenes like intro and so on. I'm thinking about the xml file format for storing speeches right now...

any additions from your site? I never done this before, maybe you have some experience or some thoughts to this topic.

best regards JohnBoyJohn