CST112
Projects 2 & 3

Project 2

For project 2, make the "hero" (your character) move diagonaly for each frame, and bounce off the sides of the screen. (Also draw a "scene", with grass, sky, and sun.)

Use global variables (for now) but everything should be fully modularized: i.e the "draw()" method should contain only function calls to invoke other methods that you have written. (Be sure to begin each of your functions with a brief COMMENT that says what this method is supposed to do)


Project 3 is not assigned yet.
This is only a partial specification.

Project 3 will include: Various events cause the sketch to change. Use global variables (for now) but everything must be fully modularized.


////Fully-modularized:

void draw() 	//// Draw scene, hero, bomb, etc.  Also move as necessary.
{
		doScene();
		doHero();
		doBomb();
		doBullets();
		doScore();
}

/*
Scene:  
	Blue sky.
	Sun high in the sky.  (3/4 of the way up, above horizon.)
	Green grass from horizon to bottm.

Hero:
	(Whatever you want, but use at least three different methods to draw it.
	Hero moves across and down by heroDX and heroDY

Bomb:
	Drops downward by bombDY, every frame.
		
Bullets:
	Three bullets move to right, by bulletDX, every frame.
	They are spaced 50 pixels apart, vertically.

Score:
	For now, just add one every time a bomb starts dropping.

*/

////////  EVENTS:

void setup()		// ++++
{
	size(640,480);
	restart();	// Initialize all game variables.
}

void mousePressed()	// Horizon adjusts randomly.  Hero jumps to mouse
{
	// ++++
}
	

void keyPressed()	// Sun moves to random X position.  Bomb starts dropping from sun.
{
	// ++++
}