Battleship v2.0 By Doug Greene (Doug142869@aol.com) Size: 5053 bytes (It's big, I know, but that's BASIC for ya) Description: 2 player Battleship. Uses the link cable to allow two players to play against each other, each with their own gameboard, showing their own position of ships and their hits and misses. Required to play: *TI-Graph Link Cable (The one to link together two calculators) *Two TI-83 calculators (this is a two player game only) *Matrix[A]-[C] free (or they will be overwritten) *GDB1 and GDB2 *Pic1 and Pic0 *This game takes up a lot of memory to play, and so it is a good idea to have as much free memory as possible available during gameplay. Included in Btlshp20.83g: BTLSHP20 - Program that lets you set up your ships (2085b) ZBTSHP20 - Program that is actual gameplay (1415b) ZBTSHP21 - Program that does some required math (49b) ZBTSHP22 - Program that keeps track of what ships have been hit and by who and tests for Game Over (1133b) ZBTSHP23 - Program that contains the menus and startup screens, stuff like that (371b) GDB1 - Sets graphing mode (116b) Pic0 - Battleship gameboard (764b) Other things used during gameplay: Matrix[A] - Position of player 1's ships (584b) Matrix[B] - Position of player 2's ships (584b) Matrix[C] - Hits and misses (584b) Pic1 - Gameboard that gets updated as the game is played and new things are being added to the board (764b) GDB2 - Saves the graph mode from before the game so that it can be set back to the way it was when the game is finished (116b) *Note* These things will be deleted when the game is through, so as to leave you with as much memory for other things as possible. All added up, the memory required to run Battleship v2.0 = 8565 bytes Installation: Send BTLSHP20.83g to your calc. Run BTLSHP20 to start the game. If you run any of the other programs, you may get an error, but you won't be able to play the game right. *Remember* Matrices A-C, Pic1 and 0, and GDB1 and GDB2 will be used, so if you have any information in them that you would like to keep, I suggest you back them up to your computer. Playing the Game: Keys: A-H to enter the column 1-8 to enter the row DEL to pause, and choose Quit from the menu there to quit, or Cancel to return to the game. You start out at the title screen. Press enter to go to the main menu. There, you can select New Game to play Battleship. Then it asks you for which Player number you are. It is imperative to the game that one person chooses 1 and the other chooses 2. The game will be screwed up if both people pick the same number, or some other number besides 1 or 2. After that, you go to place your ships. You have three ships to place, a lifeboat (2 spaces), a submarine (3 spaces), and a carrier (4 spaces). You can also select Random Ships to let the computer place the three ships for you randomly. When you select a ship, it asks you for the direction. Then it takes you to the game board where it prompts you for the column. Type in A-H ( you don't need to hit alpha first). And then type in 1-8 for the row number. The ship is then drawn on the board from that square, in the direction that you chose before. You won't be able to place ships going off the board or intersecting with other ships. Do that until all three ships are placed. Then it asks that you push enter when both players are ready. Here you have to wait for the other person to finish placing his/her ships. When you are both ready, push enter. Then it begins to load the game. What it is doing, actually, is getting the positions of the ships from the other calculator. When that is finished, push enter to begin the game. When you start the game, Player 1 goes first. He/she will try to guess the col and row of one of Player 2's ships. If he misses, a O will be drawn where he guessed. A hit draws an X. The other player will get the message 'PLR x MISSES' or 'HITS!', but does not see where he guessed. Displaying on the board both players' hits and misses would be disastrous and would clutter everything up, so I decided that it was not important where the other player guessed, as long as you knew whether he hit or missed. So your board only shows you where you've guessed, so you know not to guess there again. Well, you keep playing like this until one player has sunk all the other player's ships, in which case the game is over. Have fun! Bugs: As this is my first try at programming link games, I expected there to be a few bugs. And there are. First off, I had trouble getting the calculator to get the matrix of the other player's ships' positions. Just the way the cable works seems screwy. Sometimes it will get it, sometimes it won't. I've gotten it so that it works most of the time (about 95% of the time). If you get an ERR: UNDEFINED, that means it didn't work, and you will both have to start over. Another bug is that of memory. In addition to the large amount of memory required to install the game, it takes a lot of memory just to play it. I've shrunk the size of the programs as much as I could, and have tried to keep the calculator from using up to much memory as much as I could. But if you're playing a long game, you might get an ERR: MEMORY. Especially if you have a lot of other programs on your calc at the time. A good idea, if you can, is to back up your calc on your computer, reset all memory, and then only have Battleship on your calc when playing it. I know that's a lot of work just to play one game, and I'm sorry, but if you want to play Battleship, you might want to do that. Those are the only bugs that I've found so far. If you find any more, please e-mail me at Doug142869@aol.com. Miscellaneous: You are welcome to change the code in this game, but you can't sell it off as your own. If you make a different game that is similar to this game, and/or you used some of my code or my ideas, please give me credit for them. If you do change the code in an attempt to make the game better, please e-mail me with the changes at Doug142869@aol.com. If I decide to keep the changes, I will give you proper credit for them. If you have any other questions, comments, bug reports, or anything like that, please e-mail me at the above address. Thanks for playing Battleship v2.0!