Thanks to Julio Marchi for this space in MSX All
Batalha Naval (in english Battleship or Sea Battle) it is a strategy game, where one player must hit all ships from the opponent before the opponent hit your ships.
There are some variations of this game. From the board size to the number of ships and their arrangement.
In this version, the board grid size is 15x15, where the horizontal coordinates are denoted by letters, while the vertical coordinates are represented by numbers. An example of a coordinate is "B7". Thus, this game has 14 ships, configured as follows:
Type | Symbol | Total | Size -------------+--------+-------+--------- Couracado | C | 1 | 5 Cruzador | Z | 2 | 4 Destroyer | D | 3 | 2 Submarino | S | 4 | 1 Hidro-aviao | H | 4 | 3
Now the ships appear on different orientation on the board:
The goal is to find the opponent's ships before hi/she finds yours.
There are two boards on the game: one for writing the player's own ship positioning, and the other to write the opponent's game, as soon as the player finds out the ships.
Each player informs a coordinate to the opponent and he/she answer "water" if a cell contains no ship or "hit a ...", if a part of a ship is found.
This game version is greater and more complex than that one presented in the game course. Now, the ships may be placed using different orientations and the sea planes are on "V" shape.
The automatic ship positioning creates and uses bounding-boxes in each object positioned on the board, in order to check the overlapping for new objects. This code is quite faster than the code used on the Battleship's game course.
Another remarkable improvement is the artificial intelligence for searching the ship's parts. As soon as a ship's part is found, it is also necessary to find the ship's orientation.
Two strategies were adopted: one for the common ships, and another one for the sea planes. Let's take a look on these strategies.
Sea planes (hidro-aviao)
The left board contains the player's ships and also is marked by the computer's shots.
The player controls the cursor on the right board where the computer's ships are placed. The player may shoot by pressing enter key.
- MSX 2
- 64 KB RAM
- 128 KB VRAM
Game - game in English (translated in 2021).
Sources - game source code (Pascal).
Author: Marcelo Silveira
License: GNU-GPL v. 3.x - http://www.gnu.org/licenses/gpl-3.0.txt.