View Poll Results: What do you think of Battleship v1.3 Official?

Voters
19. You may not vote on this poll
  • Excellent

    2 10.53%
  • Above Average

    9 47.37%
  • Average

    3 15.79%
  • Below Average

    1 5.26%
  • Terrible

    4 21.05%
Like Tree1Likes

Battleship v1.3 Official

This is a discussion on Battleship v1.3 Official within the Game Programming forums, part of the General Programming Boards category; My improved version of the previous Battleship. Thank you all for the suggestions. v1.3 Additions: -Beep selection mode -Pause selection ...

  1. #1
    Registered User
    Join Date
    Feb 2003
    Posts
    51

    Arrow Battleship v1.3 Official

    My improved version of the previous Battleship. Thank you all for the suggestions.

    v1.3 Additions:
    -Beep selection mode
    -Pause selection mode (for those of you that dispise the "Please Press Any Key to Continue")
    -Improved code for more efficiency
    -Error messages
    -Other things that I forgot
    Attached Files Attached Files

  2. #2
    Registered User
    Join Date
    Feb 2003
    Posts
    51
    No comments?

  3. #3
    Registered User
    Join Date
    Jan 2003
    Posts
    56

    Thumbs up nice

    game
    Muhammad Badar likes this.

  4. #4
    i want wookie cookies the Wookie's Avatar
    Join Date
    Oct 2002
    Posts
    455
    cool, how long did that take you?

  5. #5
    Registered User AeroHammer's Avatar
    Join Date
    Sep 2002
    Posts
    12
    Pretty nice little game. Especially like the incorporated help. As I haven't seen any previous versions, I'm going to ask, does the AI use a default pattern to find the player ship?

  6. #6
    Crazy Fool Perspective's Avatar
    Join Date
    Jan 2003
    Location
    Canada
    Posts
    2,640
    Originally posted by luckygold6
    No comments?
    you would probably get more comments if you posted this in the game forum....

    anywho, good game! im not much of a fan of text based games but this was enjoyable, i like it.

  7. #7
    Registered User
    Join Date
    Feb 2003
    Posts
    595
    Nice game, but I tried it twice & both times it hung before the game was over.

  8. #8
    Registered User
    Join Date
    Feb 2003
    Posts
    51
    It took me several weeks to create, debug, and complete the program.

    Can you tell me when the program hung up on you? That way, I might be able to narrow down to where I need to search for the error.

    Thanks!

  9. #9
    Registered User
    Join Date
    Feb 2003
    Posts
    595
    I just tried again. 1st game went OK. 2nd & 3rd games hung again. Hung on computer's turn in 9th round. I was purposely avoiding hitting the enemy so game would continue for a while.

    It hung after
    0- Strategic mode

    Difficulty level 0
    Beep mode 1
    Pause mode 1
    Help mode 0

    Computer shots 8 Ammo 17


    Player shots 9 Ammo 16

    (The other stats varied from game to game, but I think the number of shots were the same each time... at least, they were the same both times today, and yesterday it was after about 7,8, or 9 shots but I'm not exactly sure because I wasn't paying attention to that.)

  10. #10
    luckyogld6
    Guest
    Thanks, I'll check on the problem.

    If anyone else has this problem, please post any additional info.

  11. #11
    Registered User thePope's Avatar
    Join Date
    Mar 2003
    Posts
    26

    Smile ??

    Do you have your vertical columns and horizontal rows mixed up?

  12. #12
    Registered User
    Join Date
    Feb 2003
    Posts
    51

    I doubt I reversed the vertical and horizontal, but check...

    Vertical- up and down
    Horizontal- left and right

    Is this right?

  13. #13
    Crazy Fool Perspective's Avatar
    Join Date
    Jan 2003
    Location
    Canada
    Posts
    2,640

    Re: I doubt I reversed the vertical and horizontal, but check...

    Originally posted by luckygold6
    Vertical- up and down
    Horizontal- left and right

    Is this right?
    yup, last time i checked....

  14. #14
    Registered User
    Join Date
    Feb 2003
    Posts
    51
    The strategy I use is actually really simple. Originally, I had actually made it so that the computer tries to locate one of your ships, then it attacks grids around it that would seem most likely for a ship to reside in. This strategy is similar to those used by humans. However, when I first implemented it, I had incesent errors, so I assumed it was that portion of the program. I wiped the strategy out, and started from scratch.

    I created a simpler straegy, in which the computer is given the knowledge of where you ships are, and when a certain dice roll is hit, the computer will attack your ships. I realized afterward that the problem I had before was never within the strategy portion of the code, but in the attack portion of the code. I had accidently replaced || with && in my code and it caused the game to malfunction.

    Anyway, I haven't had time to revise the strategy, so I'm just keeping it the way it is for the time being. Once I have more time to work on my programs, I will revise it. I also believed that this strategy was more challenging. Because the grid was so small, the computer using the former strategy would have to spend several turns search for a portion of your ship, then try to locate the other portions. This meant that the computer would have been less challeging.

    Hope that answers your question.

    And about the computer hanging up, I can't seem to locate the error. I haven't yet, but then again, the computer seems to always beat me before I get pass six or seven rounds. I think the cause might be that the computer is randomizing attacks that are on ships or areas it has attacked before. This means that it will have to re-randomize until it has a valid attack. As less spots are available, it will take longer to strike a number because the probability of hitting blanks become less and less. I'm trying to implement a code to prevent this.

  15. #15
    Registered User
    Join Date
    Feb 2003
    Posts
    51

    Revisions to last post

    Paragraph III:
    ...several turns searching for a portion of your ship, then try to locate the other...

    Paragraph VI:
    ...I haven't encountered yet, but then again, the computer seems to always...

    I appologize for my errors.

Page 1 of 2 12 LastLast
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Battleship program
    By swgh in forum C++ Programming
    Replies: 4
    Last Post: 04-07-2008, 10:02 AM
  2. Battleship Game (Win32 EXP Needed)
    By ElWhapo in forum Projects and Job Recruitment
    Replies: 2
    Last Post: 01-15-2005, 10:10 PM
  3. Battleship
    By mandingo in forum C++ Programming
    Replies: 7
    Last Post: 12-12-2004, 05:28 PM
  4. c++ battleship game
    By JTtheCPPgod in forum Game Programming
    Replies: 4
    Last Post: 01-05-2002, 11:12 AM
  5. Battleship
    By Unregistered in forum Game Programming
    Replies: 11
    Last Post: 11-29-2001, 04:35 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21