Skip to content

SarahKugelmas/MIPSTextAdventure

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 

Repository files navigation

MIPSTextAdventure

Text Adventure game created using MIPS Assembly Language in the environment QtSpim, with the game taking place in its console.

README Sections

  1. How to Run using QtSpim
  2. How to Play
  3. Code Overview

How to Run using QtSpim

image
^ Load .asm code file

image
^ Make sure the Console window is enabled

image
^ Run/Continue should cause the game to begin in the console

image
^ The game is properly loaded and running if the console appears like this, with the opening dialogue displayed.

How to Play

image
^ 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.

image
^ 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.

image
^ 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.

Code Overview

Scenes

image
^ Example of a coded scene

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.

Win/Loss Conditions

image
^ Example of win condition code

image
^ 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.

Scene Messages/User Response

image
^ 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.

Pause Function

image
^ Pause function code

Asks for user input; the user has to hit enter to continue playing

Handle User Options

image
^ Example of handling user input with two potential paths

Each potential user response has a path for the proper dialogue/response.

End Function

image
^ End function code

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.

About

Text Adventure game created using MIPS Assembly Language in the environment QtSpim

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published