Project - Asteroids
Part 1 - Set up your project environment
1.1. Install Processing
There are lots of ways to do graphics in Java, and for this project we're going to use the Processing platform.
Confirm that you have Processing installed on your machine.
1.2. Set up project folder
- Start the Processing app, and save the new sketch with the name AsteroidsGame.
You may recall that this first tab in the window is your main method that will be run when you click on the green Start triangle above.
- Copy this starter code into your main AsteroidsGame window.
// Declare variables to be used in the game
// initialize variables
// the setup method runs once at the beginning
void setup()
{
}
// run through the listener loop, which repeats over
// and over, listening for input from the user
void draw()
{
}
1.3. Use git to track your project (optional)
This is an ideal time to start using git!
- Launch a Terminal, and cd into your Processing project folder
$ cd ~/Desktop/AsteroidsGame
- Initialize git
$ git init
- Do an initial add and commit
$ git add .
$ git commit -m "Initial commit. Now let's get to work."
- Start working. Every time you reach a milestone—maybe once a day?—save that version, add it, commit it, and include a commit message that describes that milestone.
Next...
Part 2 - The Floater superclass