Report as inappropriate.
This game is an example of how to make a 3-player game in Greenfoot. It uses 3 actors.
blue -- arrow keys
green -- asdw
orange(bomber) -- mouse
1 to drop bomb
If you are the bomber, try to wipe out the blue and green populations.
If you are blue or green, get away from the bombers bombs.
Notes:
This was a Greenfoot assignment for a 10-year-old.
The assignment was to take bomber2, by computers.fun, which is a 2-player game, and turn it into a 3-player game.
bomber2 is made from MultiplayerBomber, by patrik.
The 10-year-old, completed the assignment in about 30 minutes, and made many other changes based on his own ideas.
The assignment given to the 10-year-old was to add a third player.
He decided to use the mouse for the third player. He gave the 3rd player the ability to drop bombs, and took that ability away from the first 2 players.
He had to search around to find the code to add, but the code to use is provided on kidslike.info.
Here is the link for the assignment
http://www.kidslike.info/greenfoot_programming_assignment_take_a_2_player_game_and_turn_it_into_a_3_player_game
Long description
Here is a Greenfoot assignment.
Go to the bomberfighter2 game.
http://greenfootgallery.org/scenarios/516
Download the code.
1) Change the code so that you have 3 players. The third player will be a person who is controlled through the mouse.
The Greenfoot code for making an object go wherever the mouse goes is
if (Greenfoot.mouseMoved(null)) {
MouseInfo mouse = Greenfoot.getMouseInfo();
setLocation (mouse.getX(), mouse.getY());
}
2) Now add some code so that the third player can drop a bomb by hitting the number key "1"
Here is the link for the answer
http://www.kidslike.info/greenfoot_programming_assignment_answer_bomberfield_3_player_version
11153 views / 21 in the last 7 days
2 votes | 0 in the last 7 days
Visit the web page for this scenario.
Want to leave a comment? You must first log in.
2008/12/23
2008/12/24
2008/12/24
2009/1/5