top of page

Submarine Game Communicator (Stanford ME 218C)

About the Project

 

The primary task for the project was to design and implement three independent submarine "stations" (CONN, SONAR, and TORPEDO) on the same project team capable of making actions and responding to events in a turn-based game. Each submarine navigates an "ocean" made of a grid of hexagons, seeking to detect enemy submarine locations and destroy them. Communication between the individual stations as well as enemy submarines is done through a strict audio communication protocol. During its turn, each station emits a brief sequence of audio tones through a speaker that represents game information, such as the station's action for that turn or a response to an enemy submarine's action. 

The Stations

Each member of the team was required to build a control box capable of acting as any of the three stations. The CONN is responsible for moving the sub, the SONAR pings locations to detect enemy subs, and the TORPEDO launches ordinance to destroy enemy subs. 


My Role

Since this class was taken during the coronavirus pandemic, each member of the team was responsible for building all of their own hardware, while all code was shared. In addition to designing and wiring the LED's and switches on my control box, I was responsible for coding the state machines for the CONN, TORPEDO, and SONAR actions.

More detailed info including the communication protocol, state diagrams, and code listings can be found here:

Animated GIF-downsized_large-9.gif
Animated GIF-downsized_large-8.gif
Animated GIF-downsized_large-10.gif
bottom of page