I’m normally pretty ok at naming things in code, but I’m struggling here and would love some new ideas.
I’m building part of a game for the dialog with NPCs. It functions just like Fallout:
- Player initiates dialog with NPC.
- NPC says a few sentences.
- Player gets a list of replies and can pick one.
- Depending what the player picks, either the conversation will end, or the NPC will say some new stuff and start this over.
Here’s the names of objects that I have so far that I’m not exactly in love with. I’d love suggestions on any of these.
- Dialog: This is a “container” object. Clicking on an NPC will start the Dialog. This contains many Chats.
- Chat: This is the name I dislike most. A Chat contains the text the NPC will say, and a list of ChatReply objects.
- ChatReply: This contains the text of the reply (what the player is saying back to the NPC), as well as a pointer to either a new Chat, or to end the Dialog.
Any suggestions?
Update: From the replies, I think I like Dialog / Prompt / Reply.
- Honestly, I don’t think
dialog
is bad for this? Maybenpc_dialog
ornpc_dialog_tree
if you want to be less ambiguous? - Something like
prompt
,query
, ornpc_prompt
maybe? reply
,response
, orplayer_response
? Mayberesponse
could be the container that holds areply
(the text the player says) and a link to the next prompt?
- Honestly, I don’t think
It might be over simplistic, but I’d probably try to be as close as I can to “Conversation”, formed by one or more “Question” and “Answer”.
Dialog, Conversation, Reply
…maybe?
Instead of Chat how about ‘Utterance’ or just ‘Speech’?
Also the other characters response shouldn’t be a different object should it but a different type? Perhaps you should have CharacterSpeech and NPCSpeech inheriting from Speech? And Dialog holds a collection of these?
maybe dialogue [request type -> request -> response]
deleted by creator