Home - PanMaster13/Battleship GitHub Wiki
Welcome to the Battleship WIKI!
1. Team and Title Details Team Members:
- Jason Ang
- Sheldon Lai
- Darren Chan
Game Title: BattleShip
2. Overview of the gameplay. Battleship is a war-themed computer game which is designed to be played by 2 players. It originates from the plastic board game that was marketed by the Milton Bradley Company in 1967. The board game is now owned by Hasbro as they acquired Milton Bradley in 1984. The objective of this game is that players guess where the opponent’s battleships are in a 2D grid. The player who has sunk all the opponent’s battleships is the winner. The target platform is mobile devices like smartphones, tablets, IPads and others. The visual style would be a 2D overview of the grid with 2D models of the ships with modern effects. The audio style would also be modern type like “Boom” effect if a battleship is hit or the “Sink” effect when a battleship sinks.
3. Game flow.
4. User Interface
- Main Menu
From this screen, it can be seen that the player has a few options select from, notably the “Start Game” button, settings, help, leaderboard, ships and also the news. By clicking the “Start Game” button, it will bring the user to the Game Mode page.
- Game Mode
In this page the user can either select “Online Multiplayer”, “Local Multiplayer”, “Single-Player” or go back to the previous page. After selecting one of the game modes, it bring the user to the Difficulty page.
- Difficulty Page
There are 3 game modes to choose from, easy, normal and hard. The back button is also there for convenience of use. After selecting the difficulty, there will be brought to the page to arrange their ship positions.
- Ship Arrangement Page
In this page, the user can arrange their ship, save the positions, use an auto function to arrange the ships and, also change the rules of the game. After this, they can click start to begin the game.
- Scoreboard
After finishing the match, the scores are displayed and the user and choose either to rematch or continue which will bring them back to the Main Menu.
5. Gameplay During gameplay, the players get to arrange their battleships on a 10x10 grid. Each battleship occupies a certain number of squares on the grid and can be rotated to face vertically or horizontally on the grid. Once the players have done their ship arrangements, both players will be presented an empty 10x10 grid that represents their opponent’s plane. The ships will be hidden and the players would have to guess where their ships are by pressing on each individual grid. One of the players will be randomly selected to start first. When a player press a square unit on a grid, it would result is either a “Hit” situation or a “Miss” situation. A “Hit” situation occurs when the square unit selected by the player is actually a part of the battleship. Once that happens, that part of the battleship will be damaged and will be rendered unselectable. Additionally, the player that manages to "Hit" that turn gets an additional chance to select another square unit. On the other hand, a "Miss" situation occurs when the player selects a square unit that is empty. This means that there is nothing in the selected square unit, and it will be rendered unselectable. That player's turn will be over and the other player gets a turn to pick a square unit. This continues on until all of the battleships of any player in that turn is destroyed. That player will lose and the other player will be considered the winner.
6. Assets:
- Intro image
- Background menu image
- Menu theme
- Game board image
- In-game music
- Explosion sounds
- Battleship game entity images
- Explosion animation
- Victory animation
- Victory music
- Defeat animation
- Defeat music
- Selection sound
- In-game selection sound
7. Coding Standard
For coding conventions, follow this link
For commenting, please enter this link. Example, of commenting standards below.
///<summary>
///Method name and explain method use
///</summary>
///<param name="varName">explanation of parameter</param> if no param is okay, no need this. remove the <param></param>
funcName(param varName){
//explain what code does if relevant
codecodecode
}
8. Changes to the Battleship game before and after conversion from VB to C#
In the VB version of the game
- In the deployment phase:
- The placement of the ship is offset by 3 spaces downwards on the vertical axes.
- Randomizing the ship positions does not take into account the ship unit intersection prompting ship intersection warning.
- In the game phase:
- Scoreboard does not show up after the game, only after winning the game does it show.
- AI difficulty is set to high even though set to other difficulty.
In the C# version of the game
- In the deployment phase
- The placement of the ship is offset by 3 spaces downwards on the vertical axes.
- Randomizing the ship positions does not take into account the ship unit intersection prompting ship intersection warning.
- In the game phase
- Scoreboard does not show up after the game, only after winning the game does it show.
- AI difficulty is set to high even though set to other difficulty.
- No notification if AI hit or miss a player ship.
It is observed that after conversion, the only issue is that no notification for hit or miss for the AI in game phase.