Text Adventure game created using MIPS Assembly Language in the environment QtSpim, with the game taking place in its console.
- How to Run using QtSpim
- How to Play
- Code Overview
^ Make sure the Console window is enabled
^ Run/Continue should cause the game to begin in the console
^ The game is properly loaded and running if the console appears like this, with the opening dialogue displayed.
^ When given "Choose =>" at the bottom of the current dialogue, input the number of the the option you want to go with and hit enter. You cannot backspace in QtSpim console, so make sure you don't type a number before being fully decided.
^ If you give more than one input number or try to backspace, it will take the first thing you typed as the selected option. In this above example, it took option 2 as the user inputted answer.
^ If dialogue is displayed without showing "Choose =>" at the bottom, it means there is more dialogue to read in this section. Just hit enter until the dialogue is finished (aka until you get the "Choose =>" option showing up at the bottom.
First section displays introductory dialogue and prompts the user to choose an option. Based on the option chosen, jumps to certain scenes.
Second section handles user choice by jumping to the proper point (scene) and displays the associated response dialogue.
In this example, either user choice leasds to the same win condition, shown in the bottom line of code.
^ Example of win condition code
^ Example of lose condition code
Loads the address of the appropriate win or loss message and syscall prints the string at the indicated address of the message. Then, jumps to the ending since the user has finished. In this case, asks the user if they want to play again through the end function described later in this document.
^ Example of a scene's dialogue generation code
Functions similarly to the win/loss conditions code. Loads a system call to the proper address of the dialogue string and prints the string at that address. Also shows the reading of user input after being given options via dialogue.
Asks for user input; the user has to hit enter to continue playing
^ Example of handling user input with two potential paths
Each potential user response has a path for the proper dialogue/response.
Asks player if they want to play again and waits for a response. If yes, game restarts by calling the main function. If not, game quits.