I won hard on my first try! I think it was just a lot of luck though. My favorite strategy in Battleship is to aim diagonally; you only need to hit half the squares to find all of the ships. Anyway, great project! Do you like Battleship?
There is a lot of luck involved...but a good search strategy can make a big difference in improving your odds! I do enjoy Battleship, particularly as a solitaire game. Someday, maybe I'll rewrite this Scratch version so that it uses Lists.
Well, if you want to test your theory, try starting a new game and the press the S key. It will instantly show you where the duck put all his ships. Press green flag and do it a few more times and see if the pattern you think you see holds up. I used the S key feature to debug the program - and I never took it out :)
Ship placement is supposed to be random...with some rules though. I seem to remember making it so that it wouldn't place two ships in contact with each other because that makes them easier to accidentally find.
This is much better than mine. I had a lot of trouble having the AI know when a ship was sunk and eventually used lists, and you used color sensing, which seems a lot harder to pull off than lists! Loveit and favorited! I beat the duck with 2 spots on 1 ship left.
Thanks for your comment! I'm not ready to say one is better than the other - I think it's great that we have Battleship in Scratch (now 2 versions!). It's an awesome game.
This is great. Nicely done. It would be great if you showed the classic A, B, C ... and 1, 2, 3 ...buttons on rows and columns and made the player click on a row and column to learn about arrays (the educational content of the game beyond strategy) you can then made the fire balls like the version on the net at the crossing of the selected row and arrow.
Risk! That sounds like fun. I did a search on Scratch and couldn't find anybody that had tried it before. The new Lists data structure should make it easier, you can store all the country information in lists and then cycle through them in loops, looking for troop concentrations and so on. I'm not that familiar with the game myself - haven't played it in years - but it should be a fun challenge to make!
Hi logan996 - I'm sorry, I've made the duck as smart as I can using the somewhat limited resources of Scratch. About the only way I can make it harder would be to give the duck more shots than you or have it always get first turn, something like that. I'll give it some thought - or you can download it and make a remix!
Download the 25 sprites and 97 scripts of "Battleship" and open it in Scratch
Project Notes
My version of the classic strategy game! The duck plays a pretty good game but can be beaten.
Green Flag starts a new game series. Click once with the mouse on a ship to select it (it will turn white), click again to place it. While selected, the spacebar changes the ship orientation.
The Ships:
Aircraft Carrier - Green 5 holes
Battleship - Gold 4 holes
Cruiser - Blue 3 holes
Submarine - Violet 3 holes
Destroyer - Grey 2 holes
This version allows one shot per ship you have left in each turn.
Difficulty Levels:
Easy - You always start first and you get an extra shot
Medium - You always start first
Hard - Random who starts first
For the curious, the little yellow square in the lower-left corner is the mini-grid that the computer uses to keep track of where the ducks ships are hiding.
Comments
You need to be logged in to post comments
Add a Comment
COOL!
I won hard on my first try! I think it was just a lot of luck though. My favorite strategy in Battleship is to aim diagonally; you only need to hit half the squares to find all of the ships. Anyway, great project! Do you like Battleship?
There is a lot of luck involved...but a good search strategy can make a big difference in improving your odds! I do enjoy Battleship, particularly as a solitaire game. Someday, maybe I'll rewrite this Scratch version so that it uses Lists.
(view all replies)awsome beat hard on my first try though, but the duck gives a good game.
i beat it on hard, by one turn.
Sounds like a good match!
I think I know how the ships are placed. I believe there is a common place where one of the ships is, or 5 rather.
Well, if you want to test your theory, try starting a new game and the press the S key. It will instantly show you where the duck put all his ships. Press green flag and do it a few more times and see if the pattern you think you see holds up. I used the S key feature to debug the program - and I never took it out :)
(view all replies)Ship placement is supposed to be random...with some rules though. I seem to remember making it so that it wouldn't place two ships in contact with each other because that makes them easier to accidentally find.
(view all replies)On easy. I beat hard with 3 ships left. is hard easier then easy or is it just that i knew where the ships would be?
No...hard is harder than easy. But there is a lot of luck involved, you might have just had a bad game last time.
this is impossible
Impossible to win or impossible to play?
Cool Game! I beat it on easy!
I beat it!!!!!!!!I beat it!!!!!!!I beat it!!!!!!!I beat it!!!!!!!I beat it!!!!!!!I beat it!!!!!!!I beat it!!!!!!!I beat it!!!!!!!I beat it!!!!!!!I beat it!!!!!!!I beat it!!!!!!!I beat it!!!!!!!!
You sound pretty happy :)
(view all replies)I almost won on hard
This is much better than mine. I had a lot of trouble having the AI know when a ship was sunk and eventually used lists, and you used color sensing, which seems a lot harder to pull off than lists! Loveit and favorited! I beat the duck with 2 spots on 1 ship left.
Thanks for your comment! I'm not ready to say one is better than the other - I think it's great that we have Battleship in Scratch (now 2 versions!). It's an awesome game.
(view all replies)i beat the duck on hard without cheating with two ships.
Good job!
i beat the duck with only 2 battleships left
i beat the duck in hard-----(i used the debugging tool
sweet!.. I won lol
this is awesome
This is great. Nicely done. It would be great if you showed the classic A, B, C ... and 1, 2, 3 ...buttons on rows and columns and made the player click on a row and column to learn about arrays (the educational content of the game beyond strategy) you can then made the fire balls like the version on the net at the crossing of the selected row and arrow.
I like the idea of using a game like this to illustrate arrays. Good thought!
(view all replies)hey this game is REALLY good. nice job
Thanks, glad U enjoyed it!
i won
very cool classic game
I WIN!!!!!!1
are you paddle2seefixit?
Yes I am. Paddle2seefixit is my workshop account - I use it for fixing other people's projects, testing things out, that sort of thing.
(view all replies)Nice project. im tryng to make risk. give me a message for any suggestions
Risk! That sounds like fun. I did a search on Scratch and couldn't find anybody that had tried it before. The new Lists data structure should make it easier, you can store all the country information in lists and then cycle through them in loops, looking for troop concentrations and so on. I'm not that familiar with the game myself - haven't played it in years - but it should be a fun challenge to make!
THIS IS THE BEST GAME ON SCRATCH!!!
This is a cool game
I'm going to download this!!
Wow, that's awesome!
my brother had a really hard time on "medium", but i got through all the levels on the first try!
Wow cool make a 2 player mode
THIS IS SO AWESOME!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! I LOVE BATTLESHIPS!!!!!
Great Job!!
Absalutly awsome.
very nice but i beat it on hard.
Well, luck plays a large role in this game. Plus, the duck is not a perfect player. Or maybe, you are just a very good player!
very nice game! make more AI games cause your good!
but it was great game
i won against the duck first turn
I can't control anything
i love it!!!!!1
This is one he77 of a duck!
Um, the only thing that the yellow square does is goes back 10 layers!!
Oldschooler2 - Thats good! Let them figure it out for themselves! If it's the one I'm thinking of, it was a debugging tool that I forgot to disable.
I found a cheat in this, but I'm not telling anyone else.
Awesome game!!!! I wish all the games on scratch were as well done as this man!!!!!!
i beat hard!!!
good job it's in the gallery now
sweet
THIS IS THE BEST GAME!!!
I won on my first try! Good job, Paddle2See!
This is a real strategy game! =)
awesome! the first time the duck won, the second, I did! This is awesome!
Hi logan996 - I'm sorry, I've made the duck as smart as I can using the somewhat limited resources of Scratch. About the only way I can make it harder would be to give the duck more shots than you or have it always get first turn, something like that. I'll give it some thought - or you can download it and make a remix!
could you make a super hard and a super super hard?
LOVE IT!! i beat easy medium and hard i kicked the duks butt at hard!!!
I win!!
I'm not familiar with those terms, but hopefully they are compliments!
sik and pwnin!!!!! great AI
this game is AMAZING!!! HOW DID YOU DESIGN IT??
*smiles with great joy and laughter*
dude an awsome game - check out some a mine!
dont spam
cool