Table of Contents
The files needed for this assignment can be downloaded from MrZ/Asteroids.zip. When you first run the version of your project that you are given, you will see a simple black screen, with nothing happening. Your task is to create the asteroids, ship, and lasers, and write the code describing how they interact with each other.
1. The requirements
1.1. AsteroidsYou game should have asteroids that appear at the top of the screen and fall toward the bottom of the screen. You may want to make them fall straight down, or you may want to make them go to the side as they fall.
1.2. Your ShipThe player should be able to control, by the keyboard, a ship that moves back and forth at the bottom of the screen. If there is a collision between this ship and an asteroid, the ship is destroyed and the game ends (call Asteroids.gameOver()).
1.3. LasersThe player can press a key to fire lasers. These travel up the screen. If there is a collision between a laser and an asteroid, both are destroyed.
1.4. Other Optional ExtensionsOnce you have the basic required functionality of the game written, there are more things you should think about doing. For example, you might want to have the density of asteroids gradually increase. You may want powerups to appear somehow. You may want to make explosions appear when the ship or an asteroid is destroyed. The sample game here shows some of these things working, but you should not try to copy it. Rather, think up how you want the game to play, and write it your own way.
2. Some files you may want to refer toSample Applet
Zip file containing JCreator project
Key Code Names
3. Some tasks you may need to accomplishInstead of trying to present all the information you need for this assignment in some sequential fashion, I've broken it down into what you might need to know in order to do the assignment.
Timeline of a game
Working with the coordinate system
Creating a new GameObject class
Changing a GameObject's behavior
Advanced tinkering with the GameObject class
Starting up the game
Working with the Animation class
Getting keyboard input
Dealing with collisions
Dealing with death
Random numbers and sporadic events
I will be adding more tasks to this list as people tell me what they'd like to know how to do. You can leave a message asking me how to do something by posting a comment on this page. This requires that you create a user account for yourself, or log in as the user "nobody" (Password: nobody).
- <18> - Fri, 9 Dec 2005 15:49:53 -050018>
shit shit ass shit hahahahahaha
- <18> - Fri, 9 Dec 2005 15:49:06 -050018>
hey this is bullcrap wat the heck are we suppose to do this sucks its boring
- <2> - Thu, 28 Apr 2005 07:46:49 -04002>
hi i am on cpu no. 24
- <2> - Thu, 31 Mar 2005 07:39:01 -05002>
- <14> - Thu, 24 Mar 2005 07:36:30 -050014>
hold on wait HELPPPPPPPPPPPPPPPPPPPPPPPPP ME
- <17> - Thu, 3 Mar 2005 07:50:45 -050017>
i hate poo poo person
- <9> - Thu, 3 Mar 2005 07:47:52 -05009>
You are not alone because i love toes too especially with jam wat am i saying wtf?
- <14> - Thu, 3 Mar 2005 07:43:39 -050014>
i love toes
- <1> - Wed, 23 Feb 2005 09:58:04 -05001>
The purpose of posting comments on the website is to ask questions related to the assignment for which you think other students would be able to answer or would benefit from my answers.