The primary task of the game is 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 will navigate the "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. Each station also uses microphone input to decode and parse data from transmissions from other stations. The roles of each station and the communication protocol overview is described below.
THE CONN
The CONN station is responsible for navigating the ocean waters. The CONN's available actions are:
MOVE: Advances the submarine one grid position forward. TURN: Rotates the submarine 60° clockwise or counter-clockwise. IDLE: No action. The CONN must track the submarine's location and has the ability to move and turn the submarine on the ocean grid. The CONN must also respond to specific enemy transmissions. The CONN must transmit an echo revealing the submarine's location if a ping is sent within range from an enemy SONAR station. In the event an enemy torpedo unfortunately detonates in the submarine's current location, the CONN must also relay the hit event to the other two stations to transition into the permanently damaged state. |
THE SONAR
The SONAR station is responsible for detecting and relaying position information from enemy submarines. The SONAR move-set is:
OMNI: Sends an omni-directional ping ranging three cells. DIRECTED: Sends a forward-facing ping ranging six cells. IDLE: No action. In the event that an enemy SONAR station sends a ping in range of the current submarine's location, the SONAR can reveal the source location of that ping. Additionally, any time an enemy TORPEDO station launches an ordinance, the SONAR station can reveal the source of the launch. Finally, the SONAR can relay any echos containing enemy submarine locations revealed by its own pings. |
THE TORPEDO
The TORPEDO is responsible for attacking other submarines. The TORPEDO actions are:
FIRE: Fires an ordinance in the forward-facing direction for a specified distance. IDLE: No action. The TORPEDO must relay the detonation location exactly two turns after the FIRE action is taken. The TORPEDO also reveals any successful hits from its launched ordinances. The TORPEDO cannot fire while an ordinance is en route to a location. |
COMMUNICATION OVERVIEW
Communication between stations and other submarines was performed through serial transmission of di-bits using 4 discrete audio frequencies. Each message consisted of 26 bits, which was sufficient data to transmit information about the source submarine and the intended activity. For robustness, this transmission included a checksum which consisted of a binary sum of a specific range of di-bits in the message. The receiving stations would then discard any invalid checksum messages, typically from missed or erroneous di-bits in the audio message.
In terms of media access control, the game implemented a TDMA (time-division multiple access) communication protocol. The protocol included a reserved time slot for each station in each submarine to transmit the appropriate message. TDMA cycles would continue to wrap around all teams until every team was completed with their actions and responses. The game would then proceed to the next turn.