Choose Your Adventure
Authors: Derek Tam, Vincent Tan, Yan Li
What is the problem?
We are creating a text based game, where the user will be put into a scenario and given choices that will determine the outcome of the story. Prolog will receive the player's choice as an input, and bring them to the next part of the story accordingly. The choices a player makes could determine whether they get a good ending, bad ending, or something in between.
Github link: https://github.com/IBYanLi/PrologGame
What is the something extra?
Currently, we have not learned how to save states in Prolog, which this game will need to do. The game requires the program to know which part of the story the character is on, in order to determine the next step of the story and eventually lead to a conclusion.
What did we learn from doing this?
It is feasible to program in Prolog for a simple Choose Your Adventure game. We are able to check statements to produce a text output, and store the state of the game in order to give the correct ending. We are also able to give different responses to the same input using a random number generator. However, the game we have created isn't very user friendly, as it has no graphical interface that most gamers would like, and may require additional libraries to implement such a feature.