Polishing the Game

Last time I mentioned that it felt like our project only had the finishing touches left in order to be done. I was right! Last week we finished getting all of the stuff required for the project implemented. The game has all the room requirements implemented, including 15 rooms in the game, and each room has multiple features you can interact with in various ways. The rooms also all have multiple descriptions, including rooms where there are obvious items lying on the floor, which is stated to the player when they enter that room. There are over 80 “objects” in the game with which you can interact. We have implemented tons of language into the game, including all the required language, but also have implemented lots of different words in which a user might use to do the same thing. The user can also save and load the game from a previous save file. With all of the requirements met we have moved onto polishing the game. We are currently doing manual testing and have already identified some things we are wanting to add for a more user friendly experience. For example, one of the required verbs a user can say is “look” which lets the user see the shortened version of the room description. Until this week using “look” on any other target other than the room gave an error message “that room does not exist,” but now the error message reads “look is only for rooms, try inspect instead.” This lets the user know there is another word they can use as a similar operation for “look,” even if it is not the same operation. We also realized that some players may get stuck in the game, and without any obvious map which the user can see, we decided it would be a good idea to add a “hint” method which lets the user say hint and then tells the user the next objective they are trying to reach.

Although we have the game requirements met, and some polishing started we are coming up with new ideas all the time. For example, I just came up with an idea while writing this post, where we could implement a map feature, which allows the user to see a map of the game to help them if they get lost. However, the polishing is truly where the blocks start to become larger. Adding fancier components with the game means fancier problems. Since we have pretty much been a team of 2, it can be hard to find the time to work together on such problems. However, whenever we get stuck on a problem we always reach out to the other for help. I have spent many hours in a discord call with Jake trying to figure out errors that are thrown or figuring out ways to write a method in, debugging as we go. Having such a great partner has been a tremendous help, as I have never written any form of game before, so it has been a crazy learning process. Along with Jake helping me I have attempted to have ChatGPT help me fix problems in my code, however it has never actually been helpful, as it tends to just tell me things I already know. An example of this would be: I ask it “What’s wrong with this chunk of code I added where it is now throwing this error,” and it says, “There could be flaws in the logic of your code.” So, I have quit trying to ask it for help and instead just debug or have Jake look over it with me.

In terms of debugging, I generally attempt the built-in debug program that PyCharm has. This far, it has worked amazingly. When I was trying to implement the error message I mentioned earlier I broke one of the unit tests, and could not figure out why it was broken, as it appeared to me that the logic was there. By using the debugger I was able to see at exactly what line the message was set at, and where in the code it was pulling the wrong message from. I already knew where the message was coming from, but seeing the process helped me think about what was missing from the unit test that would cause an error to throw. Once I was able to identify where exactly in the process that the error was being created I was able to figure out that I had not created a Mock for one of our functions. The test had not previously needed the Mock, as that function(get_room_by_name) was not used until I newly implemented it into the function(look) I was trying to change. Of course, sometimes even the built-in debugger can be confusing, which then leads me back to asking my partner for help. He has loads of experience with debugging, so in some ways he is also a great debugger!

Print Friendly, PDF & Email

Posted

in

by

Tags:

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *