An even bigger update this week! I made a lot of headway on my academic commitments (one of which can be seen at the bottom of this update) and so I managed to carve out quite a few evenings to really focus on game development for a bit. This week I added the current list of every single standard conversation option (which is then generated for each culture when spoken), implemented the scroll bars for going through some of the longer lists, allowed the player to change their dialect and see what they can see in each dialect (I haven’t yet decided how much dialect knowledge will be present in this release – we’ll see), and then implemented a system for keeping track of all the meta-questions (such as “Please tell me about [novel]”) and what dialects the player can say those in! Lots of big progress therefore, and all the underlying aspects of the conversation system are now there – except selecting options and having them appear in the conversation itself – and all the elements of the dialect generation system are now there – except for exhaustive generation of every possible statement. My task for this week, therefore, is to make as much progress as possible in these two areas. I have no idea how fast/slow these will be, but I’m confident about having something solid to show you all in a week from now. In the mean time, though, here’s some more detail about the latest developments:
Conversation Options
I’ve created a draft list of every single default conversation option in the game. I haven’t actually counted them up but there are several hundred default options, and these will be available in every conversation, as well as another hundred or so “default” options limited to a specific class of NPC (so you can ask a guard about guard duty, an archivist about their archives, etc etc). Here’s a screenshot with an entirely incomplete section of potential default questions, and a gif of looking through the default question options for a whole bunch of conversation options:
I’m sure I’ll keep adding new questions here, but I’ve built the rest of the technical architecture (i.e. the parts more complex than the lists shown here) in such a way that just adding something to the lists here will implement a new question in all the relevant parts of the game’s code where it should be, and allow me to put in a system for generating that question. You’ll also note the different colours! After some excellent thoughts in a comment last week, there is now a range of knowledge the player can have about a given sentence. A green diamond means you can say it perfectly in that dialect; a red diamond means that there is absolutely no chance you will say it correctly; but the interesting ones are the numbers, which range from 1 -> 9 and mean you have a tiny -> very high chance of saying it correctly. If you select one of those options, a die will be rolled to decide if your character says it correctly. If they do, that sentence is then elevated up to a green diamond; if no, it is reduced by 1 or 2 (we’ll see how this goes in gameplay) making it harder to correctly guess next time you try (since you thought you knew it, but didn’t, so actually have less info than you thought). In terms of how these numbers will go up – learning a single sentence in a dialect will means that X other unknown sentences in that category will be moved upwards by Y values; X and Y will be both dependent on the size of the category. The “greeting” category, for instance, only has three options – “Polite Greeting”, “Neutral Greeting” and “Blunt Greeting”. If those are all at values of 0, and then you hear someone give you a polite greeting so that becomes a 1, the others will also immediately go up to around 0.3, for example. By contrast, the ideology category contains almost two dozen standard entries, so learning from from 0 -> 1 might add a 0.1 onto three or four of the others. This means two things – firstly, some interesting and I think valuable chance-based gameplay where you decide whether or not to risk a sentence you might be able to say correctly. Secondly, the player character’s knowledge of a particular dialect will be a more gradual development process, rather than an absolute (although some things will still immediately move you from “0” to “1” knowledge). I think this is a really good development, and I’m so glad it was suggested last week – it also makes the UI look far more interesting!
Scrolling
The scroll bars in the conversation window now work correctly. I don’t know if any of you have ever tried to program in scroll bars, but these things can be surprisingly nightmarish to code, I’ve found, but they all work rather nicely. Here’s me scrolling through the list of dialects (which is entirely complete for now, but will of course start off almost empty in future versions) and the scroll bar adjusting appropriately. I know it’s only a small thing, but these sorts of UI elements are definitely important when you’re going to have potentially large volumes of stuff to look through. Which leads onto the next section…
Search
On the topic of large volumes of stuff, I’ve also implemented the system for being able to search through a particular block of possible questions and narrow them down based on some typed letters. As you type letters into a particular window, they show up at the top; backspacing then remove them; and the game quickly updates the list of possible questions. Here’s an example of – I typed quite slowly in this example to show the list shortening, as it shortens quite fast as soon as you’ve got a few letters in there, and then backspaced back and typed in quickly just to demonstrate that the system works effectively. In the future, therefore, even in conversation categories where there might be hundreds of options – towns, artworks, novels, etc – you’ll be immediately able to just type in “Red” to find the “Town of Red Eagle” in a second without having to scroll through potentially a hundred options. I was actually very surprised by how easy this turned out to be – I was expecting implementing search functions with large volumes of entries to take far longer. Here’s a gif of me typing in “when” into the “Past Life” category – this short category is not one you’d necessarily want to search, but it illustrates how the search function works (note the “when” appearing at the top of the window as you type it, and then the questions are narrowed down).
Changing Dialect
You can now change dialect. Selecting a new dialect switches the player’s current_dialect value, and all the conversation options then update based on whether or not you know the new dialect. Fairly simply, but obviously important. For now, all dialect knowledge is totally randomized for the sake of testing – not sure how I’ll leave this for the release. Depends on timing!
Meta-Questions
I’ve also implemented a draft list of meta-questions. There are the “What do you think of X” questions where the full list of such questions slowly expands as the player discovers more and more of the world. As there aren’t too many of these meta-questions, these are just being stored in a separate list. These won’t be present in the 0.8 release, as these need integrating with the system that’s going to replace the encyclopedia in the near future, but the basic implementation is there. This will probably be one of the first things I start doing for 0.9, although since 0.9 will include generating weapons and armour for soldiers and guards, and it has been a long while since I did any artwork, it might be hard to resist starting there…
What next on conversations?
This coming week I’ll start developing the sentence generation. All the “abstract” dialect generation is in place, so the game can select word elements, appropriate cultural/historical/geographical reference lists, sentence complexity for a dialect, various ways of speaking about various things, and so forth, and so now I need to translate this into actually spawning different sentences! I have a good idea of how to structure this, so it’s time to get started on that.