This site requires JavaScript, please enable it in your browser!
Greenfoot back

Report as inappropriate.

benchab
benchab presents ...

2012/6/7

Clam Catch!

You can either play the one player or the two player version.

For the one player version, you need to obtain 500 points before time is up.

For the two player version, you need to be the first to obtain 500 points.

3164 views / 659 in the last 7 days

1 vote | 0 in the last 7 days

Tags: game arrow jump keys player two catch clam around wrap

This scenario is a member of: JDHS NJ AP Java


Your browser does not support the canvas tag.
A new version of this scenario was uploaded on Thu Jun 07 21:55:51 UTC 2012
SidstarSidstar

2012/6/7

Hey, how did you make it so after a couple of seconds or what ever the clams come from the top of the srceen. Also how did you do it with the fish. Great game Thanks
benchabbenchab

2012/6/8

Thanks! For the clams I basically made it so that greenfoot generates a random number then if that number is less than 5, create a new clam and have it drop from a random x location. This is the exact code: if(Greenfoot.getRandomNumber(100)<5) { Clam clam = new Clam(); addObject(clam, Greenfoot.getRandomNumber(600), 0); } That's what gives it that small delay because greenfoot is generating random numbers until it hits one below 5, and it also makes it so that there's a random amount of clams being generated each time you play the game. As for the fish, I created one object of each fish and made it so that when that object reaches the end of the screen, it reappears at the opposite end of the screen in a random y location. It makes it seem like there are a ton of fish coming and going but in reality they're the same fish objects appearing at random locations once they've crossed the screen. I'll post the full source code later once I've got it cleaned up a bit.
A new version of this scenario was uploaded on Fri Jun 08 00:32:17 UTC 2012
A new version of this scenario was uploaded on Fri Jun 08 00:42:06 UTC 2012
A new version of this scenario was uploaded on Fri Jun 08 11:56:50 UTC 2012
A new version of this scenario was uploaded on Mon Jun 11 22:31:21 UTC 2012 Added one player function
A new version of this scenario was uploaded on Mon Jun 11 22:43:25 UTC 2012 Added one player function
A new version of this scenario was uploaded on Mon Jun 11 22:44:45 UTC 2012 Added one player function
ArenAren

2012/6/19

I liked the game, but I found it confusing. There were different monsters and you couldn't tell them apart. Some monsters hurt you and others do nothing. I found it difficult to tell which ones I really needed to stay away from. The directions were great.

Want to leave a comment? You must first log in.

Who likes this?

Sidstar