Advanced User Interface and Command Interpretation
While my main goal with this game is to faithfully recreate old style text based games, there are several things I do not think I will remain faithful to for the sake of improvements. First and foremost, the command system. These types of games often had issues with useablity. Due to limitations with the systems of the time, there were not many ways to have many commands. The users would often have to enter very specific commands, which were sometimes difficult to guess. My goal with this system is to eliminate that problem. Instead of only a few commands working, in theory every command you could ever think of (within reason) would work.
While the idea in itself isn’t complex, my implementation is. My hope is that more work on my end will make it easier for users. I want users to spend their time enjoying the game, not wondering what commands will and won’t work. It will work as follows: The user will enter a command. Commands consist of at the very least a verb. However the user can choose to enter a noun with an adjective, or just a noun. If the users enters an adjective it will eventually become part of the noun, but more on that later. After the user enters a command the first step is what I call translation. The translation phase is one of the most complex, and is the phase that would cause latency. There are two core directories. Each directory is handled by a different core, giving them their name. Within each one are three directories. One for verbs, one for nouns, and one for adjectives. Within each one is a series of files, each one with a numerical code. Each one of the codes represents a valid verb, noun, or adjective. Within the files is a list of various version of that command that the user may enter. This includes different words, typos, various types of capitalization, and with various characters in front. The translator looks through both core directories at the same time through the use of multithreading. It looks through each file for what the user entered. When it finds it in a file, it sends the number of that file to the next phase, the interpretor. However, the interpretor does not take in a noun or an adjective, it instead takes in a condensed noun.
The condensed noun is complex. The function that forms the condensed noun has several functions. First it checks to see if the user entered a noun or adjective. If not then it gets the condensed noun from the question. Every question has a condensed noun built in just in case the user chooses not to enter a noun. The condensed noun the question provides is that of the most likely object to be referenced by the user. Every condensed noun is unique. It contains an object type and an index. Therefore every object in the game has a unique condensed noun. If the user has entered a noun or noun and adjective then this function also has the ability to figure out the condensed noun code of the item the user is referencing. I won’t go very into detail on this process, as it was hard enough to plan, let alone attempt explain in such a condensed way.
After all this all the data is sent to the interpretor. The interpretor then runs the command the user entered. All the user will do is enter a command and enjoy the game. All the hard work will be done by me before the game even reaches beta. I will of course continue to update it throughout early access and even after release. One big problem this system has is a chance of input latency during the translation phase, as the computer has to read through potentially dozens of files to find an exact match. The multithreading is my first attempt to optimize this process, and I will continue to make improvements to the speed and accuracy of this system before and after release. Once the game is out, the game will not be changed, but I will release patches and engine updates.
Thank you all for your support. I love working on this project, and I hope all of you will love playing it.
0 comments