This game is a multiplayer battleship game. Playing like the board game, the players takes turn to attack the other one and trying to sink all of their ships.
This game was made in Unity with 2 programmers. The entirety of the game was made with C#. It was a LAN multiplayer game (with possibility of online if a port forwarding was done). It was done in 2 weeks during a class.
In this project, I did everything gameplay-wise. I did the ship placement phase, the attacking phase and the victory condition. This game works entirely on a canvas where tiles have been created to handle the players' inputs. I used the observer and singleton design patterns to manage the players' turns and attacks.
The way the tiles worked was : when a tile is clicked, the tile would call a function on his player (LocalClient) and according to the game phase, it would attack or place a ship. If a grid didn't need to be used during a phase or turn (Example : radar in placement phase), it would be deactivated.
The player could place their ships by clicking a tile and select another ship with the button "Next Ship". They could also rotate their ship. If they pressed the "Ships placement complete" before all ships were placed, it would return a message to the player to tell them to place all of their ships. Similarly, if they tried to place a ship out of the grid map, this ship you go back to its place in the left zone. If a player is ready before the other, a message would appear saying "Waiting for player 1/2".
When both players were ready, a die would be rolled to decide which player would attack first. All the grids would be deactivated, except for the attacking player's radar grid. This player would click on a tile and an icon would appear on this tile. Hit Successful/Failed on the attacker's radar grid and Ship/Water Hit on the other player's ocean grid. The icon is selected according to the result of the method checking if the tile clicked is in the other player's list of ships' tiles. Then the attacker's radar grid would deactivate, while the other player's radar would activate. The same steps repeat as long as the two players still has a floating ship.
When a player successfully sank all the other player's ships, a victory screen will appear, while the opponent will see a defeat screen.
Léa Bouchard - Gameplay
Alexandre Tremblay - Multiplayer