Skip to content

Submarine Warfare Simulator in MIPS - EECS 314 Semester Project

Notifications You must be signed in to change notification settings

iandimayuga/subwars-mips

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

subwars-mips

Submarine Warfare Simulator in MIPS - EECS 314 Computer Architecture Semester Project

Implementation

The C implementation (found in "./c") was used for debugging and game design.

Subsequently, we have manually "compiled" the C implementation into MIPS assembly code (found in "./mips") for submission.

Installation

  1. Change to mips directory and run make. This should create a new subwars.asm file.
  2. Run qtSpim and load the MIPS assembly file subwars.asm.
  3. Begin the simulation.

Gameplay

Opening splash and instructions:

                                  _
                                 |  `-._
                       .---._    |       `-.
                      /       `-.|   _______|
                     |               `-.____`-.
           __        |         |`-.         |
          |  `-._    |          `-.|         `-._
          `-._``-._   \                           `-._
               `-. ``-.`-._                            `-.
                              __| |  | _ | |    |    | _ \ __|
                             __ | |  | _ { |  \ |  / |   /__ |
                             ___|____|___|__/`__|_,-_|_\_\___|


Welcome to SUBWARS!!

You are Player 1 and Player 2, the top two Nuclear Submarine commanders in the Soviet Navy.
It is the year 1958, and Secretary Khrushchev has ordered a round of War Games.
You have both surfaced in the Atlantic Ocean just off the Ivory Coast.
Your orders are to find and sink your comrade's submarine.

This is a turn-based game based on the concept of limited information.
Each phase, Player 1 will give orders, followed by Player 2.
The phase will then commence, and when actions have been taken, the next phase will begin.
You must stay within an 8x8 grid from 0 N 0 E to 7 N 7 E.
Explore the area and try to listen for your enemy.
If they use their engines while in front of you, you may detect them.
Torpedo fire and pings can be heard by everyone.
If you are pointing directly at your enemy and fire a torpedo, you will be victorious!!

Starting conditions are indicated below:

   0 E                         7 E
  +---+---+---+---+---+---+---+---+
  |   |   |   |   |   |   |   |<P2| 7 N
  +---+---+---+---+---+---+---+---+
  |   |   |   |   |   |   |   |   |
  +---+---+---+---+---+---+---+---+
  |   |   |   |   |   |   |   |   |
  +---+---+---+---+---+---+---+---+
  |   |   |   |   |   |   |   |   |
  +---+---+---+---+---+---+---+---+
  |   |   |   |   |   |   |   |   |
  +---+---+---+---+---+---+---+---+
  |   |   |   |   |   |   |   |   |
  +---+---+---+---+---+---+---+---+
  |   |   |   |   |   |   |   |   |
^ +---+---+---+---+---+---+---+---+
| |P1>|   |   |   |   |   |   |   | 0 N
N +---+---+---+---+---+---+---+---+
  E--->

PRESS ENTER TO SUBMERGE

About

Submarine Warfare Simulator in MIPS - EECS 314 Semester Project

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •